forked from KolibriOS/kolibrios
t_edit: add new options for toolbar to *.ini file
git-svn-id: svn://kolibrios.org@7488 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
89001f353c
commit
07093dfc10
File diff suppressed because one or more lines are too long
@ -4,12 +4,18 @@ draw_but_toolbar: ;
|
|||||||
mov edi,tedit0
|
mov edi,tedit0
|
||||||
|
|
||||||
mov ecx,0x40000000
|
mov ecx,0x40000000
|
||||||
mov edx,5*65536+25
|
mov edx,(5 shl 16)+25
|
||||||
call draw_but_icon
|
bt word[panel_but],0
|
||||||
|
jnc @f
|
||||||
|
call draw_but_icon ;New
|
||||||
|
@@:
|
||||||
|
|
||||||
inc cx
|
inc cx
|
||||||
mov edx,30*65536+25
|
bt word[panel_but+1],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;Open
|
||||||
|
@@:
|
||||||
|
|
||||||
stdcall [ted_can_save],edi
|
stdcall [ted_can_save],edi
|
||||||
cmp al,1
|
cmp al,1
|
||||||
@ -17,69 +23,111 @@ draw_but_toolbar: ;
|
|||||||
and ecx,0xffff
|
and ecx,0xffff
|
||||||
@@:
|
@@:
|
||||||
inc cx
|
inc cx
|
||||||
mov edx,55*65536+25
|
bt word[panel_but+2],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;Save
|
||||||
|
@@:
|
||||||
or ecx,0x40000000
|
or ecx,0x40000000
|
||||||
|
|
||||||
inc cx
|
inc cx
|
||||||
mov edx,85*65536+25
|
bt word[panel_but+3],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,30 shl 16
|
||||||
|
call draw_but_icon ;Select word
|
||||||
|
@@:
|
||||||
|
|
||||||
call [ted_is_select]
|
call [ted_is_select]
|
||||||
cmp al,0
|
or al,al
|
||||||
jne @f
|
jnz @f
|
||||||
and ecx,0xffff
|
and ecx,0xffff
|
||||||
@@:
|
@@:
|
||||||
inc cx ; Cut
|
inc cx
|
||||||
mov edx,110*65536+25
|
bt word[panel_but+4],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;Cut
|
||||||
|
@@:
|
||||||
|
|
||||||
inc cx ; Copy
|
inc cx
|
||||||
mov edx,135*65536+25
|
bt word[panel_but+5],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
mov cx,10 ; Upper
|
call draw_but_icon ;Copy
|
||||||
mov edx,265*65536+25
|
@@:
|
||||||
call draw_but_icon
|
|
||||||
|
|
||||||
inc cx ; Lower
|
|
||||||
mov edx,290*65536+25
|
|
||||||
call draw_but_icon
|
|
||||||
|
|
||||||
inc cx ; reverse
|
|
||||||
mov edx,315*65536+25
|
|
||||||
call draw_but_icon
|
|
||||||
or ecx,0x40000000
|
or ecx,0x40000000
|
||||||
|
|
||||||
cmp dword[buf],0
|
cmp dword[buf],0
|
||||||
jne @f
|
jne @f
|
||||||
and ecx,0xffff
|
and ecx,0xffff
|
||||||
@@:
|
@@:
|
||||||
mov cx,6 ; Paste
|
inc cx
|
||||||
mov edx,160*65536+25
|
bt word[panel_but+6],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;Paste
|
||||||
|
@@:
|
||||||
or ecx,0x40000000
|
or ecx,0x40000000
|
||||||
|
|
||||||
inc cx
|
inc cx
|
||||||
mov edx,185*65536+25
|
bt word[panel_but+7],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;Found
|
||||||
|
@@:
|
||||||
|
|
||||||
inc cx
|
inc cx
|
||||||
mov edx,210*65536+25
|
bt word[panel_but+8],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;Replace
|
||||||
|
@@:
|
||||||
|
|
||||||
inc cx
|
inc cx
|
||||||
mov edx,235*65536+25
|
bt word[panel_but+9],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;Key words
|
||||||
|
@@:
|
||||||
|
|
||||||
|
call [ted_is_select]
|
||||||
|
or al,al
|
||||||
|
jnz @f
|
||||||
|
and ecx,0xffff
|
||||||
|
@@:
|
||||||
|
inc cx
|
||||||
|
bt word[panel_but+10],0
|
||||||
|
jnc @f
|
||||||
|
add edx,30 shl 16
|
||||||
|
call draw_but_icon ;Upper
|
||||||
|
@@:
|
||||||
|
|
||||||
|
inc cx
|
||||||
|
bt word[panel_but+11],0
|
||||||
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;Lower
|
||||||
|
@@:
|
||||||
|
|
||||||
|
inc cx
|
||||||
|
bt word[panel_but+12],0
|
||||||
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;Reverse
|
||||||
|
@@:
|
||||||
|
or ecx,0x40000000
|
||||||
|
|
||||||
mov ebx,ted_tim_undo
|
mov ebx,ted_tim_undo
|
||||||
cmp ted_tim_ch,ebx
|
cmp ted_tim_ch,ebx
|
||||||
jg @f
|
jg @f
|
||||||
and ecx,0xffff
|
and ecx,0xffff
|
||||||
@@:
|
@@:
|
||||||
mov cx,13
|
inc cx
|
||||||
mov edx,345*65536+25
|
bt word[panel_but+13],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,30 shl 16
|
||||||
|
call draw_but_icon ;Undo
|
||||||
|
@@:
|
||||||
or ecx,0x40000000
|
or ecx,0x40000000
|
||||||
|
|
||||||
cmp ted_tim_undo,1
|
cmp ted_tim_undo,1
|
||||||
@ -87,29 +135,47 @@ draw_but_toolbar: ;
|
|||||||
and ecx,0xffff
|
and ecx,0xffff
|
||||||
@@:
|
@@:
|
||||||
inc cx
|
inc cx
|
||||||
mov edx,370*65536+25
|
bt word[panel_but+14],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;Redo
|
||||||
|
@@:
|
||||||
or ecx,0x40000000
|
or ecx,0x40000000
|
||||||
|
|
||||||
inc cx
|
inc cx
|
||||||
mov edx,400*65536+25
|
bt word[panel_but+15],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,30 shl 16
|
||||||
|
call draw_but_icon ;Invisible on|off
|
||||||
|
@@:
|
||||||
|
|
||||||
inc cx
|
inc cx
|
||||||
mov edx,425*65536+25
|
bt word[panel_but+16],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon
|
||||||
|
@@:
|
||||||
|
|
||||||
mov cx,17 ;âûáîð ôàéëà ïîäñâåòêè
|
inc cx
|
||||||
mov edx,450*65536+25
|
bt word[panel_but+17],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;Âûáîð ôàéëà ïîäñâåòêè
|
||||||
|
@@:
|
||||||
|
|
||||||
mov cx,18 ;cp 1251 -> 866
|
inc cx
|
||||||
mov edx,480*65536+25
|
bt word[panel_but+18],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,30 shl 16
|
||||||
|
call draw_but_icon ;cp 1251 -> 866
|
||||||
|
@@:
|
||||||
|
|
||||||
mov cx,19 ;cp 866 -> 1251
|
inc cx
|
||||||
mov edx,505*65536+25
|
bt word[panel_but+19],0
|
||||||
call draw_but_icon
|
jnc @f
|
||||||
|
add edx,25 shl 16
|
||||||
|
call draw_but_icon ;cp 866 -> 1251
|
||||||
|
@@:
|
||||||
|
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
@ -309,9 +375,7 @@ draw_but_icon:
|
|||||||
and ecx,0xffff
|
and ecx,0xffff
|
||||||
imul ecx,1200
|
imul ecx,1200
|
||||||
add ebx,ecx
|
add ebx,ecx
|
||||||
mov ecx,20
|
mov ecx,(20 shl 16)+20
|
||||||
shl ecx,16
|
|
||||||
add ecx,20
|
|
||||||
int 0x40 ;ñòàâèì ðèñóíîê íà êíîïêó
|
int 0x40 ;ñòàâèì ðèñóíîê íà êíîïêó
|
||||||
pop ecx
|
pop ecx
|
||||||
@@:
|
@@:
|
||||||
|
@ -66,7 +66,7 @@ mov ebp,lib0
|
|||||||
|
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
stdcall [ted_init], tedit0
|
stdcall [ted_init], tedit0
|
||||||
stdcall dword[tl_data_init], tree1
|
stdcall [tl_data_init], tree1
|
||||||
|
|
||||||
; OpenDialog initialisation
|
; OpenDialog initialisation
|
||||||
stdcall [OpenDialog_Init],OpenDialog_data
|
stdcall [OpenDialog_Init],OpenDialog_data
|
||||||
@ -171,54 +171,95 @@ mov ebp,lib0
|
|||||||
cmp byte[eax],'.' ;䨫ìâà㥬 ä ©«ë á ¨¬¥ ¬¨ '.' ¨ '..'
|
cmp byte[eax],'.' ;䨫ìâà㥬 ä ©«ë á ¨¬¥ ¬¨ '.' ¨ '..'
|
||||||
je .filter
|
je .filter
|
||||||
;0x10000 ;1*2^16 - £¤¥ 1 ®¬¥à ¨ª®ª¨ á ª¨£®©
|
;0x10000 ;1*2^16 - £¤¥ 1 ®¬¥à ¨ª®ª¨ á ª¨£®©
|
||||||
stdcall dword[tl_node_add], tree1,0x10000,eax
|
stdcall [tl_node_add], tree1,0x10000,eax
|
||||||
stdcall dword[tl_cur_next], tree1
|
stdcall [tl_cur_next], tree1
|
||||||
.filter:
|
.filter:
|
||||||
add eax,304
|
add eax,304
|
||||||
loop @b
|
loop @b
|
||||||
stdcall dword[tl_cur_beg],tree1 ;áâ ¢¨¬ ªãàá®à ç «® ᯨáª
|
stdcall [tl_cur_beg],tree1 ;áâ ¢¨¬ ªãàá®à ç «® ᯨáª
|
||||||
.end_dir_init:
|
.end_dir_init:
|
||||||
|
|
||||||
;--- load ini file ---
|
;--- load ini file ---
|
||||||
copy_path ini_name,sys_path,file_name,0
|
copy_path ini_name,sys_path,file_name,0
|
||||||
;window startup pozition
|
;window startup pozition
|
||||||
stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_l,ini_def_window_l
|
stdcall [ini_get_int],file_name,ini_sec_window,key_window_l,ini_def_window_l
|
||||||
mov word[wnd_s_pos+2],ax
|
mov word[wnd_s_pos+2],ax
|
||||||
stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_w,ini_def_window_w
|
stdcall [ini_get_int],file_name,ini_sec_window,key_window_w,ini_def_window_w
|
||||||
mov word[wnd_s_pos],ax
|
mov word[wnd_s_pos],ax
|
||||||
stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_t,ini_def_window_t
|
stdcall [ini_get_int],file_name,ini_sec_window,key_window_t,ini_def_window_t
|
||||||
mov word[wnd_s_pos+6],ax
|
mov word[wnd_s_pos+6],ax
|
||||||
stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_h,ini_def_window_h
|
stdcall [ini_get_int],file_name,ini_sec_window,key_window_h,ini_def_window_h
|
||||||
mov word[wnd_s_pos+4],ax
|
mov word[wnd_s_pos+4],ax
|
||||||
;scrool type
|
;scrool type
|
||||||
stdcall dword[ini_get_int],file_name,ini_sec_window,key_scroll_type,ini_def_scroll_type
|
stdcall [ini_get_int],file_name,ini_sec_window,key_scroll_type,ini_def_scroll_type
|
||||||
mov [wScr.type],eax
|
mov [wScr.type],eax
|
||||||
mov [hScr.type],eax
|
mov [hScr.type],eax
|
||||||
mov [ws_dir_lbox.type],eax
|
mov [ws_dir_lbox.type],eax
|
||||||
mov [w_scr_t3.type],eax
|
mov [w_scr_t3.type],eax
|
||||||
;symbol size
|
;symbol size
|
||||||
stdcall dword[ini_get_int],file_name,ini_sec_window,key_symbol_w,ini_def_symbol_w
|
stdcall [ini_get_int],file_name,ini_sec_window,key_symbol_w,ini_def_symbol_w
|
||||||
mov dword[tedit0.rec.width],eax
|
mov dword[tedit0.rec.width],eax
|
||||||
stdcall dword[ini_get_int],file_name,ini_sec_window,key_symbol_h,ini_def_symbol_h
|
stdcall [ini_get_int],file_name,ini_sec_window,key_symbol_h,ini_def_symbol_h
|
||||||
mov dword[tedit0.rec.height],eax
|
mov dword[tedit0.rec.height],eax
|
||||||
;lea eax,[eax+eax*2]
|
;lea eax,[eax+eax*2]
|
||||||
;mov dword[tedit0.rec.top],eax
|
;mov dword[tedit0.rec.top],eax
|
||||||
;font size
|
;font size
|
||||||
stdcall dword[ini_get_int],file_name,ini_sec_window,key_font_s,ini_def_font_s
|
stdcall [ini_get_int],file_name,ini_sec_window,key_font_s,ini_def_font_s
|
||||||
shl eax,24
|
shl eax,24
|
||||||
mov dword[tedit0.font_size],eax
|
mov dword[tedit0.font_size],eax
|
||||||
|
;ª®¯ª¨ ¯ ¥«¨
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_new,1
|
||||||
|
mov byte[panel_but],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_open,1
|
||||||
|
mov byte[panel_but+1],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_save,1
|
||||||
|
mov byte[panel_but+2],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_select,1
|
||||||
|
mov byte[panel_but+3],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_cut,1
|
||||||
|
mov byte[panel_but+4],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_copy,1
|
||||||
|
mov byte[panel_but+5],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_paste,1
|
||||||
|
mov byte[panel_but+6],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_find,1
|
||||||
|
mov byte[panel_but+7],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_replace,1
|
||||||
|
mov byte[panel_but+8],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_key_words,1
|
||||||
|
mov byte[panel_but+9],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_upper,1
|
||||||
|
mov byte[panel_but+10],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_lower,1
|
||||||
|
mov byte[panel_but+11],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_reverse,1
|
||||||
|
mov byte[panel_but+12],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_undo,1
|
||||||
|
mov byte[panel_but+13],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_redo,1
|
||||||
|
mov byte[panel_but+14],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_invisible,1
|
||||||
|
mov byte[panel_but+15],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_syntax_list,1
|
||||||
|
mov byte[panel_but+16],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_syntax_mode,1
|
||||||
|
mov byte[panel_but+17],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_convert_1251_866,1
|
||||||
|
mov byte[panel_but+18],al
|
||||||
|
stdcall [ini_get_int],file_name,ini_sec_window,key_but_convert_866_1251,1
|
||||||
|
mov byte[panel_but+19],al
|
||||||
;ä ©«®¢ë¥ à áè¨à¥¨ï
|
;ä ©«®¢ë¥ à áè¨à¥¨ï
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov ebx,synt_auto_open
|
mov ebx,synt_auto_open
|
||||||
@@:
|
@@:
|
||||||
;¡¥à¥¬ ¨¬ï ä ©«
|
;¡¥à¥¬ ¨¬ï ä ©«
|
||||||
stdcall dword[ini_get_str],file_name,ini_sec_options,key_synt_file,ebx,32,ini_def_synt_f
|
stdcall [ini_get_str],file_name,ini_sec_options,key_synt_file,ebx,32,ini_def_synt_f
|
||||||
cmp byte[ebx],0
|
cmp byte[ebx],0
|
||||||
je @f
|
je @f
|
||||||
inc byte[key_synt_file.numb]
|
inc byte[key_synt_file.numb]
|
||||||
add ebx,32
|
add ebx,32
|
||||||
;¡¥à¥¬ à áè¨à¥¨ï
|
;¡¥à¥¬ à áè¨à¥¨ï
|
||||||
stdcall dword[ini_get_str],file_name,ini_sec_options,key_synt_ext,ebx,32,ini_def_synt_f
|
stdcall [ini_get_str],file_name,ini_sec_options,key_synt_ext,ebx,32,ini_def_synt_f
|
||||||
inc byte[key_synt_ext.numb]
|
inc byte[key_synt_ext.numb]
|
||||||
add ebx,32
|
add ebx,32
|
||||||
inc edx
|
inc edx
|
||||||
|
@ -7,6 +7,26 @@ symbol_w=8
|
|||||||
symbol_h=16
|
symbol_h=16
|
||||||
font_s=16
|
font_s=16
|
||||||
scroll_type=0
|
scroll_type=0
|
||||||
|
but_new=1
|
||||||
|
but_open=1
|
||||||
|
but_save=1
|
||||||
|
but_select=1
|
||||||
|
but_cut=1
|
||||||
|
but_copy=1
|
||||||
|
but_paste=1
|
||||||
|
but_find=1
|
||||||
|
but_replace=0
|
||||||
|
but_key_words=1
|
||||||
|
but_upper=1
|
||||||
|
but_lower=1
|
||||||
|
but_reverse=0
|
||||||
|
but_undo=1
|
||||||
|
but_redo=1
|
||||||
|
but_invisible=1
|
||||||
|
but_syntax_list=1
|
||||||
|
but_syntax_mode=1
|
||||||
|
but_convert_1251_866=1
|
||||||
|
but_convert_866_1251=1
|
||||||
[Options]
|
[Options]
|
||||||
syntax_0=asm.syn
|
syntax_0=asm.syn
|
||||||
ext_0=asm
|
ext_0=asm
|
||||||
|
Loading…
Reference in New Issue
Block a user