diff --git a/programs/develop/libraries/box_lib/asm/trunk/ctrldemo.asm b/programs/develop/libraries/box_lib/asm/trunk/ctrldemo.asm index fd23caf115..a096d35f6f 100644 --- a/programs/develop/libraries/box_lib/asm/trunk/ctrldemo.asm +++ b/programs/develop/libraries/box_lib/asm/trunk/ctrldemo.asm @@ -303,6 +303,10 @@ start_OpenDialog OpenDialog_data cmp [OpenDialog_data.status],1 jne still ; OpenDialog user say cancel ; copy path +; prepare path - PathShow + push dword PathShow_data_1 + call [PathShow_prepare] + call draw_window jmp still ; OpenDialog user selected the target file ; [OpenDialog_data.openfile_pach] pointer of area the target file @@ -344,9 +348,12 @@ draw_window: call [dinamic_button_draw] ;--------------------------------------------- mcall 13,<170,200>,<25,15>,0xffffb0 - mov bx,28 - add ebx,2 shl 16 - mcall 4,,0xC0000000,openfile_pach,,0xffffb0 +; mov bx,28 +; add ebx,2 shl 16 +; mcall 4,,0xC0000000,text_work_area,,0xffffb0 +; draw for PathShow + push dword PathShow_data_1 + call [PathShow_draw] ;--------------------------------------------- ; set all_redraw flag for draw all ScrollBar ; In some cases it is necessity to draw only the area @@ -408,6 +415,9 @@ library_path: plugin_pach: rb 4096 ;--------------------------------------------------------------------- +text_work_area: + rb 4096 +;--------------------------------------------------------------------- file_info: rb 40 ;--------------------------------------------------------------------- diff --git a/programs/develop/libraries/box_lib/asm/trunk/data.inc b/programs/develop/libraries/box_lib/asm/trunk/data.inc index ce8338b29a..ce8c350f14 100644 --- a/programs/develop/libraries/box_lib/asm/trunk/data.inc +++ b/programs/develop/libraries/box_lib/asm/trunk/data.inc @@ -1,34 +1,35 @@ ;--------------------------------------------------------------------- -;--- ÄÀÍÍÛÅ ÏÐÎÃÐÀÌÌÛ ---------------------------------------------- +;--- data area ------------------------------------------------------- ;--------------------------------------------------------------------- -header_1 db 'Box_lib Control Demo by Mario79',0 +header_1 db 'Box_lib Control Demo by Mario79',0 -ok_btn db 'Ok',0 - -labelt3 db 'About program',0 +ok_btn db 'Ok',0 + +labelt3 db 'About program',0 ;--------------------------------------------------------------------- -icons_file_name: db 'reload_16x16_8b.png',0 -system_dir1 db '/sys/lib/' -plugin_BMP_name db 'cnv_bmp.obj',0 +icons_file_name: db 'reload_16x16_8b.png',0 +system_dir1 db '/sys/lib/' +plugin_BMP_name db 'cnv_bmp.obj',0 -system_dir db '/sys/lib/' +system_dir db '/sys/lib/' -;plugins_directory db 'plugins/',0 -plugins_directory db 0 +;plugins_directory db 'plugins/',0 +plugins_directory db 0 system_dir_Boxlib db '/sys/lib/box_lib.obj',0 system_dir_CnvPNG db '/sys/lib/cnv_png.obj',0 system_dir_UNPACK db '/sys/lib/archiver.obj',0 -; Åñëè åñòü æåëàíèå ðàçúåäèíèòü, òî íóæíî èñïîëüçîâàòü ñëåäóþùèþ êîíñòðóêöèþ +; …᫨ ¥áâì ¦¥« ­¨¥ ࠧꥤ¨­¨âì, â® ­ã¦­® ¨á¯®«ì§®¢ âì á«¥¤ãîé¨î ª®­áâàãªæ¨î ;system_path db '/sys/lib/box_lib.obj',0 -;... ëþáàÿ ïîñëåäîâàòåëüíîñòü äðóãèõ êîìàíä è îïðåäåëåíèé. +;... «î¡ ï ¯®á«¥¤®¢ â¥«ì­®áâì ¤àã£¨å ª®¬ ­¤ ¨ ®¯à¥¤¥«¥­¨©. ;library_name db 'box_lib.obj',0 +;library_name db 'box_lib.obj',0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ihead_f_i: -ihead_f_l db 'System error',0 +ihead_f_l db 'System error',0 -er_message_found_lib db 'Sorry I cannot load library box_lib.obj',0 -er_message_import db 'Error on load import library box_lib.obj',0 +er_message_found_lib db 'Sorry I cannot load library box_lib.obj',0 +er_message_import db 'Error on load import library box_lib.obj',0 er_message_found_lib2 db 'cnv_png.obj - Not found!',0 er_message_import2 db 'cnv_png.obj - Wrong import!',0 @@ -36,395 +37,404 @@ er_message_import2 db 'cnv_png.obj - Wrong import!',0 err_message_found_lib3 db 'archiver.obj - Not found!',0 err_message_import3 db 'archiver.obj - Wrong import!',0 -align 4 +align 4 l_libs_start: -library01 l_libs system_dir_Boxlib+9, path, file_name, system_dir_Boxlib, \ +library01 l_libs system_dir_Boxlib+9, path, file_name, system_dir_Boxlib,\ er_message_found_lib, ihead_f_l, Box_lib_import, er_message_import, ihead_f_i, plugins_directory -library02 l_libs system_dir_CnvPNG+9, path, file_name, system_dir_CnvPNG,\ +library02 l_libs system_dir_CnvPNG+9, path, file_name, system_dir_CnvPNG,\ er_message_found_lib2, ihead_f_l, cnv_png_import, er_message_import2, ihead_f_i, plugins_directory -library03 l_libs system_dir_UNPACK+9, path, file_name, system_dir_UNPACK, \ +library03 l_libs system_dir_UNPACK+9, path, file_name, system_dir_UNPACK,\ err_message_found_lib3, ihead_f_l, UNPACK_import, err_message_import3, ihead_f_i, plugins_directory end_l_libs: ;--------------------------------------------------------------------- -align 4 +align 4 cnv_png_import: -.Start dd aCP_Start -.Version dd aCP_Version -.Check dd aCP_Check -.Assoc dd aCP_Assoc - dd 0 - dd 0 -aCP_Start db 'START',0 -aCP_Version db 'version',0 -aCP_Check db 'Check_Header',0 -aCP_Assoc db 'Associations',0 +.Start dd aCP_Start +.Version dd aCP_Version +.Check dd aCP_Check +.Assoc dd aCP_Assoc + dd 0 + dd 0 +aCP_Start db 'START',0 +aCP_Version db 'version',0 +aCP_Check db 'Check_Header',0 +aCP_Assoc db 'Associations',0 ;--------------------------------------------------------------------- -align 4 +align 4 UNPACK_import: -;unpack_Version dd aUnpack_Version -;unpack_PluginLoad dd aUnpack_PluginLoad +;unpack_Version dd aUnpack_Version +;unpack_PluginLoad dd aUnpack_PluginLoad ;unpack_OpenFilePlugin dd aUnpack_OpenFilePlugin -;unpack_ClosePlugin dd aUnpack_ClosePlugin -;unpack_ReadFolder dd aUnpack_ReadFolder -;unpack_SetFolder dd aUnpack_SetFolder -;unpack_GetFiles dd aUnpack_GetFiles +;unpack_ClosePlugin dd aUnpack_ClosePlugin +;unpack_ReadFolder dd aUnpack_ReadFolder +;unpack_SetFolder dd aUnpack_SetFolder +;unpack_GetFiles dd aUnpack_GetFiles ;unpack_GetOpenPluginInfo dd aUnpack_GetOpenPluginInfo -;unpack_Getattr dd aUnpack_Getattr -;unpack_Open dd aUnpack_Open -;unpack_Read dd aUnpack_Read -;unpack_Setpos dd aUnpack_Setpos -;unpack_Close dd aUnpack_Close +;unpack_Getattr dd aUnpack_Getattr +;unpack_Open dd aUnpack_Open +;unpack_Read dd aUnpack_Read +;unpack_Setpos dd aUnpack_Setpos +;unpack_Close dd aUnpack_Close unpack_DeflateUnpack dd aUnpack_DeflateUnpack unpack_DeflateUnpack2 dd aUnpack_DeflateUnpack2 - dd 0 - dd 0 + dd 0 + dd 0 -;aUnpack_Version db 'version',0 -;aUnpack_PluginLoad db 'plugin_load',0 -;aUnpack_OpenFilePlugin db 'OpenFilePlugin',0 -;aUnpack_ClosePlugin db 'ClosePlugin',0 -;aUnpack_ReadFolder db 'ReadFolder',0 -;aUnpack_SetFolder db 'SetFolder',0 -;aUnpack_GetFiles db 'GetFiles',0 -;aUnpack_GetOpenPluginInfo db 'GetOpenPluginInfo',0 -;aUnpack_Getattr db 'getattr',0 -;aUnpack_Open db 'open',0 -;aUnpack_Read db 'read',0 -;aUnpack_Setpos db 'setpos',0 -;aUnpack_Close db 'close',0 -aUnpack_DeflateUnpack db 'deflate_unpack',0 -aUnpack_DeflateUnpack2 db 'deflate_unpack2',0 +;aUnpack_Version db 'version',0 +;aUnpack_PluginLoad db 'plugin_load',0 +;aUnpack_OpenFilePlugin db 'OpenFilePlugin',0 +;aUnpack_ClosePlugin db 'ClosePlugin',0 +;aUnpack_ReadFolder db 'ReadFolder',0 +;aUnpack_SetFolder db 'SetFolder',0 +;aUnpack_GetFiles db 'GetFiles',0 +;aUnpack_GetOpenPluginInfo db 'GetOpenPluginInfo',0 +;aUnpack_Getattr db 'getattr',0 +;aUnpack_Open db 'open',0 +;aUnpack_Read db 'read',0 +;aUnpack_Setpos db 'setpos',0 +;aUnpack_Close db 'close',0 +aUnpack_DeflateUnpack db 'deflate_unpack',0 +aUnpack_DeflateUnpack2 db 'deflate_unpack2',0 ;--------------------------------------------------------------------- fileinfo: - dd 5 - dd 0 - dd 0 - dd 0 - dd file_info + dd 5 + dd 0 + dd 0 + dd 0 + dd file_info string: - db 0 - dd file_name - -plugin dd 0 + db 0 + dd file_name + +plugin dd 0 ;--------------------------------------------------------------------- ; not change this section!!! ; start section ;--------------------------------------------------------------------- -image_file dd 0 -raw_pointer dd 0 -return_code dd 0 -img_size dd 0 -deflate_unpack dd 0 +image_file dd 0 +raw_pointer dd 0 +return_code dd 0 +img_size dd 0 +deflate_unpack dd 0 ;--------------------------------------------------------------------- ; end section ;--------------------------------------------------------------------- ;--------------------------------------------------------------------- -align 4 -Box_lib_import: -;init_lib dd a_init -;version_lib dd a_version +align 4 +Box_lib_import: +;init_lib dd a_init +;version_lib dd a_version -;edit_box_draw dd aEdit_box_draw -;edit_box_key dd aEdit_box_key -;edit_box_mouse dd aEdit_box_mouse -;version_ed dd aVersion_ed +;edit_box_draw dd aEdit_box_draw +;edit_box_key dd aEdit_box_key +;edit_box_mouse dd aEdit_box_mouse +;version_ed dd aVersion_ed -;check_box_draw dd aCheck_box_draw -;check_box_mouse dd aCheck_box_mouse -;version_ch dd aVersion_ch +;check_box_draw dd aCheck_box_draw +;check_box_mouse dd aCheck_box_mouse +;version_ch dd aVersion_ch -;option_box_draw dd aOption_box_draw -;option_box_mouse dd aOption_box_mouse -;version_op dd aVersion_op +;option_box_draw dd aOption_box_draw +;option_box_mouse dd aOption_box_mouse +;version_op dd aVersion_op -scrollbar_ver_draw dd aScrollbar_ver_draw -scrollbar_ver_mouse dd aScrollbar_ver_mouse -scrollbar_hor_draw dd aScrollbar_hor_draw -scrollbar_hor_mouse dd aScrollbar_hor_mouse -;version_scrollbar dd aVersion_scrollbar +scrollbar_ver_draw dd aScrollbar_ver_draw +scrollbar_ver_mouse dd aScrollbar_ver_mouse +scrollbar_hor_draw dd aScrollbar_hor_draw +scrollbar_hor_mouse dd aScrollbar_hor_mouse +;version_scrollbar dd aVersion_scrollbar -dinamic_button_draw dd aDbutton_draw -dinamic_button_mouse dd aDbutton_mouse -;version_dbutton dd aVersion_dbutton +dinamic_button_draw dd aDbutton_draw +dinamic_button_mouse dd aDbutton_mouse +;version_dbutton dd aVersion_dbutton -menu_bar_draw dd aMenu_bar_draw -menu_bar_mouse dd aMenu_bar_mouse -menu_bar_activate dd aMenu_bar_activate -;version_menu_bar dd aVersion_menu_bar +menu_bar_draw dd aMenu_bar_draw +menu_bar_mouse dd aMenu_bar_mouse +menu_bar_activate dd aMenu_bar_activate +;version_menu_bar dd aVersion_menu_bar -;FileBrowser_draw dd aFileBrowser_draw -;FileBrowser_mouse dd aFileBrowser_mouse -;FileBrowser_key dd aFileBrowser_key -;Version_FileBrowser dd aVersion_FileBrowser - dd 0 - dd 0 +;FileBrowser_draw dd aFileBrowser_draw +;FileBrowser_mouse dd aFileBrowser_mouse +;FileBrowser_key dd aFileBrowser_key +;Version_FileBrowser dd aVersion_FileBrowser -;a_init db 'lib_init',0 -;a_version db 'version',0 +PathShow_prepare dd sz_PathShow_prepare +PathShow_draw dd sz_PathShow_draw -;aEdit_box_draw db 'edit_box',0 -;aEdit_box_key db 'edit_box_key',0 -;aEdit_box_mouse db 'edit_box_mouse',0 -;aVersion_ed db 'version_ed',0 + dd 0 + dd 0 -;aCheck_box_draw db 'check_box_draw',0 -;aCheck_box_mouse db 'check_box_mouse',0 -;aVersion_ch db 'version_ch',0 +;a_init db 'lib_init',0 +;a_version db 'version',0 -;aOption_box_draw db 'option_box_draw',0 -;aOption_box_mouse db 'option_box_mouse',0 -;aVersion_op db 'version_op',0 +;aEdit_box_draw db 'edit_box',0 +;aEdit_box_key db 'edit_box_key',0 +;aEdit_box_mouse db 'edit_box_mouse',0 +;aVersion_ed db 'version_ed',0 -aScrollbar_ver_draw db 'scrollbar_v_draw',0 -aScrollbar_ver_mouse db 'scrollbar_v_mouse',0 -aScrollbar_hor_draw db 'scrollbar_h_draw',0 -aScrollbar_hor_mouse db 'scrollbar_h_mouse',0 -;aVersion_scrollbar db 'version_scrollbar',0 +;aCheck_box_draw db 'check_box_draw',0 +;aCheck_box_mouse db 'check_box_mouse',0 +;aVersion_ch db 'version_ch',0 -aDbutton_draw db 'dbutton_draw',0 -aDbutton_mouse db 'dbutton_mouse',0 -;aVersion_dbutton db 'version_dbutton',0 +;aOption_box_draw db 'option_box_draw',0 +;aOption_box_mouse db 'option_box_mouse',0 +;aVersion_op db 'version_op',0 -aMenu_bar_draw db 'menu_bar_draw',0 -aMenu_bar_mouse db 'menu_bar_mouse',0 -aMenu_bar_activate db 'menu_bar_activate',0 -;aVersion_menu_bar db 'version_menu_bar',0 +aScrollbar_ver_draw db 'scrollbar_v_draw',0 +aScrollbar_ver_mouse db 'scrollbar_v_mouse',0 +aScrollbar_hor_draw db 'scrollbar_h_draw',0 +aScrollbar_hor_mouse db 'scrollbar_h_mouse',0 +;aVersion_scrollbar db 'version_scrollbar',0 + +aDbutton_draw db 'dbutton_draw',0 +aDbutton_mouse db 'dbutton_mouse',0 +;aVersion_dbutton db 'version_dbutton',0 + +aMenu_bar_draw db 'menu_bar_draw',0 +aMenu_bar_mouse db 'menu_bar_mouse',0 +aMenu_bar_activate db 'menu_bar_activate',0 +;aVersion_menu_bar db 'version_menu_bar',0 + +;aFileBrowser_draw db 'FileBrowser_draw',0 +;aFileBrowser_mouse db 'FileBrowser_mouse',0 +;aFileBrowser_key db 'FileBrowser_key',0 +;aVersion_FileBrowser db 'version_FileBrowser',0 + +sz_PathShow_prepare db 'PathShow_prepare',0 +sz_PathShow_draw db 'PathShow_draw',0 +;szVersion_path_show db 'version_PathShow',0 -;aFileBrowser_draw db 'FileBrowser_draw',0 -;aFileBrowser_mouse db 'FileBrowser_mouse',0 -;aFileBrowser_key db 'FileBrowser_key',0 -;aVersion_FileBrowser db 'version_FileBrowser',0 ;--------------------------------------------------------------------- -;--------------------------------------------------------------------- -align 4 +;--------------------------------------------------------------------- +align 4 scroll_bar_data_vertical: .x: -.size_x dw 15 ;+0 -.start_x dw 370 ;+2 +.size_x dw 15 ;+0 +.start_x dw 370 ;+2 .y: -.size_y dw 300 ;+4 -.start_y dw 50 ;+6 -.btn_high dd 15 ;+8 -.type dd 1 ;+12 -.max_area dd 300 ;+16 -.cur_area dd 30 ;+20 -.position dd 140 ;+24 -.bckg_col dd 0xeeeeee ;+28 -.frnt_col dd 0xbbddff ;+32 -.line_col dd 0 ;+36 -.redraw dd 0 ;+40 -.delta dw 0 ;+44 -.delta2 dw 0 ;+46 +.size_y dw 300 ;+4 +.start_y dw 50 ;+6 +.btn_high dd 15 ;+8 +.type dd 1 ;+12 +.max_area dd 300 ;+16 +.cur_area dd 30 ;+20 +.position dd 140 ;+24 +.bckg_col dd 0xeeeeee ;+28 +.frnt_col dd 0xbbddff ;+32 +.line_col dd 0 ;+36 +.redraw dd 0 ;+40 +.delta dw 0 ;+44 +.delta2 dw 0 ;+46 .run_x: -.r_size_x dw 0 ;+48 -.r_start_x dw 0 ;+50 +.r_size_x dw 0 ;+48 +.r_start_x dw 0 ;+50 .run_y: -.r_size_y dw 0 ;+52 -.r_start_y dw 0 ;+54 -.m_pos dd 0 ;+56 -.m_pos_2 dd 0 ;+60 -.m_keys dd 0 ;+64 -.run_size dd 0 ;+68 -.position2 dd 0 ;+72 -.work_size dd 0 ;+76 -.all_redraw dd 0 ;+80 -.ar_offset dd 10 ;+84 +.r_size_y dw 0 ;+52 +.r_start_y dw 0 ;+54 +.m_pos dd 0 ;+56 +.m_pos_2 dd 0 ;+60 +.m_keys dd 0 ;+64 +.run_size dd 0 ;+68 +.position2 dd 0 ;+72 +.work_size dd 0 ;+76 +.all_redraw dd 0 ;+80 +.ar_offset dd 10 ;+84 ;--------------------------------------------------------------------- -align 4 +align 4 scroll_bar_data_horizontal: .x: -.size_x dw 300 ;0 ;+0 -.start_x dw 30 ;0 ;+2 +.size_x dw 300 ;0 ;+0 +.start_x dw 30 ;0 ;+2 .y: -.size_y dw 15 ;0 ;+4 -.start_y dw 370 ;0 ;+6 -.btn_high dd 15 ;+8 -.type dd 1 ;+12 -.max_area dd 300 ;+16 -.cur_area dd 30 ;+20 -.position dd 140 ;+24 -.bckg_col dd 0xeeeeee ;+28 -.frnt_col dd 0xbbddff ;+32 -.line_col dd 0 ;+36 -.redraw dd 0 ;+40 -.delta dw 0 ;+44 -.delta2 dw 0 ;+46 +.size_y dw 15 ;0 ;+4 +.start_y dw 370 ;0 ;+6 +.btn_high dd 15 ;+8 +.type dd 1 ;+12 +.max_area dd 300 ;+16 +.cur_area dd 30 ;+20 +.position dd 140 ;+24 +.bckg_col dd 0xeeeeee ;+28 +.frnt_col dd 0xbbddff ;+32 +.line_col dd 0 ;+36 +.redraw dd 0 ;+40 +.delta dw 0 ;+44 +.delta2 dw 0 ;+46 .run_x: -.r_size_x dw 0 ;+48 -.r_start_x dw 0 ;+50 +.r_size_x dw 0 ;+48 +.r_start_x dw 0 ;+50 .run_y: -.r_size_y dw 0 ;+52 -.r_start_y dw 0 ;+54 -.m_pos dd 0 ;+56 -.m_pos_2 dd 0 ;+60 -.m_keys dd 0 ;+64 -.run_size dd 0 ;+68 -.position2 dd 0 ;+72 -.work_size dd 0 ;+76 -.all_redraw dd 0 ;+80 -.ar_offset dd 10 ;+84 +.r_size_y dw 0 ;+52 +.r_start_y dw 0 ;+54 +.m_pos dd 0 ;+56 +.m_pos_2 dd 0 ;+60 +.m_keys dd 0 ;+64 +.run_size dd 0 ;+68 +.position2 dd 0 ;+72 +.work_size dd 0 ;+76 +.all_redraw dd 0 ;+80 +.ar_offset dd 10 ;+84 ;--------------------------------------------------------------------- -align 4 +align 4 menu_data_1: -.type: dd 0 ;+0 +.type: dd 0 ;+0 .x: -.size_x dw 40 ;+4 -.start_x dw 20 ;+6 +.size_x dw 40 ;+4 +.start_x dw 20 ;+6 .y: -.size_y dw 15 ;+8 -.start_y dw 25 ;+10 -.text_pointer: dd menu_text_area ;0 ;+12 -.pos_pointer: dd menu_text_area.1 ;0 ;+16 -.text_end dd menu_text_area.end ;0 ;+20 -.mouse_pos dd 0 ;+24 -.mouse_keys dd 0 ;+28 +.size_y dw 15 ;+8 +.start_y dw 25 ;+10 +.text_pointer: dd menu_text_area ;0 ;+12 +.pos_pointer: dd menu_text_area.1 ;0 ;+16 +.text_end dd menu_text_area.end ;0 ;+20 +.mouse_pos dd 0 ;+24 +.mouse_keys dd 0 ;+28 .x1: -.size_x1 dw 80 ;+32 -.start_x1 dw 20 ;+34 +.size_x1 dw 80 ;+32 +.start_x1 dw 20 ;+34 .y1: -.size_y1 dw 100 ;+36 -.start_y1 dw 40 ;+38 -.bckg_col dd 0xeeeeee ;+40 -.frnt_col dd 0xff ;+44 -.menu_col dd 0xffffff ;+48 -.select dd 0 ;+52 -.out_select dd 0 ;+56 -.buf_adress dd 0 ;+60 -.procinfo dd procinfo ;+64 -.click dd 0 ;+68 -.cursor dd 0 ;+72 -.cursor_old dd 0 ;+76 -.interval dd 16 ;+80 -.cursor_max dd 0 ;+84 -.extended_key dd 0 ;+88 -.menu_sel_col dd 0x00cc00 ;+92 -.bckg_text_col dd 0 ; +96 -.frnt_text_col dd 0xffffff ;+100 -.mouse_keys_old dd 0 ;+104 -.font_height dd 8 ;+108 -.cursor_out dd 0 ;+112 -.get_mouse_flag dd 0 ;+116 +.size_y1 dw 100 ;+36 +.start_y1 dw 40 ;+38 +.bckg_col dd 0xeeeeee ;+40 +.frnt_col dd 0xff ;+44 +.menu_col dd 0xffffff ;+48 +.select dd 0 ;+52 +.out_select dd 0 ;+56 +.buf_adress dd 0 ;+60 +.procinfo dd procinfo ;+64 +.click dd 0 ;+68 +.cursor dd 0 ;+72 +.cursor_old dd 0 ;+76 +.interval dd 16 ;+80 +.cursor_max dd 0 ;+84 +.extended_key dd 0 ;+88 +.menu_sel_col dd 0x00cc00 ;+92 +.bckg_text_col dd 0 ; +96 +.frnt_text_col dd 0xffffff ;+100 +.mouse_keys_old dd 0 ;+104 +.font_height dd 8 ;+108 +.cursor_out dd 0 ;+112 +.get_mouse_flag dd 0 ;+116 ;------------------------- menu_text_area: -db 'File',0 +db 'File',0 .1: -db 'Open file',0 -db 'Save file',0 -db 'Select dir',0 -db 'Exit',0 +db 'Open file',0 +db 'Save file',0 +db 'Select dir',0 +db 'Exit',0 .end: -db 0 +db 0 ;--------------------------------------------------------------------- -align 4 +align 4 menu_data_2: -.type: dd 0 ;+0 +.type: dd 0 ;+0 .x: -.size_x dw 40 ;+4 -.start_x dw 60 ;+6 +.size_x dw 40 ;+4 +.start_x dw 60 ;+6 .y: -.size_y dw 15 ;+8 -.start_y dw 25 ;+10 -.text_pointer: dd menu_text_area_2 ;0 ;+12 -.pos_pointer: dd menu_text_area_2.1 ;0 ;+16 -.text_end dd menu_text_area_2.end ;0 ;+20 -.mouse_pos dd 0 ;+24 -.mouse_keys dd 0 ;+28 +.size_y dw 15 ;+8 +.start_y dw 25 ;+10 +.text_pointer: dd menu_text_area_2 ;0 ;+12 +.pos_pointer: dd menu_text_area_2.1 ;0 ;+16 +.text_end dd menu_text_area_2.end ;0 ;+20 +.mouse_pos dd 0 ;+24 +.mouse_keys dd 0 ;+28 .x1: -.size_x1 dw 50 ;+32 -.start_x1 dw 60 ;+34 +.size_x1 dw 50 ;+32 +.start_x1 dw 60 ;+34 .y1: -.size_y1 dw 100 ;+36 -.start_y1 dw 40 ;+38 -.bckg_col dd 0xeeeeee ;+40 -.frnt_col dd 0xff ;+44 -.menu_col dd 0xffffff ;+48 -.select dd 0 ;+52 -.out_select dd 0 ;+56 -.buf_adress dd 0 ;+60 -.procinfo dd procinfo ;+64 -.click dd 0 ;+68 -.cursor dd 0 ;+72 -.cursor_old dd 0 ;+76 -.interval dd 16 ;+80 -.cursor_max dd 0 ;+84 -.extended_key dd 0 ;+88 -.menu_sel_col dd 0x00cc00 ;+92 -.bckg_text_col dd 0 ; +96 -.frnt_text_col dd 0xffffff ;+100 -.mouse_keys_old dd 0 ;+104 -.font_height dd 8 ;+108 -.cursor_out dd 0 ;+112 -.get_mouse_flag dd 0 ;+116 +.size_y1 dw 100 ;+36 +.start_y1 dw 40 ;+38 +.bckg_col dd 0xeeeeee ;+40 +.frnt_col dd 0xff ;+44 +.menu_col dd 0xffffff ;+48 +.select dd 0 ;+52 +.out_select dd 0 ;+56 +.buf_adress dd 0 ;+60 +.procinfo dd procinfo ;+64 +.click dd 0 ;+68 +.cursor dd 0 ;+72 +.cursor_old dd 0 ;+76 +.interval dd 16 ;+80 +.cursor_max dd 0 ;+84 +.extended_key dd 0 ;+88 +.menu_sel_col dd 0x00cc00 ;+92 +.bckg_text_col dd 0 ; +96 +.frnt_text_col dd 0xffffff ;+100 +.mouse_keys_old dd 0 ;+104 +.font_height dd 8 ;+108 +.cursor_out dd 0 ;+112 +.get_mouse_flag dd 0 ;+116 ;------------------------ menu_text_area_2: -db 'Help',0 +db 'Help',0 .1: -db 'Test1',0 -db 'About',0 +db 'Test1',0 +db 'About',0 .end: -db 0 +db 0 ;--------------------------------------------------------------------- -align 4 +align 4 dinamic_button_data_1: -.type dd 0 ;+0 +.type dd 0 ;+0 .x: -.size_x dw 20 ;+4 -.start_x dw 110 ;+6 +.size_x dw 20 ;+4 +.start_x dw 110 ;+6 .y: -.size_y dw 20 ;+8 -.start_y dw 25 ;+10 -.mouse_pos dd 0 ;+12 -.mouse_keys dd 0 ;+16 -.mouse_keys_old dd 0 ;+20 -.active_raw dd 0 ;+24 -.passive_raw dd 0 ;+28 -.click_raw dd 0 ;+32 -.resolution_raw dd 0 ;+36 -.palette_raw dd 0 ;+40 -.offset_raw dd 0 ;+44 -.select dd 0 ;+48 -.click dd 0 ;+52 +.size_y dw 20 ;+8 +.start_y dw 25 ;+10 +.mouse_pos dd 0 ;+12 +.mouse_keys dd 0 ;+16 +.mouse_keys_old dd 0 ;+20 +.active_raw dd 0 ;+24 +.passive_raw dd 0 ;+28 +.click_raw dd 0 ;+32 +.resolution_raw dd 0 ;+36 +.palette_raw dd 0 ;+40 +.offset_raw dd 0 ;+44 +.select dd 0 ;+48 +.click dd 0 ;+52 ;--------------------------------------------------------------------- -align 4 +align 4 dinamic_button_data_2: -.type dd 0 ;+0 +.type dd 0 ;+0 .x: -.size_x dw 20 ;+4 -.start_x dw 140 ;+6 +.size_x dw 20 ;+4 +.start_x dw 140 ;+6 .y: -.size_y dw 20 ;+8 -.start_y dw 25 ;+10 -.mouse_pos dd 0 ;+12 -.mouse_keys dd 0 ;+16 -.mouse_keys_old dd 0 ;+20 -.active_raw dd 0 ;+24 -.passive_raw dd 0 ;+28 -.click_raw dd 0 ;+32 -.resolution_raw dd 0 ;+36 -.palette_raw dd 0 ;+40 -.offset_raw dd 0 ;+44 -.select dd 0 ;+48 -.click dd 0 ;+52 +.size_y dw 20 ;+8 +.start_y dw 25 ;+10 +.mouse_pos dd 0 ;+12 +.mouse_keys dd 0 ;+16 +.mouse_keys_old dd 0 ;+20 +.active_raw dd 0 ;+24 +.passive_raw dd 0 ;+28 +.click_raw dd 0 ;+32 +.resolution_raw dd 0 ;+36 +.palette_raw dd 0 ;+40 +.offset_raw dd 0 ;+44 +.select dd 0 ;+48 +.click dd 0 ;+52 ;--------------------------------------------------------------------- OpenDialog_data: .type dd 0 -.procinfo dd procinfo ;+4 -.com_area_name dd communication_area_name ;+8 -.com_area dd 0 ;+12 -.opendir_pach dd plugin_pach ;+16 -.dir_default_pach dd communication_area_default_pach ;+20 -.start_path dd library_path ;+24 -.draw_window dd draw_window ;+28 -.status dd 0 ;+32 -.openfile_pach dd openfile_pach ;+36 +.procinfo dd procinfo ;+4 +.com_area_name dd communication_area_name ;+8 +.com_area dd 0 ;+12 +.opendir_pach dd plugin_pach ;+16 +.dir_default_pach dd communication_area_default_pach ;+20 +.start_path dd library_path ;+24 +.draw_window dd draw_window ;+28 +.status dd 0 ;+32 +.openfile_pach dd openfile_pach ;+36 communication_area_name: db 'FFFFFFFF_open_dialog',0 @@ -434,7 +444,7 @@ communication_area_default_pach: db '/rd/1',0 Filter: -dd Filter.end - Filter +dd Filter.end - Filter db 'JPEG',0 db 'JPG',0 db 'JPE',0 @@ -444,4 +454,18 @@ db 'BMP',0 db 'KEX',0 .end: db 0 -;--------------------------------------------------------------------- \ No newline at end of file +;--------------------------------------------------------------------- +PathShow_data_1: +.type dd 0 ;+0 +.start_y dw 28 ;+4 +.start_x dw 172 ;+6 +.font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1 +.area_size_x dw 200 ;+10 +.font_number dd 0 ;+12 ; 0 - monospace, 1 - variable +.background_flag dd 0 ;+16 +.font_color dd 0x0 ;+20 +.background_color dd 0x0 ;+24 +.text_pointer dd openfile_pach ;+28 +.work_area_pointer dd text_work_area ;+32 +.temp_text_length dd 0 ;+36 +;--------------------------------------------------------------------- diff --git a/programs/develop/libraries/box_lib/trunk/bl_sys.mac b/programs/develop/libraries/box_lib/trunk/bl_sys.mac index da17da4283..b5b7ed57a8 100644 --- a/programs/develop/libraries/box_lib/trunk/bl_sys.mac +++ b/programs/develop/libraries/box_lib/trunk/bl_sys.mac @@ -1,8 +1,9 @@ -include 'editbox.mac' ;macro which should make life easier :) specially for editbox -include 'checkbox.mac' ;macro implements checkbox -include 'optionbox.mac' ;macro implements optionbox -include 'scrollbar.mac' ;macro implements scrollbar -include 'd_button.mac' ;macro implements dinamic_button -include 'menubar.mac' ;macro implements menubar -include 'filebrowser.mac' ;macro implements filebrowser -include 'tree_list.mac' ;macro implements tree_list, image_list, list_box \ No newline at end of file +include 'editbox.mac' ;macro which should make life easier :) specially for editbox +include 'checkbox.mac' ;macro implements checkbox +include 'optionbox.mac' ;macro implements optionbox +include 'scrollbar.mac' ;macro implements scrollbar +include 'd_button.mac' ;macro implements dinamic_button +include 'menubar.mac' ;macro implements menubar +include 'filebrowser.mac' ;macro implements filebrowser +include 'tree_list.mac' ;macro implements tree_list, image_list, list_box +include 'pathshow.mac' ;macro implements pathshow \ No newline at end of file diff --git a/programs/develop/libraries/box_lib/trunk/box_lib.asm b/programs/develop/libraries/box_lib/trunk/box_lib.asm index 282064c2de..f0838b990c 100644 --- a/programs/develop/libraries/box_lib/trunk/box_lib.asm +++ b/programs/develop/libraries/box_lib/trunk/box_lib.asm @@ -82,14 +82,13 @@ use_file_browser align 16 use_tree_list -;;;;;;;;;;; -;;Data -;;;;;;;;;;; -;align 16 -;mouse_flag dd 0x0 - ;-------------------------------------------------- -;align 16 +;PathShow Group +;-------------------------------------------------- +align 16 +use_path_show + +align 16 init: ret @@ -98,94 +97,98 @@ align 16 EXPORTS: - dd sz_init, init - dd sz_version, 0x00000001 +dd sz_init, init +dd sz_version, 0x00000001 - dd sz_edit_box, edit_box - dd sz_edit_box_key, edit_box_key - dd sz_edit_box_mouse, edit_box_mouse - dd szVersion_ed, 0x00000001 +dd sz_edit_box, edit_box +dd sz_edit_box_key, edit_box_key +dd sz_edit_box_mouse, edit_box_mouse +dd szVersion_ed, 0x00000001 - dd sz_check_box_draw, check_box_draw - dd sz_check_box_mouse, check_box_mouse - dd szVersion_ch, 0x00000001 +dd sz_check_box_draw, check_box_draw +dd sz_check_box_mouse, check_box_mouse +dd szVersion_ch, 0x00000001 - dd sz_option_box_draw, option_box_draw - dd sz_option_box_mouse, option_box_mouse - dd szVersion_op, 0x00000001 +dd sz_option_box_draw, option_box_draw +dd sz_option_box_mouse, option_box_mouse +dd szVersion_op, 0x00000001 - dd sz_Scrollbar_ver_draw, scroll_bar_vertical.draw - dd sz_Scrollbar_ver_mouse, scroll_bar_vertical.mouse - dd sz_Scrollbar_hor_draw, scroll_bar_horizontal.draw - dd sz_Scrollbar_hor_mouse, scroll_bar_horizontal.mouse - dd szVersion_scrollbar, 0x00010001 +dd sz_Scrollbar_ver_draw, scroll_bar_vertical.draw +dd sz_Scrollbar_ver_mouse, scroll_bar_vertical.mouse +dd sz_Scrollbar_hor_draw, scroll_bar_horizontal.draw +dd sz_Scrollbar_hor_mouse, scroll_bar_horizontal.mouse +dd szVersion_scrollbar, 0x00010001 - dd sz_Dbutton_draw, dinamic_button.draw - dd sz_Dbutton_mouse, dinamic_button.mouse - dd szVersion_dbutton, 0x00010001 +dd sz_Dbutton_draw, dinamic_button.draw +dd sz_Dbutton_mouse, dinamic_button.mouse +dd szVersion_dbutton, 0x00010001 - dd sz_Menu_bar_draw, menu_bar.draw - dd sz_Menu_bar_mouse, menu_bar.mouse - dd sz_Menu_bar_activate, menu_bar.activate - dd szVersion_menu_bar, 0x00010002 +dd sz_Menu_bar_draw, menu_bar.draw +dd sz_Menu_bar_mouse, menu_bar.mouse +dd sz_Menu_bar_activate, menu_bar.activate +dd szVersion_menu_bar, 0x00010002 - dd sz_FileBrowser_draw, fb_draw_panel - dd sz_FileBrowser_mouse, fb_mouse - dd sz_FileBrowser_key, fb_key - dd szVersion_FileBrowser, 0x00010001 +dd sz_FileBrowser_draw, fb_draw_panel +dd sz_FileBrowser_mouse, fb_mouse +dd sz_FileBrowser_key, fb_key +dd szVersion_FileBrowser, 0x00010001 - dd sz_tl_data_init, tl_data_init - dd sz_tl_data_clear, tl_data_clear - dd sz_tl_info_clear, tl_info_clear - dd sz_tl_key, tl_key - dd sz_tl_mouse, tl_mouse - dd sz_tl_draw, tl_draw - dd sz_tl_info_undo, tl_info_undo - dd sz_tl_info_redo, tl_info_redo - dd sz_tl_node_add, tl_node_add - dd sz_tl_node_set_data,tl_node_set_data - dd sz_tl_node_get_data,tl_node_get_data - dd sz_tl_node_delete,tl_node_delete - dd sz_tl_cur_beg, tl_cur_beg - dd sz_tl_cur_next, tl_cur_next - dd sz_tl_cur_perv, tl_cur_perv - dd sz_tl_node_close_open,tl_node_close_open - dd sz_tl_node_lev_inc,tl_node_lev_inc - dd sz_tl_node_lev_dec,tl_node_lev_dec - dd sz_tl_node_move_up,tl_node_move_up - dd sz_tl_node_move_down, tl_node_move_down - dd sz_tl_node_poi_get_info, tl_node_poi_get_info - dd sz_tl_node_poi_get_next_info,tl_node_poi_get_next_info - dd sz_tl_node_poi_get_data, tl_node_poi_get_data - dd sz_tl_save_mem, tl_save_mem - dd sz_tl_load_mem, tl_load_mem - dd sz_tl_get_mem_size,tl_get_mem_size - dd sz_tl_version_tree_list, 0x00000001 +dd sz_tl_data_init, tl_data_init +dd sz_tl_data_clear, tl_data_clear +dd sz_tl_info_clear, tl_info_clear +dd sz_tl_key, tl_key +dd sz_tl_mouse, tl_mouse +dd sz_tl_draw, tl_draw +dd sz_tl_info_undo, tl_info_undo +dd sz_tl_info_redo, tl_info_redo +dd sz_tl_node_add, tl_node_add +dd sz_tl_node_set_data, tl_node_set_data +dd sz_tl_node_get_data, tl_node_get_data +dd sz_tl_node_delete, tl_node_delete +dd sz_tl_cur_beg, tl_cur_beg +dd sz_tl_cur_next, tl_cur_next +dd sz_tl_cur_perv, tl_cur_perv +dd sz_tl_node_close_open, tl_node_close_open +dd sz_tl_node_lev_inc, tl_node_lev_inc +dd sz_tl_node_lev_dec, tl_node_lev_dec +dd sz_tl_node_move_up, tl_node_move_up +dd sz_tl_node_move_down, tl_node_move_down +dd sz_tl_node_poi_get_info, tl_node_poi_get_info +dd sz_tl_node_poi_get_next_info, tl_node_poi_get_next_info +dd sz_tl_node_poi_get_data, tl_node_poi_get_data +dd sz_tl_save_mem, tl_save_mem +dd sz_tl_load_mem, tl_load_mem +dd sz_tl_get_mem_size, tl_get_mem_size +dd sz_tl_version_tree_list, 0x00000001 - dd 0,0 +dd sz_PathShow_prepare, path_show.prepare +dd sz_PathShow_draw, path_show.draw +dd szVersion_path_show, 0x00010001 + +dd 0,0 -sz_init db 'lib_init',0 -sz_version db 'version',0 +sz_init db 'lib_init',0 +sz_version db 'version',0 -sz_edit_box db 'edit_box',0 -sz_edit_box_key db 'edit_box_key',0 -sz_edit_box_mouse db 'edit_box_mouse',0 -szVersion_ed db 'version_ed',0 +sz_edit_box db 'edit_box',0 +sz_edit_box_key db 'edit_box_key',0 +sz_edit_box_mouse db 'edit_box_mouse',0 +szVersion_ed db 'version_ed',0 -sz_check_box_draw db 'check_box_draw',0 -sz_check_box_mouse db 'check_box_mouse',0 -szVersion_ch db 'version_ch',0 +sz_check_box_draw db 'check_box_draw',0 +sz_check_box_mouse db 'check_box_mouse',0 +szVersion_ch db 'version_ch',0 -sz_option_box_draw db 'option_box_draw',0 -sz_option_box_mouse db 'option_box_mouse',0 -szVersion_op db 'version_op',0 +sz_option_box_draw db 'option_box_draw',0 +sz_option_box_mouse db 'option_box_mouse',0 +szVersion_op db 'version_op',0 -sz_Scrollbar_ver_draw db 'scrollbar_v_draw',0 -sz_Scrollbar_ver_mouse db 'scrollbar_v_mouse',0 -sz_Scrollbar_hor_draw db 'scrollbar_h_draw',0 -sz_Scrollbar_hor_mouse db 'scrollbar_h_mouse',0 -szVersion_scrollbar db 'version_scrollbar',0 +sz_Scrollbar_ver_draw db 'scrollbar_v_draw',0 +sz_Scrollbar_ver_mouse db 'scrollbar_v_mouse',0 +sz_Scrollbar_hor_draw db 'scrollbar_h_draw',0 +sz_Scrollbar_hor_mouse db 'scrollbar_h_mouse',0 +szVersion_scrollbar db 'version_scrollbar',0 sz_Dbutton_draw db 'dbutton_draw',0 sz_Dbutton_mouse db 'dbutton_mouse',0 @@ -193,7 +196,7 @@ szVersion_dbutton db 'version_dbutton',0 sz_Menu_bar_draw db 'menu_bar_draw',0 sz_Menu_bar_mouse db 'menu_bar_mouse',0 -sz_Menu_bar_activate db 'menu_bar_activate',0 +sz_Menu_bar_activate db 'menu_bar_activate',0 szVersion_menu_bar db 'version_menu_bar',0 sz_FileBrowser_draw db 'FileBrowser_draw',0 @@ -201,30 +204,34 @@ sz_FileBrowser_mouse db 'FileBrowser_mouse',0 sz_FileBrowser_key db 'FileBrowser_key',0 szVersion_FileBrowser db 'version_FileBrowser',0 - sz_tl_data_init db 'tl_data_init',0 - sz_tl_data_clear db 'tl_data_clear',0 - sz_tl_info_clear db 'tl_info_clear',0 - sz_tl_key db 'tl_key',0 - sz_tl_mouse db 'tl_mouse',0 - sz_tl_draw db 'tl_draw',0 - sz_tl_info_undo db 'tl_info_undo',0 - sz_tl_info_redo db 'tl_info_redo',0 - sz_tl_node_add db 'tl_node_add',0 - sz_tl_node_set_data db 'tl_node_set_data',0 - sz_tl_node_get_data db 'tl_node_get_data',0 - sz_tl_node_delete db 'tl_node_delete',0 - sz_tl_cur_beg db 'tl_cur_beg',0 - sz_tl_cur_next db 'tl_cur_next',0 - sz_tl_cur_perv db 'tl_cur_perv',0 - sz_tl_node_close_open db 'tl_node_close_open',0 - sz_tl_node_lev_inc db 'tl_node_lev_inc',0 - sz_tl_node_lev_dec db 'tl_node_lev_dec',0 - sz_tl_node_move_up db 'tl_node_move_up',0 - sz_tl_node_move_down db 'tl_node_move_down',0 - sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0 - sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0 - sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0 - sz_tl_save_mem db 'tl_save_mem',0 - sz_tl_load_mem db 'tl_load_mem',0 - sz_tl_get_mem_size db 'tl_get_mem_size',0 - sz_tl_version_tree_list db 'version_tree_list',0 \ No newline at end of file +sz_tl_data_init db 'tl_data_init',0 +sz_tl_data_clear db 'tl_data_clear',0 +sz_tl_info_clear db 'tl_info_clear',0 +sz_tl_key db 'tl_key',0 +sz_tl_mouse db 'tl_mouse',0 +sz_tl_draw db 'tl_draw',0 +sz_tl_info_undo db 'tl_info_undo',0 +sz_tl_info_redo db 'tl_info_redo',0 +sz_tl_node_add db 'tl_node_add',0 +sz_tl_node_set_data db 'tl_node_set_data',0 +sz_tl_node_get_data db 'tl_node_get_data',0 +sz_tl_node_delete db 'tl_node_delete',0 +sz_tl_cur_beg db 'tl_cur_beg',0 +sz_tl_cur_next db 'tl_cur_next',0 +sz_tl_cur_perv db 'tl_cur_perv',0 +sz_tl_node_close_open db 'tl_node_close_open',0 +sz_tl_node_lev_inc db 'tl_node_lev_inc',0 +sz_tl_node_lev_dec db 'tl_node_lev_dec',0 +sz_tl_node_move_up db 'tl_node_move_up',0 +sz_tl_node_move_down db 'tl_node_move_down',0 +sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0 +sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0 +sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0 +sz_tl_save_mem db 'tl_save_mem',0 +sz_tl_load_mem db 'tl_load_mem',0 +sz_tl_get_mem_size db 'tl_get_mem_size',0 +sz_tl_version_tree_list db 'version_tree_list',0 + +sz_PathShow_prepare db 'PathShow_prepare',0 +sz_PathShow_draw db 'PathShow_draw',0 +szVersion_path_show db 'version_PathShow',0 diff --git a/programs/develop/libraries/box_lib/trunk/pathshow.mac b/programs/develop/libraries/box_lib/trunk/pathshow.mac new file mode 100644 index 0000000000..b4ae616305 --- /dev/null +++ b/programs/develop/libraries/box_lib/trunk/pathshow.mac @@ -0,0 +1,152 @@ +;************************************************************** +; Path Show Macro for Kolibri OS +; Copyright (c) 2010, Marat Zakiyanov aka Mario79, aka Mario +; All rights reserved. +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions are met: +; * Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; * Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in the +; documentation and/or other materials provided with the distribution. +; * Neither the name of the nor the +; names of its contributors may be used to endorse or promote products +; derived from this software without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY +; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +; DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +;***************************************************************************** +macro path_show_start +{ + pusha + mov edi,dword [esp+36] +} +;***************************************************************************** +macro path_show_exit +{ +popa +ret 4 +} +;***************************************************************************** +macro use_path_show +{ +path_show: +ps_type equ [edi] ;dword +ps_start_y equ [edi+4] ;word +ps_start_x equ [edi+6] ;word +ps_font_size_x equ [edi+8] ;word +ps_area_size_x equ [edi+10] ;word +ps_font_number equ [edi+12] ;dword +ps_background_flag equ [edi+16] ;dword +ps_font_color equ [edi+20] ;dword +ps_background_color equ [edi+24] ;dword +ps_text_pointer equ [edi+28] ;dword +ps_work_area_pointer equ [edi+32] ;dword +ps_temp_text_length equ [edi+36] ;dword +;***************************************************************************** +;***************************************************************************** +; draw event +;***************************************************************************** +;***************************************************************************** +.prepare: +path_show_start +;------------------------------------- + mov esi,ps_text_pointer + xor eax,eax + xor ecx,ecx + dec ecx + cld +@@: + lodsb + inc ecx + test eax,eax + jnz @b + mov ps_temp_text_length,ecx + movzx eax,word ps_font_size_x + imul ecx,eax + movzx eax,word ps_area_size_x + cmp ecx,eax + jae .cut +;------------------------------------- + mov esi,ps_text_pointer + mov edi,ps_work_area_pointer + xor eax,eax +@@: + lodsb + stosb + test eax,eax + jnz @b + jmp .exit +;------------------------------------- +.cut: +; copy the first 6 characters of path + mov esi,ps_text_pointer + push edi + mov edi,ps_work_area_pointer + mov ecx,6 + rep movsb +; insert a line break '...' + mov al,byte '.' + mov ecx,3 + rep stosb + mov ecx,edi +; calculate the display length, in characters + pop edi + movzx ebx,word ps_font_size_x + movzx eax,word ps_area_size_x + xor edx,edx + div ebx + sub eax,9 +; eax - maximum length of display area, the number of characters + mov esi,ps_temp_text_length + add esi,ps_text_pointer + sub esi,eax +; esi - pointer of the last segment of the displayed text + mov edi,ecx + mov ecx,eax + rep movsb + xor eax,eax + stosb +;------------------------------------- +.exit: +path_show_exit +;***************************************************************************** +;***************************************************************************** +; draw event +;***************************************************************************** +;***************************************************************************** +.draw: +path_show_start +;------------------------------------- + mov ebx,ps_start_y + xor ecx,ecx + or ecx,0x80000000 + mov eax,ps_background_flag + and eax,1b + shl eax,30 + add ecx,eax + mov eax,ps_font_number + and eax,11b + shl eax,28 + add ecx,eax + mov eax,ps_font_color + and eax,0xffffff + add ecx,eax + mov edx,ps_work_area_pointer + mov eax,ps_background_color + and eax,0xffffff + xor esi,esi + mov edi,eax + mcall 4 +path_show_exit +} +;*****************************************************************************