1) 'box_lib.obj' update 't_edit' version 3

2) 'Text Editor' use new version syntax files

git-svn-id: svn://kolibrios.org@2102 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA
2011-08-22 15:58:27 +00:00
parent 1b390fd667
commit 473d944dfa
32 changed files with 16658 additions and 48 deletions
@@ -48,7 +48,7 @@ use_checkbox_mouse ;macro reveals processing function of the mouse.
;CheckBox2
;----------------------------------------------------
align 16
_init_checkbox2 ;macro for init checkbox
_init_checkbox2 ;macro for init checkbox
align 16
use_checkbox_draw2 ;macro reveals the function of the display.
align 16
@@ -227,7 +227,7 @@ dd sz_ted_but_redo, ted_but_redo
dd sz_ted_but_reverse, ted_but_reverse
dd sz_ted_but_find_next, ted_but_find_next
dd sz_ted_text_colored, ted_text_colored
dd sz_ted_version, 0x00000002
dd sz_ted_version, 0x00000003
dd 0,0
@@ -1,6 +1,6 @@
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 09.06.2010 IgorA
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 22.08.2011 IgorA
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
;input:
@@ -37,11 +37,12 @@ struct TexSelect
ends
struct TexColViv
Text rb MAX_COLOR_WORD_LEN ; á«®¢® ¤«ï ¯®¤á¢¥âª¨
f1 dd 0 ; á¯à ¢ª  ¯® á«®¢ã
wwo db ? ; whole words only
endc db ? ; ᨬ¢®« ª®­æ  ¢ë¤¥«¥­¨ï (wwo&4)
color db ? ; ­®¬¥à 梥â 
Text rb MAX_COLOR_WORD_LEN ; á«®¢® ¤«ï ¯®¤á¢¥âª¨
f1 dd 0 ; á¯à ¢ª  ¯® á«®¢ã
flags db ? ; f1+4 ä« £¨ ¨á¯®«ì§ã¥¬ë¥ ¯à¨ ¢ë¤¥«¥­¨¨
endc db ? ; f1+5 ᨬ¢®« ª®­æ  ¢ë¤¥«¥­¨ï (¨á¯®«ì§ã¥âáï ¯à¨ flags&4)
escc db ? ; f1+6 íªà ­¨àãî騩 ᨬ¢®« (¨á¯®«ì§ã¥âáï ¯à¨ flags&4)
color db ? ; f1+7 ­®¬¥à 梥â 
ends
struct symbol
@@ -807,10 +808,10 @@ proc ted_init_syntax_file, edit:dword, file:dword, f_name:dword
loop @b
;init: ted_help_text_f1
mov ecx,ted_key_words_count
imul ecx,sizeof.TexColViv
add ecx,ted_key_words_data
mov ted_help_text_f1,ecx
mov ecx,ted_key_words_count ;ª®«¨ç¥á⢮ ª«î祢ëå á«®¢
imul ecx,sizeof.TexColViv ;à §¬¥à áâàãªâãàë á 1-¬ ª«. á«.
add ecx,ted_key_words_data ;­ ç «® ä ©«  á ª«. á«.
mov ted_help_text_f1,ecx ;¬¥âª  ¢ ¯ ¬ïâ¨, £¤¥ ­ ç¨­¥âáï ⥪áâ á® á¯à ¢ª®©
stdcall ted_init_scroll_bars,edi,1 ;¬¥­ï¥¬ æ¢¥â  áªà®««¨­£®¢
.no_colors:
@@ -972,21 +973,30 @@ ted_iterat_next:
;input:
; bl = symbol end of select
; bh = íªà ­¨àãî騩 ᨬ¢®« (= 0 ¥á«¨ ­¥â ¯à®¢¥àª¨ ­  ­¨å)
; edx = pointer to symbol struct
; edi = pointer to tedit struct
;description:
; ­ ©â¨ á«¥¤ãîéãî ¯®§¨æ¨î 㪠§ ­­®£® ᨬ¢®« 
align 4
ted_iterat_next_pos_char:
push ax
mov al,1 ;¯à¥¤ë¤ã騩 ᨬ¢®«, á«ã¦¨â ¤«ï áà ¢­¥­¨ï á ᨬ¢®«®¬ bh
@@:
cmp bl,byte[edx]
je @f
je .found
.no_found:
cmp edx,ted_tex_1
jle @f
mov al,byte[edx]
call ted_iterat_next
jmp @b
.found:
cmp bh,al
je .no_found
@@:
call ted_iterat_next
pop ax
ret
;input:
@@ -2121,7 +2131,7 @@ endl
jne .if_0 ;if(Col[word_n].Text[pos]==0){
mov dword[endPos],edx ;eP=i;
ColToIndexOffset eax,ebx
mov bl,byte[ebx+MAX_COLOR_WORD_LEN+6]
mov bl,byte[ebx+MAX_COLOR_WORD_LEN+7]
mov byte[f_color],bl ;f_color=Col[word_n].color;
mov byte[find],1
@@ -2171,7 +2181,7 @@ mov byte[find],1
btr bx,2 ;3-1
jae .if_7e ;if(Col[word_n].wwo&4)
ColToIndexOffset eax,ebx
mov bl,byte[ebx+MAX_COLOR_WORD_LEN+5]
mov bx,word[ebx+MAX_COLOR_WORD_LEN+5]
call ted_iterat_next_pos_char
cmp edx,ted_tex_1
jle .if_7e
@@ -3308,7 +3318,7 @@ proc ted_draw_help_f1
;SetTextColor
xor eax,eax
mov al,byte[edx+MAX_COLOR_WORD_LEN+6]
mov al,byte[edx+MAX_COLOR_WORD_LEN+7]
shl ax,2
mov ecx,ted_text_colors
add ecx,eax
@@ -3947,7 +3957,7 @@ proc ted_but_save_file, edit:dword, file:dword, f_name:dword
stdcall ted_can_save,edi
cmp al,0
je .no_save
; je .no_save
mov ecx,ted_max_chars
invoke mem.alloc,ecx