forked from KolibriOS/kolibrios
fix & update 'kol_f_edit'
git-svn-id: svn://kolibrios.org@1711 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5ce26ca2da
commit
8020de982d
Binary file not shown.
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 30 KiB |
Binary file not shown.
@ -118,7 +118,12 @@ macro insert_ret
|
||||
|
||||
|
||||
align 4
|
||||
but_code_gen:
|
||||
but_update:
|
||||
call draw_constructor
|
||||
cmp byte[show_mode],0 ;óñëîâèå âèäèìîñòè îêíà êîíñòðóêòîðà
|
||||
jne @f
|
||||
stdcall [buf2d_draw], buf_fon
|
||||
@@:
|
||||
call code_gen
|
||||
cmp byte[show_mode],1 ;óñëîâèå âèäèìîñòè òåêñòîâîãî îêíà
|
||||
jne @f
|
||||
@ -163,12 +168,11 @@ push ebx
|
||||
jne @f
|
||||
stdcall get_code_struct,eax ;îáðàáîòêà îáúåêòà
|
||||
stdcall dword[tl_node_poi_get_next_info], esi,tree2
|
||||
pop ecx ;ïåðåõîäèì ê ñëåäóùåìó óçëó
|
||||
cmp ecx,0
|
||||
je .find_no
|
||||
cmp byte[ecx+2],bl ;lev
|
||||
pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó
|
||||
cmp esi,0
|
||||
je .end_st
|
||||
cmp byte[esi+2],bl ;lev
|
||||
jle .end_st
|
||||
mov esi,ecx
|
||||
push bx
|
||||
mov bl,byte[esi+2]
|
||||
call code_gen_obj ;ðåêóðñèâíûé âûçîâ äî÷åðíèõ îáúåêòîâ
|
||||
@ -362,11 +366,46 @@ proc get_code_auto_data_el
|
||||
stdcall insert_text,edx
|
||||
|
||||
stdcall insert_text, txt_mouse_dd
|
||||
|
||||
stdcall insert_text, txt_0 ;òóò áóäóò ñâîéñòâà editbox à ïîêà ïðîñòî ñòàâèì 0
|
||||
xchg eax,edx ;ñîõðàíÿåì çíà÷åíèå edx
|
||||
stdcall get_obj_text_col,ebx,10
|
||||
cmp byte[edx],0 ;ïðîâåðÿåì ïóñòàÿ ëè ñòðîêà ïðè çàïóñêå editbox
|
||||
je .null_string
|
||||
xchg eax,edx ;âîñòàíàâëèâàåì çíà÷åíèå edx
|
||||
stdcall insert_text, txt_coma
|
||||
|
||||
stdcall insert_text, txt_txt
|
||||
stdcall insert_text,edx
|
||||
stdcall insert_text,txt_met_end
|
||||
stdcall insert_text,txt_minus
|
||||
stdcall insert_text, txt_txt
|
||||
stdcall insert_text,edx
|
||||
stdcall insert_text,txt_minus
|
||||
stdcall insert_text, txt_1
|
||||
stdcall insert_text, txt_coma
|
||||
|
||||
stdcall insert_text, txt_txt
|
||||
stdcall insert_text,edx
|
||||
stdcall insert_text,txt_met_end
|
||||
stdcall insert_text,txt_minus
|
||||
stdcall insert_text, txt_txt
|
||||
stdcall insert_text,edx
|
||||
stdcall insert_text,txt_minus
|
||||
stdcall insert_text, txt_1
|
||||
.null_string:
|
||||
insert_nl
|
||||
@@:
|
||||
cmp byte[ebx],C_DT
|
||||
jne @f
|
||||
stdcall insert_text, txt_txt
|
||||
mov edx,fp_icon
|
||||
stdcall get_obj_id, ebx,edx
|
||||
stdcall insert_text,edx
|
||||
stdcall insert_text, txt_db
|
||||
stdcall insert_text_prop, ebx,0
|
||||
insert_nl
|
||||
@@:
|
||||
;cmp byte[ebx],C_CB
|
||||
;jne @f
|
||||
;@@:
|
||||
|
||||
stdcall dword[tl_node_poi_get_next_info], esi,tree2
|
||||
pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó
|
||||
@ -631,22 +670,52 @@ proc get_code_auto_data_dop
|
||||
jne @f
|
||||
;1,2,3,4,...,6,...8,...,10 - w,x,y,col_fon,...,col_frame,...,col_txt,...,txt
|
||||
stdcall insert_text, txt_txt
|
||||
|
||||
mov edx,fp_icon
|
||||
stdcall get_obj_id, ebx,edx
|
||||
stdcall str_len,edx ;eax = len(fp_icon)
|
||||
stdcall [ted_text_add], tedit0,edx,eax,ted_opt_ed_move_cursor
|
||||
stdcall insert_text, txt_times
|
||||
stdcall insert_text,edx
|
||||
|
||||
stdcall get_obj_text_col,ebx,9
|
||||
stdcall str_len,edx
|
||||
stdcall [ted_text_add], tedit0,edx,eax,ted_opt_ed_move_cursor
|
||||
stdcall get_obj_text_col,ebx,10
|
||||
cmp byte[edx],0
|
||||
je .no_text
|
||||
stdcall insert_text, txt_d_poi
|
||||
stdcall insert_text, txt_db
|
||||
stdcall insert_text, txt_str_beg
|
||||
stdcall str_len,edx
|
||||
stdcall [ted_text_add], tedit0,edx,eax,ted_opt_ed_move_cursor
|
||||
stdcall insert_text, txt_str_end
|
||||
insert_nl
|
||||
|
||||
insert_plus
|
||||
stdcall insert_text, txt_2
|
||||
stdcall insert_text, txt_db
|
||||
insert_0
|
||||
insert_nl
|
||||
insert_tab
|
||||
stdcall insert_text, txt_met_end
|
||||
stdcall insert_text, txt_rb
|
||||
stdcall insert_text, txt_txt
|
||||
mov edx,fp_icon
|
||||
stdcall get_obj_id, ebx,edx
|
||||
stdcall insert_text,edx
|
||||
|
||||
stdcall insert_text, txt_minus
|
||||
stdcall insert_text, txt_txt
|
||||
stdcall insert_text,edx
|
||||
stdcall insert_text, txt_met_end
|
||||
|
||||
insert_plus
|
||||
stdcall insert_text_prop,ebx,9
|
||||
insert_plus
|
||||
stdcall insert_text, txt_3
|
||||
|
||||
insert_nl
|
||||
|
||||
jmp @f
|
||||
|
||||
.no_text: ;ïåðâîíà÷àëüíî òåêñò íå çàäàí
|
||||
stdcall insert_text, txt_times
|
||||
|
||||
stdcall insert_text_prop,ebx,9
|
||||
insert_plus
|
||||
stdcall insert_text, txt_2
|
||||
stdcall insert_text, txt_db
|
||||
insert_0
|
||||
insert_nl
|
||||
@@:
|
||||
;cmp byte[ebx],C_CB
|
||||
;jne @f
|
||||
@ -1018,6 +1087,49 @@ proc get_code_draw_obj
|
||||
stdcall insert_text, txt_i_40
|
||||
insert_nl
|
||||
@@:
|
||||
cmp byte[ebx],C_DT ;ðèñîâàíèå òåêñòà ÷åðåç ñèñò. ô. 4
|
||||
jne @f
|
||||
insert_tab
|
||||
stdcall insert_text, txt_mov
|
||||
insert_reg txt_eax
|
||||
insert_coma
|
||||
stdcall insert_text, txt_4
|
||||
insert_nl
|
||||
|
||||
insert_tab
|
||||
stdcall insert_text, txt_mov
|
||||
insert_reg txt_ebx
|
||||
insert_coma
|
||||
stdcall insert_text_prop, ebx,1
|
||||
insert_i65p
|
||||
stdcall insert_text_prop, ebx,2
|
||||
insert_nl
|
||||
|
||||
insert_tab
|
||||
stdcall insert_text, txt_mov
|
||||
insert_reg txt_ecx
|
||||
insert_coma
|
||||
stdcall insert_text_prop, ebx,3
|
||||
insert_nl
|
||||
|
||||
;or ecx,0x80000000
|
||||
|
||||
insert_tab
|
||||
stdcall insert_text, txt_mov
|
||||
insert_reg txt_edx
|
||||
insert_coma
|
||||
stdcall insert_text, txt_txt
|
||||
mov edx,fp_icon
|
||||
stdcall get_obj_id, ebx,edx
|
||||
stdcall insert_text,edx
|
||||
insert_nl
|
||||
|
||||
;mov esi,...
|
||||
|
||||
insert_tab
|
||||
stdcall insert_text, txt_i_40
|
||||
insert_nl
|
||||
@@:
|
||||
|
||||
stdcall dword[tl_node_poi_get_next_info], esi,tree2
|
||||
pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó
|
||||
@ -1104,6 +1216,8 @@ txt_3 db '3',0
|
||||
txt_4 db '4',0
|
||||
txt_8 db '8',0
|
||||
txt_plus db '+',0
|
||||
txt_minus db '-',0
|
||||
;txt_dol db '$',0
|
||||
txt_nl db 13,0
|
||||
txt_com db ';',0
|
||||
txt_sp db ' ',0
|
||||
@ -1112,6 +1226,7 @@ txt_br db '\',13,9,0
|
||||
txt_txt db 'txt_',0
|
||||
txt_db db ' db ',0
|
||||
txt_dd db ' dd ',0
|
||||
txt_rb db ' rb ',0
|
||||
txt_dd_0_0 db 9,'dd 0,0',13,0
|
||||
txt_mouse_dd db ', mouse_dd, ',0
|
||||
txt_times db ':',13,9,'times ',0
|
||||
@ -1134,6 +1249,7 @@ txt_ll_end db 'l_libs_end:',13,0
|
||||
txt_but_create db '0x40000000',0 ;tmp
|
||||
txt_0x33000000 db '0x33000000',0 ;tmp
|
||||
txt_struct db 'struct ',0
|
||||
txt_met_end db '.end',0
|
||||
txt_ends db 'ends',13,13,0
|
||||
txt_mov db 'mov ',0
|
||||
txt_xor db 'xor ',0
|
||||
|
@ -1,5 +1,5 @@
|
||||
align 4
|
||||
draw_obj_info:
|
||||
draw_obj_info: ;®ª® ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ
|
||||
mov eax,13 ;rect
|
||||
mov edx,WND_CAPT_COLOR
|
||||
mov ebx,[wndObjI.left]
|
||||
@ -19,7 +19,7 @@ draw_obj_info:
|
||||
mov edx,WND_CAPT_COLOR
|
||||
int 0x40
|
||||
|
||||
mov edx,[foc_obj] ;init icon pointers
|
||||
mov edx,[foc_obj] ;¡¥à¥¬ 㪠§ â¥«ì ®¡ê¥ªâ
|
||||
cmp edx,0
|
||||
je .exit_fun
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@ -43,21 +43,35 @@ draw_obj_info:
|
||||
int 0x40
|
||||
|
||||
mov eax,8 ;ª®¯ª ¤«ï á®åà ¥¨ï ¨§¬¥¥¨©
|
||||
mov ebx,125*65536+20
|
||||
mov ecx,161*65536+10
|
||||
mov ebx,[wndObjI.left]
|
||||
add ebx,119
|
||||
shl ebx,16
|
||||
add ebx,18
|
||||
mov ecx,[wndObjI.top]
|
||||
add ecx,1
|
||||
shl ecx,16
|
||||
add ecx,18
|
||||
mov edx,10
|
||||
mov esi,0xd040
|
||||
int 0x40
|
||||
|
||||
ror ebx,16 ;¢ëç¨á«ï¥¬ ª®®à¤¨ âë ¤«ï ¨ª®ª¨
|
||||
ror ecx,16
|
||||
and ebx,0xffff
|
||||
and ecx,0xffff
|
||||
inc ebx
|
||||
inc ecx
|
||||
stdcall draw_icon, 17,ebx,ecx ;17 - save
|
||||
|
||||
mov edi,edit2
|
||||
.cycle:
|
||||
stdcall [edit_box_draw], edi ;à¨á㥬 ¯®«ï ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ
|
||||
add edi,ed_struc_size
|
||||
cmp edi,prop_wnd_edits_end
|
||||
jl .cycle
|
||||
|
||||
popad
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
stdcall [edit_box_draw], dword edit2
|
||||
stdcall [edit_box_draw], dword edit3
|
||||
stdcall [edit_box_draw], dword edit4
|
||||
stdcall [edit_box_draw], dword edit5
|
||||
stdcall [edit_box_draw], dword edit6
|
||||
stdcall [edit_box_draw], dword edit7
|
||||
stdcall [edit_box_draw], dword edit8
|
||||
stdcall [edit_box_draw], dword edit9
|
||||
|
||||
xor ebx,ebx ;®¬¥à ¯®«ï
|
||||
.draw_column:
|
||||
@ -122,34 +136,35 @@ but_element_change:
|
||||
cmp dword[foc_obj],0
|
||||
je @f
|
||||
pushad
|
||||
stdcall get_obj_win_param, 0,edit2
|
||||
stdcall get_obj_win_param, 1,edit3
|
||||
stdcall get_obj_win_param, 2,edit4
|
||||
stdcall get_obj_win_param, 3,edit5
|
||||
stdcall get_obj_win_param, 4,edit6
|
||||
stdcall get_obj_win_param, 5,edit7
|
||||
stdcall get_obj_win_param, 6,edit8
|
||||
stdcall get_obj_win_param, 7,edit9
|
||||
xor ebx,ebx
|
||||
mov edi,edit2
|
||||
.cycle:
|
||||
call get_obj_win_param
|
||||
inc ebx
|
||||
add edi,ed_struc_size
|
||||
cmp edi,prop_wnd_edits_end
|
||||
jl .cycle
|
||||
popad
|
||||
@@:
|
||||
call draw_constructor ;®¡®¢«ï¥¬ ®ª® ª®áâàãªâ®à
|
||||
call draw_window
|
||||
ret
|
||||
|
||||
;input:
|
||||
; ebx - property column
|
||||
; edi - pointer to property editbox
|
||||
align 4
|
||||
proc get_obj_win_param, col:dword, edit:dword
|
||||
;pushad
|
||||
stdcall get_obj_text_col, [foc_obj], [col] ;edx - ᬥ饨¥ ¤«ï ⥪áâ
|
||||
stdcall get_obj_text_len_col, [foc_obj], [col] ;eax - ¤«¨ ¯®«ï
|
||||
cld
|
||||
mov edi,[edit]
|
||||
get_obj_win_param:
|
||||
pushad
|
||||
mov esi,ed_text
|
||||
stdcall get_obj_text_col, [foc_obj], ebx ;edx - ᬥ饨¥ ¤«ï ⥪áâ
|
||||
stdcall get_obj_text_len_col, [foc_obj], ebx ;eax - ¤«¨ ¯®«ï
|
||||
cld
|
||||
mov edi,edx
|
||||
mov ecx,eax
|
||||
rep movsb
|
||||
popad
|
||||
ret
|
||||
;popad
|
||||
endp
|
||||
|
||||
;input:
|
||||
; obj - pointer to object
|
||||
@ -269,7 +284,7 @@ proc draw_icon_obj, o_type:dword,n_col:dword, coord_y:dword
|
||||
mov eax,7
|
||||
mov ecx,0x100010 ;ecx - size:16*16
|
||||
mov edx,[wndObjI.left]
|
||||
add edx,5
|
||||
add edx,3 ;®âáâ㯠®â «¥¢®£® ªà ï à ¬ª¨ ¤® ¨ª®ª¨
|
||||
shl edx,16
|
||||
add edx,[coord_y]
|
||||
int 0x40
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 26 KiB |
@ -19,7 +19,7 @@ include 'strlen.inc'
|
||||
|
||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load
|
||||
|
||||
hed db 'kol_f_edit 20.11.10',0
|
||||
hed db 'kol_f_edit 29.11.10',0
|
||||
|
||||
sizeof.TreeList equ 20 ;need for element 'tree_list'
|
||||
|
||||
@ -140,7 +140,7 @@ fn_font_s1 db 'font6x9.bmp',0
|
||||
IMAGE_FILE_FONT1_SIZE equ 96*144*3 ;à §¬¥à ä ©« á 1-¬ á¨áâ¥¬ë¬ èà¨ä⮬
|
||||
|
||||
fn_icon db 'icon.bmp',0
|
||||
count_main_icons equ 33 ;ç¨á«® ¨ª®®ª ¢ ä ©«¥ icon.bmp
|
||||
count_main_icons equ 35 ;ç¨á«® ¨ª®®ª ¢ ä ©«¥ icon.bmp
|
||||
bmp_icon rb 0x300*count_main_icons
|
||||
|
||||
fn_icon_tl_sys db 'tl_sys_16.png',0
|
||||
@ -183,9 +183,12 @@ start:
|
||||
mov eax,[wndObjI.top]
|
||||
add eax,[recMain.top]
|
||||
inc eax
|
||||
mov ebx,[wndObjI.left]
|
||||
add ebx,16+6 ;è¨à¨ ¨ª®ª¨ + ®âáâã¯ë
|
||||
mov edi,edit2
|
||||
@@:
|
||||
mov ed_top,eax
|
||||
mov ed_top,eax ;®âáâ㯠ᢥàåã
|
||||
mov ed_left,ebx ;®âáâ㯠᫥¢
|
||||
add edi,ed_struc_size
|
||||
add eax,[recMain.height]
|
||||
cmp edi,prop_wnd_edits_end
|
||||
@ -367,7 +370,7 @@ pushad
|
||||
int 0x40
|
||||
stdcall draw_icon, 11,331,6 ;11 - text
|
||||
|
||||
;button 'Update Code'
|
||||
;button 'Update: Code, Constructor'
|
||||
mov ebx,350*65536+18
|
||||
mov edx,13
|
||||
int 0x40
|
||||
@ -391,40 +394,54 @@ pushad
|
||||
int 0x40
|
||||
stdcall draw_icon, 19,411,6
|
||||
|
||||
;button 'Move Up'
|
||||
mov ebx,160*65536+18
|
||||
;button 'Add Object'
|
||||
mov ebx,125*65536+18
|
||||
mov ecx,30*65536+18
|
||||
mov edx,31
|
||||
int 0x40
|
||||
stdcall draw_icon, 14,126,31 ;14 - add object
|
||||
|
||||
;button 'Move Up'
|
||||
mov ebx,155*65536+18
|
||||
mov edx,21
|
||||
int 0x40
|
||||
stdcall draw_icon, 23,161,31 ;23 - move up
|
||||
stdcall draw_icon, 23,156,31 ;23 - move up
|
||||
|
||||
;button 'Move Down'
|
||||
mov ebx,180*65536+18
|
||||
mov ecx,30*65536+18
|
||||
mov ebx,175*65536+18
|
||||
mov edx,22
|
||||
int 0x40
|
||||
stdcall draw_icon, 24,181,31 ;24 - move down
|
||||
stdcall draw_icon, 24,176,31 ;24 - move down
|
||||
|
||||
;button 'Copy'
|
||||
mov ebx,200*65536+18
|
||||
mov ecx,30*65536+18
|
||||
mov ebx,195*65536+18
|
||||
mov edx,23
|
||||
int 0x40
|
||||
stdcall draw_icon, 30,201,31 ;30 - copy
|
||||
stdcall draw_icon, 30,196,31 ;30 - copy
|
||||
|
||||
;button 'Paste'
|
||||
mov ebx,220*65536+18
|
||||
mov ecx,30*65536+18
|
||||
mov ebx,215*65536+18
|
||||
mov edx,24
|
||||
int 0x40
|
||||
stdcall draw_icon, 31,221,31 ;31 - paste
|
||||
stdcall draw_icon, 31,216,31 ;31 - paste
|
||||
|
||||
;button 'Property'
|
||||
mov ebx,240*65536+18
|
||||
mov ecx,30*65536+18
|
||||
mov ebx,235*65536+18
|
||||
mov edx,25
|
||||
int 0x40
|
||||
stdcall draw_icon, 7,241,31 ;7 - property
|
||||
stdcall draw_icon, 7,236,31 ;7 - property
|
||||
|
||||
;button 'Undo'
|
||||
mov ebx,255*65536+18
|
||||
mov edx,26
|
||||
int 0x40
|
||||
stdcall draw_icon, 33,256,31 ;33 - undo
|
||||
|
||||
;button 'Redo'
|
||||
mov ebx,275*65536+18
|
||||
mov edx,27
|
||||
int 0x40
|
||||
stdcall draw_icon, 34,276,31 ;34 - redo
|
||||
|
||||
; 10 30 50 70 90
|
||||
|
||||
@ -468,14 +485,14 @@ popad
|
||||
align 4
|
||||
mouse:
|
||||
stdcall [edit_box_mouse], dword edit1
|
||||
stdcall [edit_box_mouse], dword edit2
|
||||
stdcall [edit_box_mouse], dword edit3
|
||||
stdcall [edit_box_mouse], dword edit4
|
||||
stdcall [edit_box_mouse], dword edit5
|
||||
stdcall [edit_box_mouse], dword edit6
|
||||
stdcall [edit_box_mouse], dword edit7
|
||||
stdcall [edit_box_mouse], dword edit8
|
||||
stdcall [edit_box_mouse], dword edit9
|
||||
push edi
|
||||
mov edi,edit2
|
||||
.cycle:
|
||||
stdcall [edit_box_mouse], edi
|
||||
add edi,ed_struc_size
|
||||
cmp edi,prop_wnd_edits_end
|
||||
jl .cycle
|
||||
pop edi
|
||||
stdcall [edit_box_mouse], dword edit_sav
|
||||
stdcall [tl_mouse], dword tree1
|
||||
stdcall [tl_mouse], dword tree2
|
||||
@ -490,14 +507,14 @@ align 4
|
||||
key:
|
||||
mcall 2
|
||||
stdcall [edit_box_key], dword edit1
|
||||
stdcall [edit_box_key], dword edit2
|
||||
stdcall [edit_box_key], dword edit3
|
||||
stdcall [edit_box_key], dword edit4
|
||||
stdcall [edit_box_key], dword edit5
|
||||
stdcall [edit_box_key], dword edit6
|
||||
stdcall [edit_box_key], dword edit7
|
||||
stdcall [edit_box_key], dword edit8
|
||||
stdcall [edit_box_key], dword edit9
|
||||
push edi
|
||||
mov edi,edit2
|
||||
.cycle:
|
||||
stdcall [edit_box_key], edi
|
||||
add edi,ed_struc_size
|
||||
cmp edi,prop_wnd_edits_end
|
||||
jl .cycle
|
||||
pop edi
|
||||
stdcall [edit_box_key], dword edit_sav
|
||||
stdcall [tl_key], dword tree1
|
||||
stdcall [tl_key], dword tree2
|
||||
@ -538,7 +555,7 @@ button:
|
||||
@@:
|
||||
cmp ah,13
|
||||
jne @f
|
||||
call but_code_gen
|
||||
call but_update
|
||||
@@:
|
||||
cmp ah,14
|
||||
jne @f
|
||||
@ -572,6 +589,20 @@ button:
|
||||
jne @f
|
||||
call on_file_object_select
|
||||
@@:
|
||||
cmp ah,26
|
||||
jne @f
|
||||
stdcall [tl_info_undo], tree2
|
||||
stdcall [tl_draw], tree2
|
||||
@@:
|
||||
cmp ah,27
|
||||
jne @f
|
||||
stdcall [tl_info_redo], tree2
|
||||
stdcall [tl_draw], tree2
|
||||
@@:
|
||||
cmp ah,31
|
||||
jne @f
|
||||
call on_add_object
|
||||
@@:
|
||||
cmp ah,1
|
||||
jne still
|
||||
.exit:
|
||||
@ -629,7 +660,12 @@ but_open_proj:
|
||||
.zero:
|
||||
shl ecx,16 ;¢ ecx ¨¤¥ªá ¨ª®ª¨
|
||||
mov cl,byte[eax+1+MAX_LEN_OBJ_TXT] ;ã஢¥ì ®¡ê¥ªâ
|
||||
|
||||
;tl_node_close_open - ¥ ¯®¤å®¤¨â, â.ª. ¤¥©áâ¢ã¥â ã§«ë ¨¬¥î騥 ¤®ç¥à¨¥
|
||||
mov ch,byte[eax+2+MAX_LEN_OBJ_TXT] ;§ ªàëâë©/®âªàëâë©
|
||||
|
||||
stdcall dword[tl_node_add], eax, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
|
||||
|
||||
stdcall dword[tl_cur_next], tree2 ;¯¥à¥®á¨¬ ªãàá®à ¢¨§, çâ®-¡ë ¥ ¯®¬¥ï«áï ¯®à冷ª
|
||||
add eax,sizeof.object ;¯¥à¥å®¤ á«¥¤ãî騩 ®¡ê¥ªâ
|
||||
jmp @b
|
||||
@ -661,6 +697,8 @@ but_save_proj:
|
||||
|
||||
mov bl,byte[edx+2] ;bl - ã஢¥ì ®¡ê¥ªâ
|
||||
mov byte[esi+1+MAX_LEN_OBJ_TXT],bl
|
||||
mov bl,byte[edx+3] ;bl - ®âªàë⨥/§ ªàë⨥ ®¡ê¥ªâ
|
||||
mov byte[esi+2+MAX_LEN_OBJ_TXT],bl
|
||||
|
||||
;¢ëç¨á«ï¥¬ ®¢ë© ¨¤¥ªá ¤«ï ⨯ ®¡ê¥ªâ
|
||||
mov ebx,[esi+3+8+MAX_LEN_OBJ_TXT] ;ebx - ⨯ ®¡ê¥ªâ
|
||||
@ -786,18 +824,44 @@ on_file_object_select:
|
||||
pop dword[foc_obj]
|
||||
cmp dword[foc_obj],0
|
||||
je @f
|
||||
stdcall set_obj_win_param, 0,edit2
|
||||
stdcall set_obj_win_param, 1,edit3
|
||||
stdcall set_obj_win_param, 2,edit4
|
||||
stdcall set_obj_win_param, 3,edit5
|
||||
stdcall set_obj_win_param, 4,edit6
|
||||
stdcall set_obj_win_param, 5,edit7
|
||||
stdcall set_obj_win_param, 6,edit8
|
||||
stdcall set_obj_win_param, 7,edit9
|
||||
push ebx edi
|
||||
xor ebx,ebx
|
||||
mov edi,edit2
|
||||
.cycle:
|
||||
stdcall set_obj_win_param, ebx,edi
|
||||
inc ebx
|
||||
add edi,ed_struc_size
|
||||
cmp edi,prop_wnd_edits_end
|
||||
jl .cycle
|
||||
pop edi ebx
|
||||
@@:
|
||||
call draw_window
|
||||
ret
|
||||
|
||||
align 4
|
||||
proc set_obj_win_param, col:dword, edit:dword
|
||||
pushad
|
||||
stdcall get_obj_text_col, [foc_obj], [col] ;edx - text
|
||||
stdcall get_obj_text_len_col, [foc_obj], [col] ;eax - ¤«¨ ¯®«ï
|
||||
mov edi,[edit]
|
||||
cmp eax,1
|
||||
jl @f
|
||||
dec eax
|
||||
mov ed_max,eax ;ed_max = edi+.max
|
||||
mov ed_focus_border_color, dword 0xff
|
||||
mov ed_blur_border_color, dword 0x808080
|
||||
stdcall [edit_box_set_text], edi,edx ;®¡®¢«ï¥¬ editbox
|
||||
jmp .end_f
|
||||
@@:
|
||||
mov ed_max,dword MAX_LEN_OBJ_TXT
|
||||
mov ed_focus_border_color, dword 0xffffff ;¤¥« ¥¬ ¥¢¨¤¨¬ãî ªâ¨¢ãî à ¬ªã
|
||||
mov ed_blur_border_color, dword 0xffffff ;¤¥« ¥¬ ¥¢¨¤¨¬ãî ä®®¢ãî à ¬ªã
|
||||
stdcall [edit_box_set_text], edi,txt_null
|
||||
.end_f:
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
;äãªæ¨ï ¢ë§ë¢ ¥¬ ï ¯à¨ ¦ ⨨ Enter ¢ ®ª¥ tree1
|
||||
;¤®¡ ¢«ï¥â ®¢ë© ®¡ê¥ªâ ¢ ®ª® tree2
|
||||
align 4
|
||||
@ -810,32 +874,15 @@ push eax ebx ecx
|
||||
xor ecx,ecx
|
||||
mov cx,word[eax+obj_opt.img-obj_opt] ;cx - ¨¤¥ªá £« ¢®© ¨ª®ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ
|
||||
shl ecx,16
|
||||
stdcall dword[tl_node_add], eax, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
|
||||
stdcall mem_clear, u_object,sizeof.object
|
||||
mov bl,byte[eax]
|
||||
mov byte[u_object.c],bl
|
||||
stdcall dword[tl_node_add], u_object, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
|
||||
@@:
|
||||
pop ecx ebx eax
|
||||
call draw_window
|
||||
ret
|
||||
|
||||
align 4
|
||||
proc set_obj_win_param, col:dword, edit:dword
|
||||
pushad
|
||||
stdcall get_obj_text_col, [foc_obj], [col]
|
||||
stdcall get_obj_text_len_col, [foc_obj], [col] ;eax - ¤«¨ ¯®«ï
|
||||
mov edi,[edit]
|
||||
cmp eax,1
|
||||
jl @f
|
||||
dec eax
|
||||
mov ed_max,eax ;ed_max = edi+.max
|
||||
stdcall [edit_box_set_text], edi,edx ;®¡®¢«ï¥¬ editbox
|
||||
jmp .end_f
|
||||
@@:
|
||||
mov ed_max,dword MAX_LEN_OBJ_TXT
|
||||
stdcall [edit_box_set_text], edi,txt_null
|
||||
.end_f:
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
but_ctrl_o:
|
||||
ret
|
||||
@ -911,6 +958,9 @@ edit6 edit_box 115, 32, 20, 0xffffff, 0x80ff, 0xff, 0x808080, 0, MAX_LEN_OBJ_TXT
|
||||
edit7 edit_box 115, 32, 20, 0xffffff, 0x80ff, 0xff, 0x808080, 0, MAX_LEN_OBJ_TXT, ed_text7, mouse_dd, 0
|
||||
edit8 edit_box 115, 32, 20, 0xffffff, 0x80ff, 0xff, 0x808080, 0, MAX_LEN_OBJ_TXT, ed_text8, mouse_dd, 0
|
||||
edit9 edit_box 115, 32, 20, 0xffffff, 0x80ff, 0xff, 0x808080, 0, MAX_LEN_OBJ_TXT, ed_text9, mouse_dd, 0
|
||||
edit10 edit_box 115, 32, 20, 0xffffff, 0x80ff, 0xff, 0x808080, 0, MAX_LEN_OBJ_TXT, ed_text10, mouse_dd, 0
|
||||
edit11 edit_box 115, 32, 20, 0xffffff, 0x80ff, 0xff, 0x808080, 0, MAX_LEN_OBJ_TXT, ed_text11, mouse_dd, 0
|
||||
edit12 edit_box 115, 32, 20, 0xffffff, 0x80ff, 0xff, 0x808080, 0, MAX_LEN_OBJ_TXT, ed_text12, mouse_dd, 0
|
||||
prop_wnd_edits_end: ;ª®¥æ ⥪á⮢ëå ¯®«¥©, ®â¢¥ç îé¨å § ᢮©áâ¢
|
||||
|
||||
edit_sav edit_box 210, 310, 30, 0xffffff, 0xff80, 0xff, 0xff0000, 0x4080, 300, ed_text_sav, mouse_dd, 0
|
||||
@ -926,6 +976,9 @@ ed_text6 rb MAX_LEN_OBJ_TXT+2
|
||||
ed_text7 rb MAX_LEN_OBJ_TXT+2
|
||||
ed_text8 rb MAX_LEN_OBJ_TXT+2
|
||||
ed_text9 rb MAX_LEN_OBJ_TXT+2
|
||||
ed_text10 rb MAX_LEN_OBJ_TXT+2
|
||||
ed_text11 rb MAX_LEN_OBJ_TXT+2
|
||||
ed_text12 rb MAX_LEN_OBJ_TXT+2
|
||||
ed_text_sav rb 302
|
||||
|
||||
txt_null db 'null',0
|
||||
@ -934,11 +987,11 @@ mouse_dd dd ?
|
||||
el_focus dd tree1
|
||||
;¤¥à¥¢® ᮠᯨ᪮¬ ¢®§¬®¦ëå ⨯®¢ ®¡ê¥ªâ®¢
|
||||
tree1 tree_list sizeof.ObjOpt,20+2, tl_key_no_edit+tl_draw_par_line+tl_list_box_mode,\
|
||||
16,16, 0xffffff,0xb0d0ff,0xd000ff, 10,50,125,100, 0,3,0, el_focus,\
|
||||
16,16, 0xffffff,0xb0d0ff,0xd000ff, 5,50,125,100, 0,3,0, el_focus,\
|
||||
w_scr_t1,on_add_object
|
||||
;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ ⥫ì᪮¬ ä ©«¥
|
||||
tree2 tree_list sizeof.object,MAX_CED_OBJECTS+2, tl_draw_par_line,\
|
||||
16,16, 0xffffff,0xb0d0ff,0xd000ff, 160,50,125,280, 13,1,MAX_LEN_OBJ_TXT, el_focus,\
|
||||
16,16, 0xffffff,0xb0d0ff,0xd000ff, 155,50,130,280, 13,1,MAX_LEN_OBJ_TXT, el_focus,\
|
||||
w_scr_t2,on_file_object_select
|
||||
|
||||
msgbox_0:
|
||||
@ -1134,11 +1187,11 @@ sc system_colors
|
||||
|
||||
image_data dd 0 ;¯ ¬ïâì ¤«ï ¯à¥®¡à §®¢ ¨ï ª à⨪¨ äãªæ¨ï¬¨ libimg
|
||||
|
||||
recMain BOX 3,13,16,18
|
||||
recMain BOX 3,20,16,18 ;ª®®à¤¨ âë: 1,2 - ®âáâã¯ë; 3,4 - à §¬¥à
|
||||
ced_info object 0 ;on start == 0
|
||||
rb sizeof.object*(MAX_CED_OBJECTS-1)
|
||||
|
||||
wndObjI BOX 10,160,125+16,170
|
||||
wndObjI BOX 5,155,125+16,175
|
||||
text_buffer db BUF_SIZE dup(0)
|
||||
fn_obj_opt db 'ob_o.opt',0
|
||||
obj_opt ObjOpt
|
||||
|
@ -48,6 +48,7 @@ buf db '111-222-333',0</pre>
|
||||
<p>Âĺđńč˙ ýëĺěĺíňŕ</p>
|
||||
|
||||
<h1><a name="struc_editbox">Ńňđóęňóđŕ editbox</a></h1>
|
||||
<p>Размер структуры editbox указан внутри файла <i>box_lib.mac</i> в параметре <b>ed_struc_size</b>.</p>
|
||||
<pre>struc edit_box width,left,top,color,shift_color,focus_border_color,\
|
||||
blur_border_color,text_color,max,text,mouse_variable,flags,size,pos
|
||||
{
|
||||
@ -88,6 +89,6 @@ buf db '111-222-333',0</pre>
|
||||
<p>Ňĺęńňîâîĺ ďîëĺ â ôîęóńĺ.</p>
|
||||
|
||||
<hr>
|
||||
<p>Документация обновлялась последний раз 17.09.10.</p>
|
||||
<p>Документация обновлялась последний раз 27.11.10.</p>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user