new style for cursor position in 'tree_list'

git-svn-id: svn://kolibrios.org@7508 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2018-10-30 13:03:22 +00:00
parent 8a77c84962
commit f14a437031
4 changed files with 24 additions and 3 deletions

View File

@ -220,8 +220,6 @@ macro check_boxes_set_sys_color2 start,end,color_table
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Basic macros for use OptionBox ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -272,6 +270,7 @@ macro option_boxes_set_sys_color color_table,group
cmp edi,0
jne @b
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Basic macros for use TreeList ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -336,6 +335,7 @@ tl_on_press equ dword[edi+84] ;㪠
tl_key_no_edit equ 1b ;í«¥¬¥­â ­¥«ì§ï । ªâ¨à®¢ âì ­  ª« ¢¨ âãॠ(¨§¬¥­ïâì ã஢­¨, 㤠«ïâì)
tl_draw_par_line equ 10b ;à¨á®¢ âì «¨­¨¨ ª த¨â¥«ì᪮¬ã 㧫ã
tl_list_box_mode equ 100b ;áâ¨«ì ­¥ ®â®¡à ¦ ¥â ã஢­¨ (ª ª ¢ ListBox ¢á¥ ®¤­®£® ã஢­ï)
tl_cursor_pos_limited equ 8 ;¯¥à¥¬¥é¥­¨¥ ªãàá®à  ®£à ­¨ç¥­® áãé¥áâ¢ãî騬¨ 㧫 ¬¨
;ª®­áâ ­âë ¤«ï ä㭪権
tl_err_save_memory_size equ 10b ;­¥ 墠⠥⠯ ¬ï⨠¤«ï á®åà ­¥­¨ï í«¥¬¥­â 

View File

@ -266,6 +266,12 @@ pop ebx eax
mov ecx,eax
call tl_get_node_count ;eax = node count
bt tl_style,3 ;tl_cursor_pos_limited
jnc @f
or eax,eax
jz @f
dec eax ;¥á«¨ ªãàá®à á⠥⠭  áãé¥áâ¢ãî騥 㧫ë
@@:
cmp eax,ecx
jl @f
mov eax,ecx ;¥á«¨ ªãàá®à ­¥ ¢ë襫 §  ¯à¥¤¥«ë 㧫®¢, ¢®ááâ ­ ¢«¨¢ ¥¬ áâ à®¥ §­ ç¥­¨¥ eax
@ -1549,6 +1555,12 @@ align 4
proc tl_cur_next uses eax ebx edi esi, tlist:dword
mov edi,[tlist]
call tl_get_node_count ;eax = node count
bt tl_style,3 ;tl_cursor_pos_limited
jnc @f
or eax,eax
jz @f
dec eax ;¥á«¨ ªãàá®à á⠥⠭  áãé¥áâ¢ãî騥 㧫ë
@@:
cmp tl_cur_pos,eax
jge .no_redraw
mov esi,tl_box_top
@ -1700,6 +1712,12 @@ proc tl_cur_page_down uses eax ebx ecx edi esi, tlist:dword
je .no_redraw
mov esi,tl_p_scroll
call tl_get_node_count ;eax = node count
bt tl_style,3 ;tl_cursor_pos_limited
jnc @f
or eax,eax
jz @f
dec eax ;¥á«¨ ªãàá®à á⠥⠭  áãé¥áâ¢ãî騥 㧫ë
@@:
mov ebx,eax
call tl_get_rows_count ;eax = rows count

View File

@ -14,7 +14,7 @@ include 'cnc_editor.inc'
include '../../develop/info3ds/info_fun_float.inc'
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
caption db 'CNC editor 08.10.18',0 ;¯®¤¯¨áì ®ª­ 
caption db 'CNC editor 30.10.18',0 ;¯®¤¯¨áì ®ª­ 
run_file_70 FileInfoBlock
@ -711,7 +711,9 @@ but_open_file:
mcall SF_SET_CAPTION,1,openfile_path
;---
and dword[tree1.style],not tl_cursor_pos_limited
stdcall FileInit,[open_file_data],[open_file_size]
or dword[tree1.style], tl_cursor_pos_limited
stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
stdcall [buf2d_draw], buf_0 ;®¡­®¢«ï¥¬ ¡ãä¥à ­  íªà ­¥
.end_open_file:

View File

@ -177,6 +177,7 @@ mov ebp,lib0
add eax,304
loop @b
stdcall [tl_cur_beg],tree1 ;áâ ¢¨¬ ªãàá®à ­  ­ ç «® ᯨ᪠
or dword[tree1.style], tl_cursor_pos_limited ;®£à ­¨ç¨¢ ¥¬ ¤¢¨¦¥­¨¥ ªãàá®à  ¢ ¯à¥¤¥« å ᯨ᪠
.end_dir_init:
;--- load ini file ---