diff --git a/programs/develop/libraries/box_lib/asm/trunk/editbox_ex.asm b/programs/develop/libraries/box_lib/asm/trunk/editbox_ex.asm index b768fc8574..29e64b78de 100644 --- a/programs/develop/libraries/box_lib/asm/trunk/editbox_ex.asm +++ b/programs/develop/libraries/box_lib/asm/trunk/editbox_ex.asm @@ -151,8 +151,8 @@ aVersion_op db 'version_op',0 check1 check_box 10,45,6,12,0x80AABBCC,0,0,check_text,14,ch_flag_en check2 check_box 10,60,6,12,0x80AABBCC,0,0,check_text2,15 -edit1 edit_box 350,3,5,0xffffff,0x6f9480,0,0xAABBCC,0,308,hed,ed_focus,hed_end-hed-1,hed_end-hed-1 -edit2 edit_box 350,3,25,0xffffff,0x6a9480,0,0,0,99,ed_buffer,ed_figure_only +edit1 edit_box 350,3,5,0xffffff,0x6f9480,0,0xAABBCC,0,308,hed,mouse_dd,ed_focus,hed_end-hed-1,hed_end-hed-1 +edit2 edit_box 350,3,25,0xffffff,0x6a9480,0,0,0,99,ed_buffer,mouse_dd,ed_figure_only op1 option_box option_group1,10,90,6,12,0xffffff,0,0,op_text.1,op_text.e1-op_text.1 op2 option_box option_group1,10,105,6,12,0xFFFFFF,0,0,op_text.2,op_text.e2-op_text.2 @@ -180,6 +180,8 @@ op_text: ; ed_buffer rb 100 ;----------------------- ;sc system_colors + +mouse_dd rd 1 p_info process_information cur_dir_path rb 4096 library_path rb 4096 diff --git a/programs/develop/libraries/box_lib/asm/trunk/editbox_ex.mac b/programs/develop/libraries/box_lib/asm/trunk/editbox_ex.mac index 208c2c66b6..4c021b6cac 100644 --- a/programs/develop/libraries/box_lib/asm/trunk/editbox_ex.mac +++ b/programs/develop/libraries/box_lib/asm/trunk/editbox_ex.mac @@ -1,6 +1,6 @@ -ed_struc_size=72 +ed_struc_size=76 struc edit_box width,left,top,color,shift_color,focus_border_color,\ - blur_border_color,text_color,max,text,flags,size,pos + blur_border_color,text_color,max,text,mouse_variable,flags,size,pos { ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Bit mask from editbox @@ -37,6 +37,7 @@ ed_height=14 ; .text_color dd text_color .max dd max .text dd text +.mouse_variable dd mouse_variable .flags dd flags+0 .size dd size+0 .pos dd pos+0 diff --git a/programs/develop/libraries/box_lib/trunk/box_lib.asm b/programs/develop/libraries/box_lib/trunk/box_lib.asm index d94b6b3e0e..bf3f372e36 100644 --- a/programs/develop/libraries/box_lib/trunk/box_lib.asm +++ b/programs/develop/libraries/box_lib/trunk/box_lib.asm @@ -25,68 +25,69 @@ include 'filebrowser.mac' ;macro implements filebrowser ;---------------------------------------------------- ;EditBox ;---------------------------------------------------- -align 4 +align 16 use_editbox_draw ;macro reveals the function of the display. -align 4 +align 16 use_editbox_key ;macro reveals processing function of the keypad. -align 4 +align 16 use_editbox_mouse ;macro reveals processing function of the mouse. ;---------------------------------------------------- ;CheckBox ;---------------------------------------------------- -align 4 +align 16 use_checkbox_draw ;macro reveals the function of the display. -align 4 +align 16 use_checkbox_mouse ;macro reveals processing function of the mouse. ;-------------------------------------------------- ;radiobutton Group ;-------------------------------------------------- -align 4 +align 16 use_optionbox_driver ;macro that control the operating modes -align 4 +align 16 use_optionbox_draw ;macro reveals the function of the display. -align 4 +align 16 use_optionbox_mouse ;macro reveals processing function of the mouse. ;-------------------------------------------------- ;scrollbar Group ;-------------------------------------------------- -align 4 +align 16 use_scroll_bar -align 4 +align 16 use_scroll_bar_vertical -align 4 +align 16 use_scroll_bar_horizontal ;-------------------------------------------------- ;dinamic button Group ;-------------------------------------------------- -align 4 +align 16 use_dinamic_button ;-------------------------------------------------- ;menubar Group ;-------------------------------------------------- -align 4 +align 16 use_menu_bar ;-------------------------------------------------- ;filebrowser Group ;-------------------------------------------------- -align 4 +align 16 use_file_browser ;-------------------------------------------------- +;align 16 init: ret ;;;;;;;;;;; ;;Data ;;;;;;;;;;; -align 4 -mouse_flag dd 0x0 +;align 16 +;mouse_flag dd 0x0 align 16 diff --git a/programs/develop/libraries/box_lib/trunk/checkbox.mac b/programs/develop/libraries/box_lib/trunk/checkbox.mac index 8550030897..05bd0c5390 100644 --- a/programs/develop/libraries/box_lib/trunk/checkbox.mac +++ b/programs/develop/libraries/box_lib/trunk/checkbox.mac @@ -111,9 +111,9 @@ pusha jc check_box_mouse_end ;хёыш CF=1 Єю яхЁхщЄш т ъюэхЎ Є.х. ¤Єю т√їюф mov esi,dword ch_text_length ;чруЁєчшЄ№ ъюы-тю ёшьтюыют т ЄхъёЄютющ ёЄЁюъх ;╙ьэюцхэшх эр 6 ┴√ёЄЁюх єьэюцхэшх ьюцэю тюёяюы№чютрЄ№ё  ы■с√ь ьч ьхЄюфют, эю эр ёЄрЁ√ї ╧ЁюЎхёёюЁрї (386,486,P1)с√ёЄЁхх сєфхЄ ё шэёЄЁєъЎшхщ Lea - ;lea esi,[eax*2+eax] - ;shl eax,1 - imul esi,6 ; шыш ьюцэю ш Єръ єьэюцшЄ№ эр 6 + lea esi,[eax*3] + shl esi,1 +; imul esi,6 ; шыш ьюцэю ш Єръ єьэюцшЄ№ эр 6 add esi,dword ch_text_margin ;фюсртшЄ№ 3 - ЁрёёЄю эшх юЄ ўхъ сюъёр фю эрфяшёш mov eax,37 ;яюыєўшь ъююЁфшэрЄ√ ь√°ъш diff --git a/programs/develop/libraries/box_lib/trunk/editbox.mac b/programs/develop/libraries/box_lib/trunk/editbox.mac index 59a36bb8a7..2eb2ec7224 100644 --- a/programs/develop/libraries/box_lib/trunk/editbox.mac +++ b/programs/develop/libraries/box_lib/trunk/editbox.mac @@ -1,6 +1,15 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Basic macros for use editbox ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +macro init_editbox +{ +pushad + mcall + +popad +} + + macro use_editbox_draw { edit_box: @@ -14,14 +23,15 @@ ed_blur_border_color equ [edi+24] ;цве ed_text_color equ [edi+28] ;цвет текста ed_max equ [edi+32] ;кол-во символов которые можно максимально ввести ed_text equ [edi+36] ;указатель на буфер -ed_flags equ [edi+40] ;флаги -ed_size equ [edi+44] ;кол-во символов -ed_pos equ [edi+48] ;позиция курсора -ed_offset equ [edi+52] ;смещение -cl_curs_x equ [edi+56] ;предыдущее координата курсора по х -cl_curs_y equ [edi+60] ;предыдущее координата курсора по у -ed_shift_pos equ [edi+64] ;положение курсора -ed_shift_pos_old equ [edi+68] ;старое положение курсора +ed_mouse_variable equ [edi+40] ; указатель на переменную для бокса/группы +ed_flags equ [edi+44] ;флаги +ed_size equ [edi+48] ;кол-во символов +ed_pos equ [edi+52] ;позиция курсора +ed_offset equ [edi+56] ;смещение +cl_curs_x equ [edi+60] ;предыдущее координата курсора по х +cl_curs_y equ [edi+64] ;предыдущее координата курсора по у +ed_shift_pos equ [edi+68] ;положение курсора +ed_shift_pos_old equ [edi+72] ;старое положение курсора ed_figure_only= 1000000000000000b ;одни символы ed_always_focus= 100000000000000b @@ -62,7 +72,7 @@ ed_height=14 ; ;--- рисуем курсор --- ;--- может его не надо рисовать ---- test word ed_flags,ed_focus - je @f + jz @f call .draw_cursor @@: call .draw_text @@ -138,14 +148,18 @@ pushad test eax,1 jnz edit_box_mouse.mouse_left_button and word ed_flags,ed_mouse_on_off - xor ebx,ebx - mov dword [mouse_flag],ebx + mov ebx,dword ed_mouse_variable + push 0 + pop dword [ebx] +; mov dword [ebx],ebx jmp edit_box.editbox_exit .mouse_left_button: ;---------------------------------------------------------- ;--- блокировка от фокусировки в других боксах при попадании на них курсора ;---------------------------------------------------------- - mov eax,dword [mouse_flag] + mov eax,dword ed_mouse_variable + push dword [eax] + pop eax test eax,eax jz @f cmp eax,edi @@ -435,7 +449,8 @@ edit_box_key.sh_cl_: push ebx ;большее jmp edit_box_key.sh_n1 ;если иначе -edit_box_key.sh_n: push ebx +edit_box_key.sh_n: + push ebx push eax edit_box_key.sh_n1: call edit_box.check_offset @@ -920,7 +935,8 @@ popa stosb ;-------- loop @b -edit_box_key.In_k: cld +edit_box_key.In_k: + cld pop eax mov al,ah stosb @@ -1015,7 +1031,8 @@ edit_box_key.draw_all2: ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;--- нажата клавиша left --- -edit_box_key.left: mov ebx,ed_pos +edit_box_key.left: + mov ebx,ed_pos test ebx,ebx jz edit_box_key.sh_st_of or word ed_flags,ed_left_fl @@ -1025,7 +1042,8 @@ edit_box_key.left: mov ebx,ed_pos jmp edit_box.draw_cursor_text ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;--- нажата клавиша right --- -edit_box_key.right: mov ebx,ed_pos +edit_box_key.right: + mov ebx,ed_pos cmp ebx,ed_size je edit_box_key.sh_st_of and word ed_flags,ed_right_fl @@ -1218,7 +1236,16 @@ edit_box_mouse._mshift: mov dword ed_shift_pos,eax or word ed_flags,ed_mouse_on mov dword ed_pos,eax - mov dword [mouse_flag],edi ;установим идентификатор + +; mov dword [mouse_flag],edi ;установим идентификатор + + mov ebx,dword ed_mouse_variable + push edi + pop dword [ebx] + + + + bts word ed_flags,1 ;установка фокуса jmp edit_box_mouse.m_sh @@: @@ -1229,7 +1256,8 @@ edit_box_mouse._mshift: mov ebx,dword ed_shift_pos call edit_box_key.sh_cl_ or word ed_flags,ed_mous_adn_b ;установим бит что мы выделили +shift_on + -edit_box_mouse.m_sh: call edit_box.draw_text +edit_box_mouse.m_sh: + call edit_box.draw_text call edit_box.draw_cursor ;---------------------------------------------------------- ;--- процедура установки фокуса --------------------------- @@ -1350,9 +1378,9 @@ ed_mouse_on_off=1111111011111111b ed_height=24 ; высота } -ed_struc_size=72 +ed_struc_size=76 struc edit_box width,left,top,color,shift_color,focus_border_color,\ - blur_border_color,text_color,max,text,flags,size,pos + blur_border_color,text_color,max,text,mouse_variable,flags,size,pos { .width dd width .left dd left @@ -1364,6 +1392,7 @@ struc edit_box width,left,top,color,shift_color,focus_border_color,\ .text_color dd text_color .max dd max .text dd text +.mouse_variable dd mouse_variable .flags dd flags+0 .size dd size+0 .pos dd pos+0 diff --git a/programs/develop/libraries/box_lib/trunk/readme.txt b/programs/develop/libraries/box_lib/trunk/readme.txt index cfa31c00dc..d0bef2ca60 100644 --- a/programs/develop/libraries/box_lib/trunk/readme.txt +++ b/programs/develop/libraries/box_lib/trunk/readme.txt @@ -1,6 +1,15 @@ ╥хяыют └ыхъёхщ, ╫хы сшэёъ. ╧ЁшьхЁ яЁюёЄюую шёяюы№чютрэш  editbox т сшсышюЄхъх, EditBox яхЁхяшёрэ фы  ЁрсюЄ√ т сшсышюЄхъх. +─рЄр 14.10.2009 +┴шсышюЄхър яюы№эюёЄ№■ ЁххэЄхЁрсхы№эр. ─ы  edit_box эхюсїюфшюь тэхёЄш т Єхъє∙хь яЁшыюцхэшш яхЁхьхээє■ Єшяр mouse_dd dd ? +р т ёЄЁєъЄєЁх ьръЁюёр сюъёр фюсртшЄ№ 1 ¤ыхьхэЄ <єърчрЄхы№ эр яхЁхьхээє■ mouse_dd> +ed_struc_size=76 +struc edit_box width,left,top,color,shift_color,focus_border_color,\ + blur_border_color,text_color,max,text,<єърчрЄхы№ эр яхЁхьхээє■ mouse_dd>,flags,size,pos + + + ─рЄр 25.06.2008 ёфхырэр яюффхЁцър чряєёър рёёхьсыхЁэюую яЁшьхЁр яЁш Ёрёяюыюцхэшш Єхъє∙хщ сшсышюЄхъш яю 2-ь ьхёЄрь 1. /sys/lib/box_lib.obj ш ъюуфр сшсышюЄхър эрїюфшЄ№ё  т яряъх ё яЁюуЁрььющ. diff --git a/programs/media/scrshoot/scrshoot.asm b/programs/media/scrshoot/scrshoot.asm index bb836372b2..e153b4f4a0 100644 --- a/programs/media/scrshoot/scrshoot.asm +++ b/programs/media/scrshoot/scrshoot.asm @@ -602,10 +602,10 @@ status label 5,201,0,no_shoot labels_end: editboxes: -edit1 edit_box 300,5,35,cl_white,0xaabbcc,0,0,0,300,ed_buffer.1,ed_focus,10,10 ; путь к файлу -edit2 edit_box 35,75,134,cl_white,0xaabbcc,0,0,0,9,ed_buffer.2,ed_figure_only,3,3 ; задержка -edit3 edit_box 35,165,164,cl_white,0xaabbcc,0,0,0,9,ed_buffer.3,ed_figure_only ; автонумерация -edit4 edit_box 16,165,181,cl_white,0xaabbcc,0,0,0,1,sign_n_input,ed_figure_only,1 +edit1 edit_box 300,5,35,cl_white,0xaabbcc,0,0,0,300,ed_buffer.1,mouse_dd,ed_focus,10,10 ; путь к файлу +edit2 edit_box 35,75,134,cl_white,0xaabbcc,0,0,0,9,ed_buffer.2,mouse_dd,ed_figure_only,3,3 ; задержка +edit3 edit_box 35,165,164,cl_white,0xaabbcc,0,0,0,9,ed_buffer.3,mouse_dd,ed_figure_only ; автонумерация +edit4 edit_box 16,165,181,cl_white,0xaabbcc,0,0,0,1,sign_n_input,mouse_dd,ed_figure_only,1 editboxes_end: buttons: @@ -806,6 +806,7 @@ set_rect_window_procinfo procinfo ; shoot_esp rb 512 ; стек потока фотканья set_rect_window_esp rb 512 ; стек окна области ; app_end ; конец программы +mouse_dd rd 1 align 4 cur_dir_path rb 4096 library_path rb 4096 diff --git a/programs/media/scrshoot/srectwin.inc b/programs/media/scrshoot/srectwin.inc index 2cb1bac233..e849e1be9d 100644 --- a/programs/media/scrshoot/srectwin.inc +++ b/programs/media/scrshoot/srectwin.inc @@ -264,15 +264,15 @@ aVersion_op db 'version_op',0 rect_input: .left edit_box 35,95,5,cl_white,0,0,0,5,rect_input_buffer.left,\ -ed_figure_only+ed_focus +mouse_dd1,ed_figure_only+ed_focus .top edit_box 35,95,25,cl_white,0,0,0,5,rect_input_buffer.top,\ -ed_figure_only +mouse_dd1,ed_figure_only .width edit_box 35,95,45,cl_white,0,0,0,5,rect_input_buffer.width,\ -ed_figure_only +mouse_dd1,ed_figure_only .height edit_box 35,95,65,cl_white,0,0,0,5,rect_input_buffer.height,\ -ed_figure_only +mouse_dd1,ed_figure_only rect_input_end: - +mouse_dd1 rd 1 rect_input_labels: .left label 10,10,0,rect_input_labels_text.left .top label 10,30,0,rect_input_labels_text.top diff --git a/programs/system/cpu/trunk/cpu.asm b/programs/system/cpu/trunk/cpu.asm index e4bc5ca98f..078403d535 100644 --- a/programs/system/cpu/trunk/cpu.asm +++ b/programs/system/cpu/trunk/cpu.asm @@ -658,7 +658,7 @@ aEdit_box_mouse db 'edit_box_mouse',0 ;aOption_box_mouse db 'option_box_mouse',0 ;aVersion_op db 'version_op',0 -edit1 edit_box 350,(64-offset_x),(398-offset_y),0xffffff,0x6f9480,0,0xAABBCC,0,start_application_c,start_application,ed_focus,start_application_e,start_application_e +edit1 edit_box 350,(64-offset_x),(398-offset_y),0xffffff,0x6f9480,0,0xAABBCC,0,start_application_c,start_application,mouse_dd,ed_focus,start_application_e,start_application_e list_start dd 0 @@ -724,7 +724,7 @@ start_application_c=$-start_application-1 I_END: winxpos rd 1 winypos rd 1 - +mouse_dd rd 1 cpu_percent rd 1 tcolor rd 1 list_add rd 1 diff --git a/programs/system/rdsave/trunk/rdsave.asm b/programs/system/rdsave/trunk/rdsave.asm index 37084f3baf..5a9f306906 100644 --- a/programs/system/rdsave/trunk/rdsave.asm +++ b/programs/system/rdsave/trunk/rdsave.asm @@ -281,7 +281,7 @@ draw_window: title db appname,version,0 editbox: -edit1 edit_box 170,10,113,0xffffff,0xaabbcc,0,0,0,512,path4,ed_focus,26,26 +edit1 edit_box 170,10,113,0xffffff,0xaabbcc,0,0,0,512,path4,mouse_dd,ed_focus,26,26 editbox_end: if lang eq ru @@ -366,7 +366,7 @@ path4 db '/hd0/1/kolibri/kolibri.img',0 ; rb 514 sc system_colors - +mouse_dd rd 1 cur_dir_path rb 4096 library_path rb 4096 align 4 diff --git a/programs/system/run/trunk/run.asm b/programs/system/run/trunk/run.asm index afc5597159..3496d2261e 100644 --- a/programs/system/run/trunk/run.asm +++ b/programs/system/run/trunk/run.asm @@ -238,7 +238,7 @@ draw_status_text: ret run_but txt_button 0,5,15,25,2,0,0,run_but_text, -input_fn edit_box 0,5,5,0xffffff,0x6a9480,0,0xaaaaaa,0,511,fn,ed_focus+ed_always_focus +input_fn edit_box 0,5,5,0xffffff,0x6a9480,0,0xaaaaaa,0,511,fn,mouse_dd,ed_focus+ed_always_focus ;mouse_flag: dd 0x0 if lang eq ru @@ -316,7 +316,7 @@ procinfo process_information run_par rb 256 par rb 256 fn rb 512 - +mouse_dd rd 1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; cur_dir_path rb 4096 library_path rb 4096