From 23bf5e60aea02a959793e10d8f8c15ea72aa79f1 Mon Sep 17 00:00:00 2001 From: Yogev Ezra Date: Sat, 29 Jan 2011 18:25:55 +0000 Subject: [PATCH] Add KFM v0.47b sources to SVN. git-svn-id: svn://kolibrios.org@1792 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/fs/kfm/trunk/EDITBOX.INC | 278 ++++ programs/fs/kfm/trunk/KFM.ASM | 410 ++++++ programs/fs/kfm/trunk/build.bat | 2 + programs/fs/kfm/trunk/button.inc | 267 ++++ programs/fs/kfm/trunk/buttons.bmp | Bin 0 -> 6486 bytes programs/fs/kfm/trunk/confirm.inc | 146 ++ programs/fs/kfm/trunk/conv_bmp.inc | 59 + programs/fs/kfm/trunk/convchar.inc | 49 + programs/fs/kfm/trunk/copy.inc | 460 +++++++ programs/fs/kfm/trunk/creatdir.inc | 174 +++ programs/fs/kfm/trunk/data.inc | 220 +++ programs/fs/kfm/trunk/delete.inc | 342 +++++ programs/fs/kfm/trunk/detect.inc | 137 ++ .../fs/kfm/trunk/docs/english/history.txt | 311 +++++ .../fs/kfm/trunk/docs/english/kfm_keys.txt | 43 + .../docs/russian/dos_kolibri/history.txt | 343 +++++ .../docs/russian/dos_kolibri/kfm_keys.txt | 46 + .../trunk/docs/russian/windows/history.txt | 343 +++++ .../trunk/docs/russian/windows/kfm_keys.txt | 46 + programs/fs/kfm/trunk/draw.inc | 1210 +++++++++++++++++ programs/fs/kfm/trunk/editbox.mac | 1129 +++++++++++++++ programs/fs/kfm/trunk/err_wind.inc | 58 + programs/fs/kfm/trunk/exit.inc | 6 + programs/fs/kfm/trunk/file_inf.inc | 481 +++++++ programs/fs/kfm/trunk/files.inc | 476 +++++++ programs/fs/kfm/trunk/help.inc | 9 + programs/fs/kfm/trunk/icons.bmp | Bin 0 -> 5238 bytes programs/fs/kfm/trunk/key.inc | 719 ++++++++++ programs/fs/kfm/trunk/kfm.ini | 157 +++ programs/fs/kfm/trunk/macros.inc | 269 ++++ programs/fs/kfm/trunk/markfile.inc | 158 +++ programs/fs/kfm/trunk/menu_bar.inc | 47 + programs/fs/kfm/trunk/menu_drv.inc | 420 ++++++ programs/fs/kfm/trunk/mouse.inc | 266 ++++ programs/fs/kfm/trunk/openfile.inc | 122 ++ programs/fs/kfm/trunk/progrbar.inc | 170 +++ programs/fs/kfm/trunk/resource.inc | 70 + programs/fs/kfm/trunk/scroll.inc | 543 ++++++++ programs/fs/kfm/trunk/sort.inc | 836 ++++++++++++ programs/fs/kfm/trunk/text.inc | 203 +++ programs/fs/kfm/trunk/tran_ini.inc | 186 +++ 41 files changed, 11211 insertions(+) create mode 100644 programs/fs/kfm/trunk/EDITBOX.INC create mode 100644 programs/fs/kfm/trunk/KFM.ASM create mode 100644 programs/fs/kfm/trunk/build.bat create mode 100644 programs/fs/kfm/trunk/button.inc create mode 100644 programs/fs/kfm/trunk/buttons.bmp create mode 100644 programs/fs/kfm/trunk/confirm.inc create mode 100644 programs/fs/kfm/trunk/conv_bmp.inc create mode 100644 programs/fs/kfm/trunk/convchar.inc create mode 100644 programs/fs/kfm/trunk/copy.inc create mode 100644 programs/fs/kfm/trunk/creatdir.inc create mode 100644 programs/fs/kfm/trunk/data.inc create mode 100644 programs/fs/kfm/trunk/delete.inc create mode 100644 programs/fs/kfm/trunk/detect.inc create mode 100644 programs/fs/kfm/trunk/docs/english/history.txt create mode 100644 programs/fs/kfm/trunk/docs/english/kfm_keys.txt create mode 100644 programs/fs/kfm/trunk/docs/russian/dos_kolibri/history.txt create mode 100644 programs/fs/kfm/trunk/docs/russian/dos_kolibri/kfm_keys.txt create mode 100644 programs/fs/kfm/trunk/docs/russian/windows/history.txt create mode 100644 programs/fs/kfm/trunk/docs/russian/windows/kfm_keys.txt create mode 100644 programs/fs/kfm/trunk/draw.inc create mode 100644 programs/fs/kfm/trunk/editbox.mac create mode 100644 programs/fs/kfm/trunk/err_wind.inc create mode 100644 programs/fs/kfm/trunk/exit.inc create mode 100644 programs/fs/kfm/trunk/file_inf.inc create mode 100644 programs/fs/kfm/trunk/files.inc create mode 100644 programs/fs/kfm/trunk/help.inc create mode 100644 programs/fs/kfm/trunk/icons.bmp create mode 100644 programs/fs/kfm/trunk/key.inc create mode 100644 programs/fs/kfm/trunk/kfm.ini create mode 100644 programs/fs/kfm/trunk/macros.inc create mode 100644 programs/fs/kfm/trunk/markfile.inc create mode 100644 programs/fs/kfm/trunk/menu_bar.inc create mode 100644 programs/fs/kfm/trunk/menu_drv.inc create mode 100644 programs/fs/kfm/trunk/mouse.inc create mode 100644 programs/fs/kfm/trunk/openfile.inc create mode 100644 programs/fs/kfm/trunk/progrbar.inc create mode 100644 programs/fs/kfm/trunk/resource.inc create mode 100644 programs/fs/kfm/trunk/scroll.inc create mode 100644 programs/fs/kfm/trunk/sort.inc create mode 100644 programs/fs/kfm/trunk/text.inc create mode 100644 programs/fs/kfm/trunk/tran_ini.inc diff --git a/programs/fs/kfm/trunk/EDITBOX.INC b/programs/fs/kfm/trunk/EDITBOX.INC new file mode 100644 index 0000000000..3b78616a02 --- /dev/null +++ b/programs/fs/kfm/trunk/EDITBOX.INC @@ -0,0 +1,278 @@ +; SEE YOU File FAQ.txt and HISTORY. Good Like! +;;;;;;;;;;;;;;;;;; +include 'editbox.mac' ;макрос который должен облегчить жизнь :) специально для editbox +;;;;;;;;;;;;;;;;;; +macro use_edit_box procinfo,scr_h,scr_w +{ +edit_box: +ed_width equ [edi] ;ширина компонента +ed_left equ [edi+4] ;положение по оси х +ed_top equ [edi+8] ;положение по оси у +ed_color equ [edi+12] ;цвет фона компонента +shift_color equ [edi+16] ;=0x6a9480 +ed_focus_border_color equ [edi+20] ;цвет рамки компонента +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+42] ;кол-во символов +ed_pos equ [edi+46] ;позиция курсора +ed_offset equ [edi+50] ;смещение +cl_curs_x equ [edi+54] ;предыдущее координата курсора по х +cl_curs_y equ [edi+58] ;предыдущее координата курсора по у +ed_shift_pos equ [edi+62] ;положение курсора +ed_shift_pos_old equ [edi+66] ;старое положение курсора +;========================================================== +;=== процедура прорисовки ================================= +;========================================================== +.draw: +pusha +;--- рисуем рамку --- + call .draw_border ; Функция стабильна +.draw_bg_cursor_text: +;--- изменяем смещение, если надо --- + call .check_offset ;вычисление позиции курсора стабильна +;--- рисуем внутреннюю область --- + call .draw_bg ;нарисовать прямоугольник рабочей области +;---- рисуем выделение, по shift если есть + call .draw_shift +.draw_cursor_text: +;--- рисуем курсор --- + ;--- может его не надо рисовать ---- + test word ed_flags,ed_focus + je @f + call .draw_cursor +@@: + call .draw_text +;;;;;;;;;;;;;;;;;;;;;;;;;; +;Общий выход из editbox для всех функций и пост обработчиков +;;;;;;;;;;;;;;;;;;;;;;;;;; +.editbox_exit: +edit_ex +;========================================================== +;=== обработка клавиатуры ================================= +;========================================================== +.key: +pusha + test word ed_flags,ed_focus ; если не в фокусе, выходим + je .editbox_exit + test word ed_flags,ed_mouse_on + jne .editbox_exit + +;Проверка нажат shift ? + call .check_shift +;---------------------------------------------------------- +;--- проверяем, что нажато -------------------------------- +;---------------------------------------------------------- +use_key_process backspase,delete,left,right,home,end,insert +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Заглушка на обработку клавиш вверх и вниз т.е. при обнаружении этих кодов происходит выход из обработчика +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +use_key_no_process up,down,esc +;--- нажата другая клавиша --- +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Проверка установлен ли флаг при котором нужно выводить только цифры в нужном боксе если такойнеобходимости нет нужно закоментировать макрос +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +use_key_figures_only +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;проверка на shift был ли нажат +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +are_key_shift_press +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; проверяем, находится ли курсор в конце + дальнейшая обработка +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +are_key_cur_end +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Обработка клавиш insert,delete.backspase,home,end,left,right +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +use_work_key +;========================================================== +;=== обработка мыши ======================================= +;========================================================== +.mouse: +pusha +;debug +;---------------------------------------------------------- +;--- получаем состояние кнопок мыши ----------------------- +;---------------------------------------------------------- + mcall 37,2 +;---------------------------------------------------------- +;--- проверяем состояние ---------------------------------- +;---------------------------------------------------------- + test eax,1 + jnz .mouse_left_button + and word ed_flags,ed_mouse_on_off + xor ebx,ebx + mov dword [mouse_flag],ebx + jmp .editbox_exit +.mouse_left_button: +;---------------------------------------------------------- +;--- блокировка от фокусировки в других боксах при попадании на них курсора +;---------------------------------------------------------- + mov eax,dword [mouse_flag] + test eax,eax + jz @f + cmp eax,edi + je @f + jmp ._blur +;---------------------------------------------------------- +;--- получаем координаты мыши относительно 0 т.е всей области экрана +;---------------------------------------------------------- +@@: mcall 37,0 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Функция обработки мышки получение координат и проверка их + выделения +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +use_work_mause scr_h,scr_w +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Общие функции обработки +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +use_general_func +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Функции для работы с key +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +use_key_func +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Функции для работы с mouse +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +use_mouse_func scr_w +} +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Bit mask from editbox +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +ed_figure_only= 1000000000000000b ;одни символы +ed_always_focus= 100000000000000b +ed_focus= 10b ;фокус приложения +ed_shift_on= 1000b ;если не установлен -значит впервые нажат shift,если был установлен, значит мы уже что - то делали удерживая shift +ed_shift_on_off=1111111111110111b +ed_shift= 100b ;включается при нажатии на shift т.е. если нажимаю +ed_shift_off= 1111111111111011b +ed_shift_bac= 10000b ;бит для очистки выделеного shift т.е. при установке говорит что есть выделение +ed_shift_bac_cl=1111111111101111b ;очистка при удалении выделения +ed_shift_cl= 1111111111100011b +ed_shift_mcl= 1111111111111011b +ed_left_fl= 100000b +ed_right_fl= 1111111111011111b +ed_offset_fl= 1000000b +ed_offset_cl= 1111111110111111b +ed_insert= 10000000b +ed_insert_cl= 1111111101111111b +ed_mouse_on = 100000000b +ed_mous_adn_b= 100011000b +ed_mouse_on_off=1111111011111111b +ed_height=14 ; высота +macro draw_edit_boxes start,_end,use_f9,procinfo +{ +if use_f9 eq +else + mcall 9,procinfo,-1 +end if + mov edi,start + mov ecx,((_end-start)/ed_struc_size) +@@: + call edit_box.draw + add edi,ed_struc_size + loop @b +} + +macro mouse_edit_boxes start,_end +{ + mov edi,start + mov ecx,((_end-start)/ed_struc_size) +@@: + call edit_box.mouse + add edi,ed_struc_size + loop @b +} + +macro key_edit_boxes start,end +{ + mov edi,start + mov ecx,((end-start)/ed_struc_size) +@@: + call edit_box.key + add edi,ed_struc_size + loop @b +} +ed_struc_size=70 +struc edit_box width,left,top,color,shift_color,focus_border_color,\ + blur_border_color,text_color,max,text,flags,size,pos +{ +.width dd width +.left dd left +.top dd top +.color dd color +.shift_color dd shift_color +.focus_border_color dd focus_border_color +.blur_border_color dd blur_border_color +.text_color dd text_color +.max dd max +.text dd text +.flags dw flags+0 +.size dd size+0 +.pos dd pos+0 +.offset dd 0 +.cl_curs_x dd 0 +.cl_curs_y dd 0 +.shift dd 0 +.shift_old dd 0 +} + + +macro edit_boxes_set_sys_color start,end,color_table +{ + mov edi,start + mov ecx,((end-start)/ed_struc_size) + mov esi,color_table +@@: + mov eax,[esi+36] + mov ebx,[esi+20] + mov ed_focus_border_color,eax + shr bh,1 + shr bl,1 + shr ah,1 + shr al,1 + add ah,bh + add al,bl + ror eax,16 + ror ebx,16 + shr bl,1 + shr al,1 + add al,bl + ror eax,16 + mov ed_blur_border_color,eax + add edi,ed_struc_size + loop @b +} + +macro draw_edit_box ed_ptr,use_f9,procinfo +{ +if use_f9 eq +else + mcall 9,procinfo,-1 +end if + mov edi,ed_ptr + call edit_box.draw +} + +macro mouse_edit_box ed_ptr +{ + mov edi,ed_ptr + call edit_box.mouse +} + +macro key_edit_box ed_ptr +{ + mov edi,ed_ptr + call edit_box.key +} +macro default_box ed_ptr +{ +pusha +; xor eax,eax +; mov ed_shift_pos,eax +; mov ed_shift_pos_old,eax + and word ed_flags,ed_shift_cl +; mov ed_offset,eax +popa +} \ No newline at end of file diff --git a/programs/fs/kfm/trunk/KFM.ASM b/programs/fs/kfm/trunk/KFM.ASM new file mode 100644 index 0000000000..f5210e45bb --- /dev/null +++ b/programs/fs/kfm/trunk/KFM.ASM @@ -0,0 +1,410 @@ +;************************************************************** +; KFM - Kolibri File Manager +;************************************************************** +use32 + db 'MENUET01' + dd 0x01 + dd START + dd I_END + dd mem + dd stacktop + dd 0x0 + dd path + +;include 'lang.inc' +;include 'kglobals.inc' +include 'macros.inc' +include 'editbox.inc' +;use_edit_box +use_edit_box procinfo +;include 'ASCGL.INC' +;--------------------------------------------------------------------- +include 'files.inc' +;--------------------------------------------------------------------- +STRLEN = 1024 +;--------------------------------------------------------------------- +START: + mcall 9, procinfo, -1 + mov eax,[ebx+30] + mov [PID],eax + xor ecx,ecx +@@: + inc ecx + mcall 9, procinfo + mov eax,[PID] + cmp eax,[ebx+30] + jne @r + mov [active_process],ecx + mov [appl_memory],mem + mov ax,[select_disk_char] + mov [read_folder_name],ax + mov [read_folder_1_name],ax + call load_icon_and_convert_to_img + call load_buttons_and_convert_to_img + call load_initiation_file + call add_memory_for_folders + call device_detect + call device_detect_f70 + mcall 66, 1, 1 +; call draw_window +; xor eax,eax + mov eax,1 + mov [left_sort_flag],eax + mov [right_sort_flag],eax + + call proc_read_left_folder + test eax,eax + jz @f + cmp eax,6 + jne read_folder_error +@@: + call proc_read_right_folder + test eax,eax + jz @f + cmp eax,6 + jne read_folder_1_error +@@: + mcall 40, 0x27 + jmp red_1 +;--------------------------------------------------------------------- +red: + call get_window_param + test [window_status],10b + jnz red_1 ;still + test [window_status],100b + jnz red_1 + cmp [window_high],180 + ja @f + mov esi,180 + mcall 67,-1,ebx,ebx +@@: + cmp [window_width],495 + ja red_1 + mov edx,495 + mcall 67,-1,ebx, ,ebx +red_1: + call draw_window +;--------------------------------------------------------------------- +still: + mcall 10 + cmp eax,1 + je red + cmp eax,2 + je key + cmp eax,3 + je button + cmp eax,6 + je mouse + jmp still +;--------------------------------------------------------------------- +get_window_param: + mcall 9, procinfo, -1 + mov eax,[ebx+46] + mov [window_high],eax + mov eax,[ebx+42] + mov [window_width],eax + mov eax,[ebx+70] + mov [window_status],eax + mcall 48,4 + mov [skin_high],eax + ret +;--------------------------------------------------------------------- +draw_window: + mcall 12, 1 +; mcall 0, <20,620>, <20,460>, 0x03cccccc ; 0x805080D0, 0x005080D0 + xor esi,esi + mcall 0, <20,620>, <20,460>, 0x43cccccc ; 0x805080D0, 0x005080D0 + call get_window_param +; mov ecx,[temp_esi] + test [window_status],10b + jnz @f + mcall 71, 1 , header + ; create_dir_name + ; start_parameter + ; file_name + ; [temp_edi] + ; header + ; delete_file_data.name + ; start_file_data.name + ; start_parameter + ; start_file_data.name + ; read_icon_file.name + ; read_file_features.name ;path ;header + + cmp [window_high],180 + jb @f + cmp [window_width],495 + jb @f + +; pusha +; mcall 4,<15,25>,0,read_folder.name,100 +; popa + call draw_fbutton + +; mov [left_panel_clear_all],1 + + call draw_left_panel + +; mov [right_panel_clear_all],1 + + call draw_right_panel + call draw_device_button + call draw_left_select_disk_button + call draw_left_sort_button + call draw_right_select_disk_button + call draw_right_sort_button + call draw_menu_bar + call draw_buttons_panel + call draw_ATAPI_tray_control + +; mcall 47,0x80000,[left_scroll_compens],<300, 5>,0xffffff +; call mouse.draw_data +; mcall 18, 7 +; mov [temp_eax],eax +; mcall 47,0x80000,[active_process],<300, 5>,0xffffff +; mcall 47,0x80000,[left_marked_counter],<300, 5>,0xffffff +; mcall 47,0x80000,[right_marked_counter],<400, 5>,0xffffff +; mcall 47,0x80000,[sorting_low_limit],<100, 5>,0xffffff +; mcall 47,0x80000,[sort_counter],<200, 5>,0xffffff +; mcall 47,0x80000,[sorting_high_limit],<300, 5>,0xffffff +; mcall 47,0x80000,[dir_temp_counter],<400, 5>,0xffffff + +; mcall 47,0x80000,[timer_tick],<500, 5>,0xffffff +; mcall 47,0x80000,[temp_eax],<400, 5>,0xffffff +; mcall 47,0x80000,[temp_ebx],<400, 5>,0xffffff +; mcall 47,0x80000,[temp_ecx],<500, 5>,0xffffff +; mcall 47,0x80000,[temp_ebx],<500, 5>,0xffffff +; mcall 47,0x80000,[ini_file_start],<100, 5>,0xffffff +; mcall 47,0x80000,[left_folder_data],<200, 5>,0xffffff +; mcall 47,0x80000,[right_folder_data],<300, 5>,0xffffff +; mcall 47,0x80000,[appl_memory],<500, 5>,0xffffff +; mcall 47,0x80000,[temp_znak],<500, 5>,0xffffff + +; mcall 47,0x80000,[sort_counter],<200, 5>,0xffffff +; mcall 47,0x80000,[temp_edi],<250, 5>,0xffffff +; mcall 47,0x80000,[temp_esi],<300, 5>,0xffffff +; mcall 47,0x80000,[temp_ecx],<350, 5>,0xffffff +; mcall 47,0x80000,[temp_znak],<400, 5>,0xffffff + +; movzx ecx,[left_start_draw_cursor_line] +; mcall 47,0x40000, ,<300, 5>,0xffffff +; mcall 47,0x40000,[left_start_draw_line],<400, 5>,0xffffff + +; mcall 47,0x40000,[window_width],<100, 5>,0xffffff +; mcall 47,0x40000,[window_high],<130, 5>,0xffffff + +; mcall 47,0x80100,[left_panel_x],<200, 5>,0xffffff +; mcall 47,0x80100,[left_panel_y],<250, 5>,0xffffff +; mov edx,[temp_counter_dword_1] +; mcall 4,<150,3>,0x80000000 +; mov edx,[temp_counter_dword] +; mcall 4,<5,3>,0x80000000 +@@: + mcall 12, 2 + ret +;temp_eax dd 0 +;temp_ebx dd 0 +;temp_ecx dd 0 +;temp_edx dd 0 +;temp_esi dd 0 +;temp_edi dd 0 +;temp_ebp dd 0 +;temp_esp dd 0 +;temp_znak dd 0 +;temp_counter_dword_1 dd 0 +;extension_size_1 dd 0 +;timer_tick dd 0 +;--------------------------------------------------------------------- +prepare_load_data: + mov esi,path + mov edi,file_name + call copy_path + call get_file_size + test eax,eax + ret +;--------------------------------------------------------------------- +prepare_load_data_1: + mov [read_file.return],eax + mov ebp,eax +prepare_load_data_4: + call load_file + test eax,eax + ret +;--------------------------------------------------------------------- +prepare_load_data_2: + call add_application_memory +prepare_load_data_3: + call add_application_memory + mov eax,[file_features_temp_area+32] + mov [read_file.size],eax + ret +;--------------------------------------------------------------------- +load_icon_and_convert_to_img: + mov ebx,icons_file_name + call prepare_load_data + jnz icon_error + call prepare_load_data_2 + add eax,mem + call prepare_load_data_1 + jnz icon_error + call convert_bmp_to_img + call sub_application_memory + ret +;--------------------------------------------------------------------- +load_buttons_and_convert_to_img: + mov ebx,buttons_file_name + call prepare_load_data + jnz buttons_error + mov eax,[appl_memory] + mov [buttons_img_start],eax + call prepare_load_data_2 + add eax,[buttons_img_start] + call prepare_load_data_1 + jnz buttons_error + call convert_bmp_to_img + call sub_application_memory + ret +;--------------------------------------------------------------------- +load_initiation_file: + mov ebx,ini_file_name + call prepare_load_data + jnz initiation_error + call prepare_load_data_3 + mov eax,[appl_memory] + mov [left_folder_data],eax + sub eax,[read_file.size] + mov [read_file.return],eax + mov [ini_file_start],eax + call load_file + test eax,eax + jnz initiation_error + mov ebp,icons_associations + call search_star_and_end_tags +; cmp ebp,-1 +; je .end + mov eax,[end_tag] + mov [icons_end_tag],eax + ret +;--------------------------------------------------------------------- +add_memory_for_folders: + mov ecx,[appl_memory] + add ecx,304*32+32 + mov [right_folder_data],ecx + add ecx,304*32+32 + mov [appl_memory],ecx + mcall 64,1 + ret +;--------------------------------------------------------------------- +copy_path: + xor eax,eax +@@: + cld + lodsb + stosb + test eax,eax + jnz @b + mov esi,edi +; dec esi +@@: + std + lodsb + cmp al,'/' + jnz @b + mov edi,esi + add edi,2 + mov esi,ebx +@@: + cld + lodsb + stosb + test eax,eax + jnz @b + ret +;--------------------------------------------------------------------- +copy_path_1: + xor eax,eax +@@: + cld + lodsb + stosb + test eax,eax + jnz @b + mov esi,ebx + mov [edi-1],byte '/' +@@: + cld + lodsb + stosb + test eax,eax + jnz @b + ret +;--------------------------------------------------------------------- +add_application_memory: + mov ecx,[file_features_temp_area+32] +.1: + add ecx,[appl_memory] + mov [appl_memory],ecx + mcall 64,1 + ret +;--------------------------------------------------------------------- +sub_application_memory: + mov ecx,[appl_memory] + sub ecx,[file_features_temp_area+32] +.1: + mov [appl_memory],ecx + mcall 64,1 + ret +;--------------------------------------------------------------------- +include 'key.inc' +;--------------------------------------------------------------------- +include 'markfile.inc' +;--------------------------------------------------------------------- +include 'button.inc' +;--------------------------------------------------------------------- +include 'mouse.inc' +;--------------------------------------------------------------------- +include 'openfile.inc' +;--------------------------------------------------------------------- +include 'draw.inc' +;--------------------------------------------------------------------- +include 'menu_bar.inc' +;--------------------------------------------------------------------- +include 'menu_drv.inc' +;--------------------------------------------------------------------- +include 'delete.inc' +;--------------------------------------------------------------------- +include 'copy.inc' +;--------------------------------------------------------------------- +include 'creatdir.inc' +;--------------------------------------------------------------------- +include 'confirm.inc' +;--------------------------------------------------------------------- +include 'err_wind.inc' +;--------------------------------------------------------------------- +include 'detect.inc' +;--------------------------------------------------------------------- +include 'conv_bmp.inc' +;--------------------------------------------------------------------- +include 'tran_ini.inc' +;--------------------------------------------------------------------- +include 'help.inc' +;--------------------------------------------------------------------- +include 'convchar.inc' +;--------------------------------------------------------------------- +include 'sort.inc' +;--------------------------------------------------------------------- +include 'exit.inc' +;--------------------------------------------------------------------- +include 'progrbar.inc' +;--------------------------------------------------------------------- +include 'scroll.inc' +;--------------------------------------------------------------------- +include 'file_inf.inc' +;--------------------------------------------------------------------- +include 'text.inc' +;--------------------------------------------------------------------- +I_END: +;--------------------------------------------------------------------- +include 'data.inc' +;--------------------------------------------------------------------- +mem: diff --git a/programs/fs/kfm/trunk/build.bat b/programs/fs/kfm/trunk/build.bat new file mode 100644 index 0000000000..6b26fa6e25 --- /dev/null +++ b/programs/fs/kfm/trunk/build.bat @@ -0,0 +1,2 @@ +fasm kfm.asm kfm +@pause diff --git a/programs/fs/kfm/trunk/button.inc b/programs/fs/kfm/trunk/button.inc new file mode 100644 index 0000000000..201cb64367 --- /dev/null +++ b/programs/fs/kfm/trunk/button.inc @@ -0,0 +1,267 @@ +button: + mcall 17 +.1: + cmp ah,101 + je f_key_f1 + cmp ah,102 + je f_key_f2 + cmp ah,103 + je f_key_f3 ;sort_name + cmp ah,104 + je f_key_f4 ;sort_type + cmp ah,105 + je f_key_f5 ;sort_size + cmp ah,106 + je f_key_f6 ;sort_date + cmp ah,107 + je f_key_f7 ;create dir + cmp ah,108 + je f_key_f8 ;delete_file + cmp ah,112 + je f_key_f12 + cmp ah,120 + jne .121 + mov esi,read_folder_device_name.rd + call copy_folder_name + jmp left_panel_read_folder + .121: + cmp ah,121 + jne .122 + mov esi,read_folder_device_name.fd + call copy_folder_name + jmp left_panel_read_folder + .122: + cmp ah,122 + jne .123 + mov esi,read_folder_device_name.hd0 + call copy_folder_name + jmp left_panel_read_folder + .123: + cmp ah,123 + jne .124 + mov esi,read_folder_device_name.hd1 + call copy_folder_name + jmp left_panel_read_folder + .124: + cmp ah,124 + jne .125 + mov esi,read_folder_device_name.hd2 + call copy_folder_name + jmp left_panel_read_folder + .125: + cmp ah,125 + jne .126 + mov esi,read_folder_device_name.hd3 + call copy_folder_name + jmp left_panel_read_folder + .126: + cmp ah,126 + jne .127 + mov esi,read_folder_device_name.cd0 + call copy_folder_name + jmp left_panel_read_folder + .127: + cmp ah,127 + jne .128 + mov esi,read_folder_device_name.cd1 + call copy_folder_name + jmp left_panel_read_folder + .128: + cmp ah,128 + jne .129 + mov esi,read_folder_device_name.cd2 + call copy_folder_name + jmp left_panel_read_folder + .129: + cmp ah,129 + jne .130 + mov esi,read_folder_device_name.cd3 + call copy_folder_name + jmp left_panel_read_folder + .130: + cmp ah,130 + jne .131 + mov esi,read_folder_device_name.rd + call copy_folder_name_1 + jmp right_panel_read_folder + .131: + cmp ah,131 + jne .132 + mov esi,read_folder_device_name.fd + call copy_folder_name_1 + jmp right_panel_read_folder + .132: + cmp ah,132 + jne .133 + mov esi,read_folder_device_name.hd0 + call copy_folder_name_1 + jmp right_panel_read_folder + .133: + cmp ah,133 + jne .134 + mov esi,read_folder_device_name.hd1 + call copy_folder_name_1 + jmp right_panel_read_folder + .134: + cmp ah,134 + jne .135 + mov esi,read_folder_device_name.hd2 + call copy_folder_name_1 + jmp right_panel_read_folder + .135: + cmp ah,135 + jne .136 + mov esi,read_folder_device_name.hd3 + call copy_folder_name_1 + jmp right_panel_read_folder + .136: + cmp ah,136 + jne .137 + mov esi,read_folder_device_name.cd0 + call copy_folder_name_1 + jmp right_panel_read_folder + .137: + cmp ah,137 + jne .138 + mov esi,read_folder_device_name.cd1 + call copy_folder_name_1 + jmp right_panel_read_folder + .138: + cmp ah,138 + jne .139 + mov esi,read_folder_device_name.cd2 + call copy_folder_name_1 + jmp right_panel_read_folder + .139: + cmp ah,139 + jne .140 + mov esi,read_folder_device_name.cd3 + call copy_folder_name_1 + jmp right_panel_read_folder + .140: + cmp ah,140 + je draw_left_select_disk_menu + cmp ah,141 + je draw_right_select_disk_menu + cmp ah,142 + je left_sort_name + cmp ah,143 + je left_sort_type + cmp ah,144 + je left_sort_size + cmp ah,145 + je left_sort_date + cmp ah,146 + je right_sort_name + cmp ah,147 + je right_sort_type + cmp ah,148 + je right_sort_size + cmp ah,149 + je right_sort_date + cmp ah,150 + je exit_dir_1 + cmp ah,151 + je reload_dir + cmp ah,152 + je create_directory + cmp ah,153 + je copy_file_f5 + cmp ah,154 + je move_file_f6 + cmp ah,157 + je delete_file + cmp ah, 1 + jne still + .exit: + mcall -1 +;--------------------------------------------------------------------- +reload_dir: + cmp [select_panel_counter],0 + jne @f + call proc_read_left_folder +; mov [left_panel_clear_all],1 + call draw_left_panel + jmp still +@@: + call proc_read_right_folder +; mov [right_panel_clear_all],1 + call draw_right_panel + jmp still +;--------------------------------------------------------------------- +reload_dir_all: + call proc_read_left_folder + call proc_read_right_folder + jmp red +;--------------------------------------------------------------------- +exit_dir_1: + mov [exit_dir],1 + jmp key_28.1 +;--------------------------------------------------------------------- +left_panel_read_folder: + mov [left_start_draw_cursor_line],0 + jmp proc_read_folder +;--------------------------------------------------------------------- +right_panel_read_folder: + mov [right_start_draw_cursor_line],0 + jmp proc_read_folder_1 +;--------------------------------------------------------------------- +left_sort_name: + xor eax,eax + cmp [left_sort_flag],eax + je still + mov [left_sort_flag],eax + jmp left_sort_date.1 +;--------------------------------------------------------------------- +left_sort_type: + cmp [left_sort_flag],1 + je still + mov [left_sort_flag],1 + jmp left_sort_date.1 +;--------------------------------------------------------------------- +left_sort_size: + cmp [left_sort_flag],2 + je still + mov [left_sort_flag],2 + jmp left_sort_date.1 +;--------------------------------------------------------------------- +left_sort_date: + cmp [left_sort_flag],3 + je still + mov [left_sort_flag],3 +.1: + call draw_left_sort_button + call left_sort_files +; mov [left_panel_clear_all],1 + call draw_left_panel + jmp still +;--------------------------------------------------------------------- +right_sort_name: + xor eax,eax + cmp [right_sort_flag],eax + je still + mov [right_sort_flag],eax + jmp right_sort_date.1 +;--------------------------------------------------------------------- +right_sort_type: + cmp [right_sort_flag],1 + je still + mov [right_sort_flag],1 + jmp right_sort_date.1 +;--------------------------------------------------------------------- +right_sort_size: + cmp [right_sort_flag],2 + je still + mov [right_sort_flag],2 + jmp right_sort_date.1 +;--------------------------------------------------------------------- +right_sort_date: + cmp [right_sort_flag],3 + je still + mov [right_sort_flag],3 +.1: + call draw_right_sort_button + call right_sort_files + call draw_right_panel + jmp still +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/buttons.bmp b/programs/fs/kfm/trunk/buttons.bmp new file mode 100644 index 0000000000000000000000000000000000000000..ea6b4741c0c569a501750661d3c45668836372c5 GIT binary patch literal 6486 zcmeI0y^a(y5QLYQ{QstX*&ad{yo7o^%{v zzkUDo*w+{AuXw-U{R8iJkB`_NkI(3Tc+dAjdJ14&Da`}y617~Sq7FQhfSke7;tY9FINM7;7g^x}vK6|E;`V&{ zizej=nmCM@{NM2pr&^pxWIov9{Jbb?B`kUOr;1kr)g>>6BQmei0SIXj<}~gj~f-CU6~g0kC-8$QRuhNidD z^oEW#*!IcV>^6p?Pf^-cZZzV+ARV3QXJc@~Ta!+q(IC^%9p*lo@l)MK4|4^9R(%mj zk{Pzvb#>)~fW^>48Y)4u=;{~K?s3}6-xuU_3zc#Tij=rD0WTkAen9U(s@a2eX!V0ZI zSH)me4ka^lTUcecP@$*qa#K+i2G|t@H`RBfz{t~?OmOg4=|;eJ%@QvY1mzS-1UMFo zf)Ruk(ok`jJQ?i)xRXk|o+T?`3e-a2Zi)#gWk7g4|N9>)y5hY{l~)-5qdXsHw&T&l z^R~yFywJMO6E1m93_CA5^QzB+;B%RlUpmd9Ww+e3bBX0*7P68_R9b8P1q8_nrm62V z8=3%*^6}Y${Svy3PO|3*IwF)2cA;Pe^ZP6$2Ge#7>7OUb8Q%Xds`&1@B*Q$R)iujU zpC-;F)E2Nw+}3BER4uXloE-1?@i3tK><*`G{#|s501wPrr$umbw#1nn8(4&a2f@F* zW_tt1x`h2NxI6G~=P@*_arSnZ;Tc 0x90-0x9F + sub al, 'р'-'Р' +.ret: + ret +.rus1: +; 0xA0-0xAF -> 0x80-0x8F +.az: + and al, not 0x20 + ret +;--------------------------------------------------------------------- +char_todown: +; convert character to uppercase, using cp866 encoding +; in: al=symbol +; out: al=converted symbol + cmp al, 'A' + jb .ret + cmp al, 'Z' + jbe .az + cmp al, 'А' + jb .ret + cmp al, 'Р' + jb .rus1 + cmp al, 'Я' + ja .ret +; 0x90-0x9F -> 0xE0-0xEF + add al, 'р'-'Р' +.ret: + ret +.rus1: +; 0x80-0x8F -> 0xA0-0xAF +.az: + add al, 0x20 + ret +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/copy.inc b/programs/fs/kfm/trunk/copy.inc new file mode 100644 index 0000000000..f6373cab08 --- /dev/null +++ b/programs/fs/kfm/trunk/copy.inc @@ -0,0 +1,460 @@ +;--------------------------------------------------------------------- +move_file_f6: + mov [move_file_flag],1 +copy_file_f5: + call clear_file_buffer + xor edx,edx + xor eax,eax +; mov byte [copy_many_files],al + mov [current_progress_value],eax + mov [current_progress_value_1],eax + cmp [select_panel_counter],al + jne .right_1 + cmp [left_marked_counter],eax + jne .confirmation_action + mov ax,[left_start_draw_cursor_line] + mov ebx,10 + div ebx + mov ebx,[left_start_draw_line] + add ebx,eax + imul ebx,304 + add ebx,[left_folder_data] + call prepare_data_7 + call .copy_name + jmp editbox_copy_name +.right_1: + cmp [right_marked_counter],eax + jne .confirmation_action + mov ax,[right_start_draw_cursor_line] + mov ebx,10 + div ebx + mov ebx,[right_start_draw_line] + add ebx,eax + imul ebx,304 + add ebx,[right_folder_data] + call prepare_data_7 + call .copy_name + jmp editbox_copy_name + +.confirmation_action: + cmp [move_file_flag],0 + je .copy + mov [confirmation_type],move_type + jmp @f +.copy: + mov [confirmation_type],copy_type +@@: + call confirmation_action + cmp [work_confirmation_yes],1 + je copy_marked_files + mov [move_file_flag],0 + jmp red + +.copy_name: + mov esi,ebx + mov edi,create_dir_name +@@: + cld + lodsb + stosb + test al,al + jne @r + sub edi,create_dir_name + mov eax,edi + dec eax + mov edi, edit1 + mov ed_size, eax + mov ed_pos, eax +default_box + cmp [select_panel_counter],0 + jne .right_2 + mov esi,read_folder_name + jmp @f +.right_2: + mov esi,read_folder_1_name +@@: + mov edi,file_name + call copy_path_1 + ret +;------------------------------------------------------------- +editbox_copy_name: + mcall 66, 1, 0 + jmp .red +.red_1: + call draw_window +.red: + call draw_editbox_copy_name +.still: + mcall 10 + cmp eax,1 + je .red_1 + cmp eax,2 + je .key_copy + cmp eax,3 + je .button_copy + mouse_edit_box copy_editboxes + jmp .still +;------------------------------------------------------------- +.button_copy: + mov eax,17 + int 0x40 + test ah,ah + jz .still + cmp ah,160 + je .exit_with_copy + cmp ah,161 + je .exit_without_copy + cmp ah,1 + jne .still + mcall -1 +.exit_with_copy: + mov [max_progress_value],1 + mov [draw_all_progressbar],1 + call copy_file_1 + cmp [move_file_flag],0 + je @f + call del_file + test eax,eax + jz @f + call start_error_window_thread +@@: + call proc_read_left_folder + call proc_read_right_folder +.exit_without_copy: + mcall 66, 1, 1 + mov [move_file_flag],0 + jmp red +;------------------------------------------------------------- +.key_copy: + mov eax,2 + int 0x40 + cmp ah,13 + je .exit_with_copy + cmp ah,27 + je .exit_without_copy + key_edit_box copy_editboxes + jmp .still +;------------------------------------------------------------- +draw_editbox_copy_name: + mov ecx,[window_high] + mov ebx,[window_width] + shr ecx,1 + shr ebx,1 + sub ecx,30 + sub ebx,87 + shl ecx,16 + shl ebx,16 + mov cx,60 + mov bx,174 + mcall 13, , ,0x6060ff ;0xff + pusha + shr ebx,16 + add ebx,10 + shr ecx,16 + add ecx,17 + mov eax,copy_editboxes + mov dword [eax+4],ebx + mov dword [eax+8],ecx + draw_edit_box copy_editboxes + popa + pusha + add ebx,70 shl 16 + add ecx,37 shl 16 + mov cx,15 + mov bx,40 + mov esi,0xffffff + mov edx,0x40000000+160 + mov eax,8 + int 0x40 + add ebx,50 shl 16 + inc edx + int 0x40 + popa + + push ebx ecx + add ebx,70 shl 16 + add ecx,37 shl 16 + mov bx,40 + mov cx,15 + mov edx,0 + push ebx ecx + sub ecx,1 shl 16 + sub ebx,1 shl 16 + mov bx,42 + mov cx,17 + int 0x40 + add ebx,50 shl 16 + int 0x40 + pop ecx ebx + mov edx,0xff7700 + int 0x40 + mov edx,0xaa00 + add ebx,50 shl 16 + int 0x40 + pop ecx ebx + + shr ecx,16 + mov bx,cx + add ebx,60 shl 16+5 + cmp [move_file_flag],0 + je .copy + mov edx,move_type_1 + jmp @f +.copy: + mov edx,copy_type_1 +@@: + mcall 4, ,0x90ffffff + add ebx,18 shl 16+36 + mov edx,type_yes + int 0x40 + add ebx,56 shl 16 + mov edx,type_no + int 0x40 + ret +;------------------------------------------------------------- +copy_file_1: + mov ebx,create_dir_name +.1: + mov [error_pointer],ebx + cmp [select_panel_counter],0 + je .right_2 + mov esi,read_folder_name + jmp @f +.right_2: + mov esi,read_folder_1_name +@@: + mov edi,start_parameter + call copy_path_1 + call get_file_size + test eax,eax + jnz .error + mov [read_file.Offset],eax + mov [add_save_file.Offset],eax + mov eax,[appl_memory] + mov [read_file.return],eax + mov [save_file.pointer],eax + mov [add_save_file.pointer],eax + mcall 18,16 + mov ebx,[file_features_temp_area+32] + shr ebx,10 + shr eax,2 + cmp ebx,eax + jb .copy_for_one + shl eax,10 + mov ecx,eax + mov [read_file.size],eax + mov [save_file.size],eax + mov [add_save_file.size],eax + + cmp [copy_many_files], byte 1 + je .continue_5 + pusha + mov eax,[file_features_temp_area+32] + mov ebx,[save_file.size] + xor edx,edx + mov [current_progress_value],edx + mov [current_progress_value_1],edx + div ebx + test edx,edx + jz @f + inc eax +@@: + mov [max_progress_value],eax + popa +.continue_5: + call progress_bar_copy ;_1 + call add_application_memory.1 + cmp [copy_many_files],byte 0 + jne @f + inc [current_progress_value] + call progress_bar_copy ;_1 +@@: + call load_file + test eax,eax + jnz .error + cmp [copy_many_files],byte 0 + jne @f + inc [current_progress_value_1] + call progress_bar_copy ;_1 +@@: + call write_file + test eax,eax + jnz .error +.continue: + mov eax,[file_features_temp_area+32] + mov ebx,[save_file.size] + sub eax,ebx + cmp eax,ebx + jbe .end_copy_write + mov [file_features_temp_area+32],eax + add [add_save_file.Offset],ebx + add [read_file.Offset],ebx + cmp [copy_many_files],byte 0 + jne @f + inc [current_progress_value] + call progress_bar_copy ;_1 +@@: + call load_file + test eax,eax + jnz .error_1 + cmp [copy_many_files],byte 0 + jne @f + inc [current_progress_value_1] + call progress_bar_copy ;_1 +@@: + call add_write_file + test eax,eax + jnz .error_1 + jmp .continue + +.end_copy_write: + mov [add_save_file.size],eax + add [add_save_file.Offset],ebx + mov [read_file.size],eax + add [read_file.Offset],ebx + inc [current_progress_value] + call progress_bar_copy + call load_file + test eax,eax + jnz .error_1 + inc [current_progress_value_1] + call progress_bar_copy + call add_write_file + test eax,eax + jnz .error_1 + mov ecx,[appl_memory] + sub ecx,[save_file.size] + call sub_application_memory.1 +.exit: + ret + + +.copy_for_one: + call add_application_memory + mov eax,[file_features_temp_area+32] + mov [read_file.size],eax + inc [current_progress_value] + call progress_bar_copy + call load_file + test eax,eax + jnz .error + mov [save_file.size],ebx + inc [current_progress_value_1] + call progress_bar_copy + call write_file + test eax,eax + jnz .error + call sub_application_memory + ret + +.error: + call start_error_window_thread + call sub_application_memory + add esp,4 + mov [move_file_flag],0 + jmp editbox_copy_name.exit_without_copy + +.error_1: + call start_error_window_thread + mov ecx,[appl_memory] + sub ecx,[save_file.size] + call sub_application_memory.1 + add esp,4 + mov [move_file_flag],0 + jmp editbox_copy_name.exit_without_copy +;------------------------------------------------------------- +copy_marked_files: + mov [copy_many_files],byte 1 + mov [draw_all_progressbar],1 + xor eax,eax + mov [current_progress_value],eax + mov [current_progress_value_1],eax + cmp [select_panel_counter],al + jne .right_1 + mov eax,[left_marked_counter] + mov [max_progress_value],eax + mov ebp,[left_folder_block] +.start: + mov ebx,ebp + dec ebx + imul ebx,304 + add ebx,[left_folder_data] + add ebx,32+40 + test [ebx-40],byte 0x10 + jnz @f + cmp [ebx+299-40],byte 0 + je @f + cmp [ebx],word '..' + jne .continue + cmp [ebx+2],byte 0 + je .continue_1 +.continue: + push ebx + mov esi,read_folder_name + mov edi,file_name + call copy_path_1 + pop ebx + call copy_file_1.1 + cmp [move_file_flag],0 + je .continue_1 + call del_file + test eax,eax + jz .continue_1 + mov [move_file_flag],0 + call start_error_window_thread + jmp reload_dir_all +.continue_1: +@@: + dec ebp + jnz .start + cmp [move_file_flag],0 + je reload_dir_all + mov [left_start_draw_cursor_line],0 + mov [move_file_flag],0 + mov [copy_many_files],byte 0 + jmp reload_dir_all + +.right_1: + mov eax,[right_marked_counter] + mov [max_progress_value],eax + mov ebp,[right_folder_block] +.start_1: + mov ebx,ebp + dec ebx + imul ebx,304 + add ebx,[right_folder_data] + add ebx,32+40 + test [ebx-40],byte 0x10 + jnz @f + cmp [ebx+299-40],byte 0 + je @f + cmp [ebx],word '..' + jne .continue_2 + cmp [ebx+2],byte 0 + je .continue_3 +.continue_2: + push ebx + mov esi,read_folder_1_name + mov edi,file_name + call copy_path_1 + pop ebx + call copy_file_1.1 + cmp [move_file_flag],0 + je .continue_3 + call del_file + test eax,eax + jz .continue_3 + mov [move_file_flag],0 + call start_error_window_thread + jmp reload_dir_all +.continue_3: +@@: + dec ebp + jnz .start_1 + cmp [move_file_flag],0 + je reload_dir_all + mov [right_start_draw_cursor_line],0 + mov [move_file_flag],0 + mov [copy_many_files],byte 0 + jmp reload_dir_all +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/creatdir.inc b/programs/fs/kfm/trunk/creatdir.inc new file mode 100644 index 0000000000..26d52db1b0 --- /dev/null +++ b/programs/fs/kfm/trunk/creatdir.inc @@ -0,0 +1,174 @@ +;------------------------------------------------------------- +create_directory: + call clear_file_buffer + mov edi, edit1 + mov ed_size, dword 0 + mov ed_pos, dword 0 +default_box + mov [create_dir_name],byte 0 + mcall 66, 1, 0 + jmp .red +.red_1: + call draw_window +.red: + call draw_create_dir +.still: + mcall 10 + cmp eax,1 + je .red_1 + cmp eax,2 + je .key_create + cmp eax,3 + je .button_create + mouse_edit_box create_editboxes + jmp .still +;------------------------------------------------------------- +.button_create: + mov eax,17 + int 0x40 + test ah,ah + jz .still + cmp ah,160 + je .exit_with_create + cmp ah,161 + je .exit_without_create + cmp ah,1 + jne .still + mcall -1 +.exit_with_create: + call create_directory_1 + cmp [select_panel_counter],0 + jne @f + call proc_read_left_folder + jmp .exit_without_create +@@: + call proc_read_right_folder +.exit_without_create: + mcall 66, 1, 1 + jmp red +;------------------------------------------------------------- +.key_create: + mov eax,2 + int 0x40 + cmp ah,13 + je .exit_with_create + cmp ah,27 + je .exit_without_create + key_edit_box create_editboxes + jmp .still +;------------------------------------------------------------- +draw_create_dir: + mov ecx,[window_high] + mov ebx,[window_width] + shr ecx,1 + shr ebx,1 + sub ecx,30 + sub ebx,87 + shl ecx,16 + shl ebx,16 + mov cx,60 + mov bx,174 + mcall 13, , ,0x6060ff ;0xff + pusha + shr ebx,16 + add ebx,10 + shr ecx,16 + add ecx,17 + mov eax,create_editboxes + mov dword [eax+4],ebx + mov dword [eax+8],ecx + draw_edit_box create_editboxes + popa + pusha + add ebx,70 shl 16 + add ecx,37 shl 16 + mov cx,15 + mov bx,40 + mov esi,0xffffff + mov edx,0x40000000+160 + mov eax,8 + int 0x40 + add ebx,50 shl 16 + inc edx + int 0x40 + popa + + push ebx ecx + add ebx,70 shl 16 + add ecx,37 shl 16 + mov bx,40 + mov cx,15 + mov edx,0 + push ebx ecx + sub ecx,1 shl 16 + sub ebx,1 shl 16 + mov bx,42 + mov cx,17 + int 0x40 + add ebx,50 shl 16 + int 0x40 + pop ecx ebx + mov edx,0xff7700 + int 0x40 + mov edx,0xaa00 + add ebx,50 shl 16 + int 0x40 + pop ecx ebx + + shr ecx,16 + mov bx,cx + add ebx,30 shl 16+5 + mcall 4, ,0x90ffffff,create_dir ;[confirmation_type] + add ebx,48 shl 16+36 + mov edx,type_yes + int 0x40 + add ebx,56 shl 16 + mov edx,type_no + int 0x40 + ret +;------------------------------------------------------------- +create_directory_1: + mov edx,create_dir_name + cmp [select_panel_counter],0 + jne @f + mov esi,read_folder_name + jmp .start +@@: + mov esi,read_folder_1_name +.start: + mov edi,file_name + xor eax,eax +@@: + cld + lodsb + stosb + test eax,eax + jnz @b + mov [edi-1], byte '/' + mov esi,edx + mov [error_pointer], edx ;start_file_data.name +@@: + cld + lodsb + stosb + test eax,eax + jnz @b + call create_directory_f70 + cmp eax,0 + je @f +; mov ebx,0 +; sub ebx,eax +; mov eax,ebx + call start_error_window_thread +@@: +; call create_directory_f70 + ret +;------------------------------------------------------------- +clear_file_buffer: + xor eax,eax + mov edi,create_dir_name + mov ecx,256/4 + cld + rep stosd + ret +;------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/data.inc b/programs/fs/kfm/trunk/data.inc new file mode 100644 index 0000000000..ba4997f498 --- /dev/null +++ b/programs/fs/kfm/trunk/data.inc @@ -0,0 +1,220 @@ +;--------------------------------------------------------------------- +files_information_window_x: dd 100 shl 16 + 250 +files_information_window_y: dd 100 shl 16 + 300 +;--------------------------------------------------------------------- +error_window_x: dd 100 shl 16 + 250 +error_window_y: dd 100 shl 16 + 80 +;--------------------------------------------------------------------- +mouse_key_delay dd 100 +;--------------------------------------------------------------------- +files_counter dd 0 +directories_counter dd 0 +files_size: + .low dd 0 + .high dd 0 +;--------------------------------------------------------------------- +open_param dd 0 +;--------------------------------------------------------------------- +PID dd 0 +active_process dd 0 +;--------------------------------------------------------------------- +window_high dd 0 +window_width dd 0 +window_status dd 0 +skin_high dd 0 +fbutton_width dd 0 +drawing_panel_folder db 0 ; 1-left, 2 right +left_panel_x: + .size_x dw 0 + .start_x dw 0 +left_panel_y: + .size_y dw 0 + .start_y dw 0 +right_panel_x: + .size_x dw 0 + .start_x dw 0 +right_panel_y: + .size_y dw 0 + .start_y dw 0 +;--------------------------------------------------------------------- +mouse_position: + .y dw 0 + .x dw 0 +mouse_keys dd 0 +mouse_keys_delta db 0 +mouse_keys_delta_1 db 0 +scroll_bar_event db 0 +scroll_pointer db 0 +scroll_pointer_1 db 0 +mouse_keys_tick dd 0 +mouse_scroll_data: + .vertical dw 0 + .horizontal dw 0 +left_scroll_compens dd 0 +right_scroll_compens dd 0 +;--------------------------------------------------------------------- +device_present: + .rd db 0 + .fd db 0 + .hd0 db 0 + .hd1 db 0 + .hd2 db 0 + .hd3 db 0 + .cd0 db 0 + .cd1 db 0 + .cd2 db 0 + .cd3 db 0 +;device_present_text_counter dd 0 +device_present_buffer: + .fd db 0 + .hd_cd db 0 + .hd0_part db 0 + .hd1_part db 0 + .hd2_part db 0 + .hd3_part db 0 + rb 4 +;--------------------------------------------------------------------- +copy_many_files: + db 0 +max_progress_value dd 0 +current_progress_value dd 0 +current_progress_value_1 dd 0 +temp_progress_value: + dd 0 +draw_all_progressbar db 0 +amount_output_numbers dd 0 +;--------------------------------------------------------------------- +max_panel_line dd 0 +temp_panel_end dd 0 +;--------------------------------------------------------------------- +left_start_draw_line dd 0 +left_folder_block dd 0 +left_start_draw_cursor_line dw 0 +;left_panel_clear_all db 0 +;--------------------------------------------------------------------- +right_start_draw_line dd 0 +right_folder_block dd 0 +right_start_draw_cursor_line dw 0 +;right_panel_clear_all db 0 +;--------------------------------------------------------------------- +sort_counter dd 0 +sorting_low_limit dd 0 +sorting_high_limit dd 0 +dir_or_file db 0 +dir_temp_counter dd 0 +dir_temp_counter_1 dd 0 +draw_scroll_character db 0 +nesting_direction db 0 +;--------------------------------------------------------------------- +left_marked_counter dd 0 +right_marked_counter dd 0 +marked_file db 0 +marked_action db 0 +mark_action_counter db 0 +work_confirmation db 0 +work_confirmation_yes db 0 +delete_marked_yes db 0 +inf_marked_yes db 0 +confirmation_type dd 0 +move_file_flag db 0 +recursive_pointer dd 0 +;--------------------------------------------------------------------- +search_pre_folder db 0 +not_clear_lines db 0 +select_panel_counter db 0 +extended_key db 0 +start_draw_menu_cursor_line dd 0 +press_enter_menu db 0 +close_menu db 0 +extension_start dd 0 +extension_size dd 0 +file_name_length dd 0 +temp_counter_dword dd 0 +error_pointer dd 0 +file_system_error dd 0 +exit_to_dir db 0 +exit_dir db 0 +end_tag dd 0 +icons_end_tag dd 0 +use_patch db 0 +;--------------------------------------------------------------------- +appl_memory dd 0 +appl_memory_old dd 0 +buttons_img_start dd 0 +ini_file_start dd 0 +left_folder_data dd 0 +right_folder_data dd 0 +;--------------------------------------------------------------------- +shift_flag db 0 +ctrl_flag db 0 +alt_flag db 0 +;--------------------------------------------------------------------- +left_sort_flag dd 0 +right_sort_flag dd 0 +;--------------------------------------------------------------------- +retrieved_devices_table_counter dd 0 +temp_counter db 0 +temp_counter_1 dd 0 +;--------------------------------------------------------------------- +; for EDITBOX +mouse_flag: dd 0x0 +;--------------------------------------------------------------------- +create_dir_name: + db 0 + rb 256 +;--------------------------------------------------------------------- +retrieved_devices_table: + rb 10*100 +;--------------------------------------------------------------------- +procinfo: + rb 1024 +;--------------------------------------------------------------------- +type_name: + rb 512 +;--------------------------------------------------------------------- +type_size_string: + rb 32 +;--------------------------------------------------------------------- +type_files_string: + rb 16 +;--------------------------------------------------------------------- +type_directories_string: + rb 16 +;--------------------------------------------------------------------- +delete_dir_data: + rb 32 +;--------------------------------------------------------------------- +;stack + align 4 + rb 512 +stacktop: +;--------------------------------------------------------------------- + align 4 + rb 4096 +thread_stack: +;--------------------------------------------------------------------- +file_features_temp_area: + rb 40 +;--------------------------------------------------------------------- +initial_data: + rb 4096 +;--------------------------------------------------------------------- +path: + rb 4096 +;--------------------------------------------------------------------- +file_name: + rb 4096 +;--------------------------------------------------------------------- +start_parameter: + rb 4096 +;--------------------------------------------------------------------- +read_folder_name: + rb 4096 +;--------------------------------------------------------------------- +read_folder_1_name: + rb 4096 +;--------------------------------------------------------------------- +; for EDITBOX +;structure_of_potock: +; rb 1024 +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/delete.inc b/programs/fs/kfm/trunk/delete.inc new file mode 100644 index 0000000000..a0f3331aad --- /dev/null +++ b/programs/fs/kfm/trunk/delete.inc @@ -0,0 +1,342 @@ +;--------------------------------------------------------------------- +delete_file: +; call progress_bar +; jmp still + mov [confirmation_type],delete_type + call confirmation_action + cmp [work_confirmation_yes],1 + jne red ;reload_dir + + xor eax,eax + mov [files_counter],eax + mov [directories_counter],eax + mov [files_size.low],eax + mov [files_size.high],eax + call get_files_information + + call delete_marked_files + cmp [delete_marked_yes],1 + je .end_1 ;reload_dir_all + + xor eax,eax + xor edx,edx + cmp [select_panel_counter],0 + jne .right_1 + mov ax,[left_start_draw_cursor_line] + mov ebx,10 + div ebx + mov ebx,[left_start_draw_line] + add ebx,eax + imul ebx,304 + add ebx,[left_folder_data] + call prepare_data_7 + mov esi,read_folder_name ;read_folder.name + jmp .end +.right_1: + mov ax,[right_start_draw_cursor_line] + mov ebx,10 + div ebx + mov ebx,[right_start_draw_line] + add ebx,eax + imul ebx,304 + add ebx,[right_folder_data] + call prepare_data_7 + mov esi,read_folder_1_name ;read_folder_1.name +.end: + mov [error_pointer],ebx + mov edi,file_name ;delete_file_data.name + call copy_path_1 + test [ebx-40],byte 0x10 + jz @f + push eax ebx + xor eax,eax + mov [current_progress_value],eax +; mov [delete_marked_yes],al + mov [draw_all_progressbar],1 + call delete_dir + pop ebx eax + jmp .end_1 +@@: + call del_file + test eax,eax + jz .end_1 + call start_error_window_thread + jmp reload_dir_all +.end_1: + cmp [select_panel_counter],0 + jne .right + call proc_read_left_folder + jmp red +.right: + call proc_read_right_folder + jmp red +;--------------------------------------------------------------------- +delete_marked_files: + mov eax,[directories_counter] + add eax,[files_counter] + mov [max_progress_value],eax + + xor eax,eax + mov [current_progress_value],eax + mov [delete_marked_yes],al + mov [draw_all_progressbar],1 + + cmp [select_panel_counter],al + jne .right_1 +; mov eax,[left_marked_counter] +; mov [max_progress_value],eax + mov ebp,[left_folder_block] +.start: + mov ebx,ebp + dec ebx + imul ebx,304 + add ebx,[left_folder_data] + add ebx,32+40 + cmp [ebx+299-40],byte 0 + je @f + cmp [ebx],word '..' + jne .continue + cmp [ebx+2],byte 0 + je .continue_1 +.continue: + mov esi,read_folder_name ;read_folder.name + call prepare_data_6 +.continue_1: + mov [delete_marked_yes],1 +@@: + dec ebp + jnz .start + cmp [delete_marked_yes],0 + je @f + mov [left_start_draw_cursor_line],0 +@@: + ret +.right_1: +; mov eax,[right_marked_counter] +; mov [max_progress_value],eax + mov ebp,[right_folder_block] +.start_1: + mov ebx,ebp + dec ebx + imul ebx,304 + add ebx,[right_folder_data] + add ebx,32+40 + cmp [ebx+299-40],byte 0 + je @f + cmp [ebx],word '..' + jne .continue_2 + cmp [ebx+2],byte 0 + je .continue_3 +.continue_2: + mov esi,read_folder_1_name ;read_folder_1.name + call prepare_data_6 +.continue_3: + mov [delete_marked_yes],1 +@@: + dec ebp + jnz .start_1 + cmp [delete_marked_yes],0 + je @f + mov [right_start_draw_cursor_line],0 +@@: + ret +;--------------------------------------------------------------------- +prepare_data_6: + mov [error_pointer],ebx + mov edi,file_name ;delete_file_data.name + call copy_path_1 +; inc [current_progress_value] +; call progress_bar_delete + test [ebx-40],byte 0x10 + jz @f + call delete_dir + jmp .continue +@@: + inc [current_progress_value] + call progress_bar_delete + call del_file + test eax,eax + jz .continue ; .continue_1 + call start_error_window_thread + add esp,8 +.continue: + ret +;--------------------------------------------------------------------- +prepare_data_7: + add ebx,32+40 + cmp [ebx],word '..' + jne .continue + cmp [ebx+2],byte 0 + jne .continue + add esp,4 + jmp reload_dir +.continue: + ret +;--------------------------------------------------------------------- +delete_dir: + pusha + mov [recursive_pointer],0 + mov eax,[appl_memory] + mov [appl_memory_old],eax +.1: + mov [read_delete_dir_data.size],0 + mov [read_delete_dir_data.return],delete_dir_data + call read_delete_dir + test eax,eax + jz @f + mov [error_pointer],file_name + call start_error_window_thread + popa + add esp,8+4 + ret +@@: + mov eax,[delete_dir_data+8] + cmp eax,2 + ja @f + inc [current_progress_value] + call progress_bar_delete + call del_file + test eax,eax + jz .end + mov [error_pointer],file_name + call start_error_window_thread + popa + add esp,8+4 + ret +@@: + imul eax,304 + add eax,32 + mov ebx,eax + add ebx,[appl_memory_old] + cmp ebx,[appl_memory] + jbe @f + mov ecx,[appl_memory] + mov ecx,ebx + mov [appl_memory],ecx + mcall 64,1 +@@: + mov eax,[delete_dir_data+8] + mov [read_delete_dir_data.size],eax + mov eax,[appl_memory_old] + mov [read_delete_dir_data.return],eax + call read_delete_dir + test eax,eax + jz @f + mov [error_pointer],file_name + call start_error_window_thread + popa + add esp,8+4 + ret +@@: + call delete_dir_1 + jc .1 +.end: + call return_delete_path + dec [recursive_pointer] + cmp [recursive_pointer],0 + jge .1 +@@: + mov ecx,[appl_memory_old] + cmp [appl_memory],ecx + je @f + mov [appl_memory],ecx + mcall 64,1 +@@: + popa + ret +;--------------------------------------------------------------------- +delete_dir_1: + mov ebp,[appl_memory_old] + mov ebp,[ebp+8] +.start: + mov ebx,ebp + dec ebx + imul ebx,304 + add ebx,[appl_memory_old] + add ebx,32+40 + cmp [ebx],byte '.' + jne @f + cmp [ebx+1],byte 0 + je .continue_4 +@@: + cmp [ebx],word '..' + jne .continue + cmp [ebx+2],byte 0 + je .continue_4 +.continue: + mov esi,file_name + inc [recursive_pointer] + call copy_path_2 + test [ebx-40],byte 0x10 + jnz .continue_3 +@@: + inc [current_progress_value] + call progress_bar_delete + call del_file + test eax,eax + jz .continue_1 + mov [error_pointer],file_name + call start_error_window_thread + add esp,4 + popa + add esp,8+4 + ret +.continue_1: + dec [recursive_pointer] + call return_delete_path + dec ebp + jnz .start + +.continue_4: + inc [current_progress_value] + call progress_bar_delete + call del_file + test eax,eax + jz .continue_2 + call start_error_window_thread + add esp,4 + popa + add esp,8+4 + ret +.continue_2: + clc + ret +.continue_3: + stc + ret +;--------------------------------------------------------------------- +return_delete_path: + mov edi,file_name +@@: + inc edi + cmp [edi],byte 0 + jne @r + dec edi +@@: + dec edi + cmp [edi],byte '/' + jne @r + cmp edi,file_name + jbe @f + mov [edi],byte 0 +@@: + ret +;--------------------------------------------------------------------- +copy_path_2: + xor eax,eax +@@: + cld + lodsb + test al,al + jnz @b + mov edi,esi + mov [edi-1],byte '/' + mov esi,ebx +@@: + cld + lodsb + stosb + test al,al + jnz @b + ret +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/detect.inc b/programs/fs/kfm/trunk/detect.inc new file mode 100644 index 0000000000..97963b4bc1 --- /dev/null +++ b/programs/fs/kfm/trunk/detect.inc @@ -0,0 +1,137 @@ +device_detect: ; f1811 + mcall 18,11,1,device_present_buffer + mov [device_present.rd],1 + cmp [device_present_buffer.fd],0 + je @f + mov [device_present.fd],1 +@@: + mov al,[device_present_buffer.hd_cd] + test al,10b + je @f + mov [device_present.cd3],1 + jmp .ide2 +@@: + test al,1b + je @f + mov [device_present.hd3],1 +.ide2: +@@: + test al,1000b + je @f + mov [device_present.cd2],1 + jmp .ide1 +@@: + test al,100b + je @f + mov [device_present.hd2],1 +.ide1: +@@: + test al,100000b + je @f + mov [device_present.cd1],1 + jmp .ide0 +@@: + test al,10000b + je @f + mov [device_present.hd1],1 +.ide0: +@@: + test al,10000000b + je @f + mov [device_present.cd0],1 + jmp .end +@@: + test al,1000000b + je @f + mov [device_present.hd0],1 +.end: +@@: + ret +;--------------------------------------------------------------------- +device_detect_f70: + mov eax,[left_folder_data] + mov [read_folder.return],eax + mcall 70, read_folder + test eax,eax + jz @f + cmp eax,6 + jne read_folder_error +@@: + mov [left_folder_block],ebx + mov [temp_counter_1],0 + mov [retrieved_devices_table_counter],0 +.start_temp_counter_1: + imul esi,[temp_counter_1],304 + add esi,[left_folder_data] + add esi,32+40 ;[eax+32+40] + call copy_folder_name_1 + mov eax,[right_folder_data] + mov [read_folder_1.return],eax + mcall 70, read_folder_1 + test eax,eax + jz @f + cmp eax,6 + jne read_folder_1_error +@@: + mov eax,[right_folder_data] + cmp [eax+4],dword 0 + je .continue + mov [right_folder_block],ebx + mov ebp,0 +.start_copy_device_patch: + imul edi,[retrieved_devices_table_counter],10 + add edi,retrieved_devices_table + mov [edi],byte '/' + inc edi + imul esi,[temp_counter_1],304 + add esi,[left_folder_data] + add esi,32+40 ;[eax+32+40] + call proc_copy_patch + imul esi,ebp,304 + add esi,[right_folder_data] + add esi,32+40 ;[eax+32+40] + mov [edi-1],byte '/' + call proc_copy_patch + inc [retrieved_devices_table_counter] + inc ebp + cmp ebp,[right_folder_block] + jb .start_copy_device_patch +.continue: + inc [temp_counter_1] + mov eax,[temp_counter_1] + cmp eax,[left_folder_block] + jb .start_temp_counter_1 + mov esi,retrieved_devices_table+1 + call copy_folder_name + mov esi,retrieved_devices_table+3 + mov ecx,0 +@@: + add esi,8 + cld + lodsw + inc ecx + cmp ecx,[retrieved_devices_table_counter] + ja @f + cmp ax,'hd' + jne @r + sub esi,2 + call copy_folder_name_1 + ret +@@: +; mov [read_folder_1.name+1],dword 0 +; mov [read_folder_1_name+1],dword 0 + mov esi,retrieved_devices_table+1 + call copy_folder_name_1 +; mov [read_folder_1_name],dword '/rd/' +; mov [read_folder_1_name+4],word '1/' +; mov [read_folder_1_name+6],byte 0 + ret +;--------------------------------------------------------------------- +proc_copy_patch: +@@: + cld + lodsb + stosb + cmp al,0 + jne @r + ret \ No newline at end of file diff --git a/programs/fs/kfm/trunk/docs/english/history.txt b/programs/fs/kfm/trunk/docs/english/history.txt new file mode 100644 index 0000000000..2a41e3569d --- /dev/null +++ b/programs/fs/kfm/trunk/docs/english/history.txt @@ -0,0 +1,311 @@ +KFM - Kolibri File Manager + +13.10.07 - v0.47b - 27271b +Changes: +1) Is corrected bug connected with by mistreating of hard disks containing sections + with unsupported OS by file systems or not containing of sections. +2) New version EDITBOX. Is corrected bug - terminating or incorrect work of the application, + at simultaneous selection by the mouse and pressing the keys in EDITBOX. + +11.10.07 - v0.47 - 27226b +Changes: +1) Navigating by the keyboard: + a) Alt+Enter - get for files and directories: + location, name, size, amount of files and directories + (including for a case of selection of separate files and directories). + Special thank and Mute, for the help in implementation of the procedure + of division of the whole 64 bit numbers, without usage of the FPU. +2) The progress of deleting now takes into account all nested files and directories. +3) Fix error - incorrect work physical scrollers of the mouse. + +30.09.07 - v0.46 - 25458b +Changes: +1) Deleting of nested folders and files, the progress of deleting while takes + into account the selected files and folders only in the start directory. + +26.08.07 - v0.45h - 24915b +Changes: +1) SCROLL BAR - size of a pointer changes on amount of files in the directory. + +17.08.07 - v0.45g - 24617b +Changes: +1) Navigating by the mouse: + a) Processing physical scrollers of the mouse, in left and right panel. + +09.08.07 - v0.45f - 24257b +Changes: +1) Navigating by the keyboard: + a) Open file in other application with parameter: + Shift + W - set background, mode: tile. + Ctrl + W - set background, mode: stretch. + (Options work only for JPEGVIEW version 0.18 or above) + +04.08.07 - v0.45e - 24137b +Changes: +1) Menu of choice of the disk - navigating by the keyboard: + р) Insert - load tray of selected ATAPI device. + с) Delete - eject tray of selected ATAPI device. + +02.08.07 - v0.45d - 24037b +Changes: +1) Fix bug - response of the application to events of the mice occurring concerning other application, + which window is on top of the window stack. +2) Fix bug - "consumption" of system resources at minimization of the window in the panel. + +12.07.07 - v0.45b - 23977b +Changes: +1) Fix bug - ignoring the mouse on kernels above than 566 revision. + +05.07.07 - v0.45a - 23993b +Changes: +1) Fix error appeared in v0.45 - the option buttons of devices did not work. + +24.06.07 - v0.45 - 23988b +Changes: +1) Usage of output of the window without fill of a working area (Function 0, EDX bit C). + Now window does not blink at full redraw. +2) Limitation on a minimum size of the window: Xmin=495, Ymin=180. + Is entered because of failure display of units of the window at smaller sizes. +3) Fix error - terminate program when window is rolled up. + +17.06.07 - v0.44k - 23421b +Changes: +1) The processing of click of the mouse - started applications is changed are output atop of the window KFM. +2) Opening directories and start of files on a double click. + +03.06.07 - v0.44i - 23210b +Changes: +1) Capture of focal point active SCROLL BAR before release of a mouse button. + +04.05.07 - v0.44h - 23066b +Changes: +1) The miss of focal point in EDITBOX, in some cases is eliminated. + (Thank < Lrz > for correction of the code) + +27.04.07 - v0.44g - 23130b +Changes: +1) The order of indexing of icons in INI is changed and BMP files now first three are rigidly fixed. Before it was not, that could result in inaccuracies at replacement of the file with icons on alternate. +2) Acceleration of output on 20 % at paging contents of the directory, at the expense of optimization of the procedure of search of output icons in INI the file. + +26.04.07 - v0.44e - 23126b +Changes: +1) The change SCROLL BAR - now at pressing extreme arrows moves not the cursor, and looked through contents of the directory are shifted on one unit. + (Thank Heavyiron for sentence of idea) +2) If the quantity of displayed units in the panel is less than greatest possible displayed value the code SCROLL BAR to become passive. +3) The error resulting in a split between a scroll box SCROLL BAR and lower arrow is eliminated. +4) The error resulting in absence corrections of a position of the cursor at deleting last on the list of the file in the directory, which size of less greatest possible displayed value is eliminated. +5) Small optimization of the code on a size. + +22.04.07 - v0.44 - 23118b +Changes: +1) Complete implementation of a unit of handle SCROLL BAR. +2) Navigating by the mouse: + a) Choice of the active panel, click on the panel. + b) Installation of a selection cursor on the file or directory, click on the selected item. + c) Click on the placed selection cursor is equivalent to pressing the key ENTER. + d) Handle the menu of choice of the disk through the mouse. + +21.04.07 - v0.43c - 21777b +Changes: +1) The new version EDITBOX (< Lrz >), are corrected error with residual selection of a name. +2) The acceptable colour of selection for EDITBOX, in the version 0.43 on an error was placed(installed) black. +3) Primary implementation of a unit of handle SCROLL BAR, without feedback. + +16.04.07 - v0.43 - 20999b +Changes: +1) The new version EDITBOX (Maxxxx32 and < Lrz >), are eliminated error with editing of a name at creation, copying and moving of the file. +2) Mapping files is corrected: the files with the absent extension and simultaneously with a point in the end now are displayed completely. +3) Menu of choice of the disk - navigating by the keyboard: + a) Home and PageUp - cursor in a beginning of the list + b) End and PageDown - cursor in the end of the list +4) Optimization of output of bars of progress at copying, moving and deleting of files. + Now bars of progress are drawn completely only for the first time and at arrival of event redraw of the window. + +01.04.07 - v0.42 - 20707b +Changes: +1) Draw progress of copying of files. +2) Draw progress of moving of files. + +31.03.07 - v0.41 - 20091b +Changes: +1) Mapping progress of deleting of files. +2) Navigating by the keyboard: + a) F1 - help, hot shortcut keys. +3) Navigating by the mouse: + a) Button F1 - help, hot shortcut keys. + The presence of the file kfm_keys.txt in the directory is required, where the application is located. +4) New version the indirect component EDITBOX (Maxxxx32 and < Lrz >). + +29.03.07 - v0.40a - 19708b +Changes: +1) Navigating by the keyboard: + a) F12 - program termination. +2) Navigating by the mouse: + a) Button F12 - program termination. + +28.03.07 - v0.40 - 19603b +Changes: +1) Moving the selected and single files - the selected directories are ignored. +2) Navigating by the keyboard: + a) F6 - moving of the file from the active panel in opposite. + b) Ctrl+A and Ctrl + (NumPad (+) Up) - selection of all files and directories in the active panel, except for the directory '..' + c) Ctrl + (NumPad (-) Up) - to deselect of all files and directories in the active panel, except for the directory '..' + d) Ctrl + (NumPad (*) Up) - to invert selection of all files and directories in the active panel, except for the directory '..' +3) Navigating by the mouse: + a) Button F6 - moving of the file from the active panel in opposite. + b) The button of the main panel " To move the file " - moving of the file from the active panel in opposite. + +27.03.07 - v0.39 - 18778b +Changes: +1) Copying the selected files - the selected directories are ignored. +2) Final elimination error with selection of files. + +24.03.07 - v0.38 - 18510b +Changes: +1) Copying files exceeding a size of the free RAM. + The memory for the buffer of copying is backed up at the rate of 25 % from free memory of the RAM at the moment of a beginning of copying. + If the file size less than 25 % of the free RAM a size of the buffer is equal to a file size. + +20.03.07 - v0.37b - 18239b +Changes: +1) The error is corrected, when the colour of last file in the directory did not vary at selection by the key Insert. +2) Navigating by the mouse: +Buttons of the main panel: + a) " To create the directory " - creation of the directory in the active panel. + b) " To copy the file " - copying file from the active panel in opposite. + +17.03.07 - v0.37 - 18157b +Changes: +1) The single copying of files (for one pass) for editing the name of the file is used of indirect components EDITBOX, thank to the authors: Maxxxx32 and , for saving of time in development KFM. +2) Navigating by the keyboard: + a) F5 - copying file from the active panel in opposite. +3) Navigating by the mouse: + b) Button F5 - copying file from the active panel in opposite. + +16.03.07 - v0.36 - 17338b +Changes: +1) The creation of the directory, for input of the name of the directory is used of indirect components EDITBOX, thank to the authors: Maxxxx32 and , for saving of time in development KFM. +2) Navigating by the keyboard: + a) F7 - creation of the directory in the active panel. +3) Navigating by the mouse: + a) Button F7 - creation of the directory in the active panel. + +13.03.07 - v0.35f - 15667b +Changes: +1) Jamming the cursor on last page is eliminated at paging End and PageDown. + +11.03.07 - v0.35e - 15590b +Changes: +1) The button " to reboot the directory " now redraw only active panel. +2) The flicker because of superfluous plottings is eliminated at achievement of the end of the directory by keys End and PageDown. +3) Small optimization of the code on a size. + +08.03.07 - v0.35b - 15602b +Changes: +1) Optimization of usage of area of paths to files. +2) The error - output of the cursor for limits of the screen is corrected at return from the unwrapped mode of the window. + +04.03.07 - v0.35 - 21540b +Changes: +1) Procedure of search of the end of section in INI the file. +2) Search and output of icons through associations in INI the file. +3) Optimization of the code on a size. +4) Navigating by the keyboard: + a) F4 - editing of the file in the indirect application, association in INI the file. +5) Navigating by the mouse: + a) Button F4 - editing of the file in the indirect application, association in INI the file. + +01.03.07 - v0.34b - 23030b +Changes: +1) The miss of the menu of confirmation of deleting of files is corrected at activation of the window of other application. +2) Navigating by the mouse: + a) Button F8 - deleting of the file. + +18.02.07 - v0.34 - 22870b +Changes: +1) Deleting the selected files. + +17.02.07 - v0.33b - 22841b +Changes: +1) Menu of confirmation of deleting of files. + +14.02.07 - v0.33 - 22494b +Changes: +1) Selection of files by red colour. +2) Single deleting of files. +3) Navigating by the keyboard: + a) Delete and F8 - the deleting of the file, on which is the cursor. + b) Insert - the selection by red colour of the file, on which is the cursor and cursor update on 1 position downwards. + +06.02.07 - v0.32 - 20581b +Changes: +1) Increase of speed of sorting on extensions on 10 %. +2) Error handling of a file system. +3) Button of the main panel: exit from the directory, reboot the directory. +4) Navigating by the keyboard: + a) Ctrl+R - repeated loading of contents of the directory in the active panel + +28.01.07 - v0.30 - 19555b +Changes: +1) Preprocessing contents of the directory. +2) Acceleration of sorting of contents of the directory on names and extensions. +3) Sorting contents of the directory according a size of files. +4) Sorting contents of the directory by date of modification of files. +5) Navigating by the keyboard: + a) Ctrl+F3 - sorting according names, for the active panel + b) Ctrl+F4 - sorting according extensions, for the active panel + c) Ctrl+F5 - sorting according a size, for the active panel + d) Ctrl+F6 - sorting by date of modification, for the active panel + +27.01.07 - v0.27 - 18985b +Changes: +1) Sorting contents of the directory according extensions. + +22.01.07 - v0.25 - 18718b +Changes: +1) Sorting contents of the directory according names. + +13.01.07 - v0.22e - 17898b +Changes: +1) The new icons for some types of files are added. +2) The output of icons for some types of graphics files is added. +3) Sorting contents of the directory on folders and directories. + +11.01.07 - v0.22c - 16877b +Changes: +1) The track from the menu of choice of the disk remaining after it, "empty" completion is eliminated, in a case if quantity of files displayed in the directory not it is enough for overwriting a menu display. + +10.01.07 - v0.22b - 16849b +Changes: +1) The handler of keys in the menu of choice of the disk (Alt+F1, F2) is corrected. + Now menu correctly reacts on activated NumLock. + +07.01.07 - v0.22 - 16835b +Changes: +1) Dynamic allocation of memory for contents of the directory of the left and right panel. +2) Correct allocation of the cursor at an output from the directory in the parent directory. + +05.01.07 - v0.18- 16064b +Changes: +1) The flicker is eliminated at cursor update in limits of the panel, + (The flicker appears only on a bar of the cursor) +2) The flicker is reduced at cursor update for limits of the panel, +3) Navigating by the keyboard: + a) Home - in a beginning of the directory, + b) End - in the end of the directory. +4) The error in the procedure is corrected + Opening of files on the extension. + +29.12.06 - v0.1 - 15411b +Changes: +1) Interface 50 %, +2) Navigating by the keyboard: + a) Up arrow and downwards - cursor update of selection, + b) PageUp and PageDown - page upwards and downwards, + c) Alt+F1 (F2), for choice of the disk of the left (right) panel +3) Start of the applications (Enter), +4) Opening files on the extension (Enter), +5) Loading of files of icons (BMP) both adjustments (INI), and dynamic allocation of memory for them. + +18.10.06 - beginning of the project + Changes: no anything! \ No newline at end of file diff --git a/programs/fs/kfm/trunk/docs/english/kfm_keys.txt b/programs/fs/kfm/trunk/docs/english/kfm_keys.txt new file mode 100644 index 0000000000..c0fb0a4731 --- /dev/null +++ b/programs/fs/kfm/trunk/docs/english/kfm_keys.txt @@ -0,0 +1,43 @@ +Controlling keyboard shortcuts in KFM - Kolibri File Manager v0.47. + +In panels: +1) Cursor update on the active panel: + a) Up arrow and downwards (including keyboards, located in an additional part,) - cursor update on one position upwards or downwards. с) PageUp - page paging upwards. + b) PageDown - page paging downwards. + c) Home - in a beginning of the directory with files. + d) End - in the end of the directory with files. +2) Tab - change of the active panel. +3) Enter - operation with the file on which position there is a selection cursor: р) an input(entrance) in a folder. + a) Start of the program. + b) To open the file in the registered application, according to a contents of the file kfm.ini, unit " < > files associations ". +4) Alt+F1 - call of the menu of choice of the disk displayed on the left panel. +5) Alt+F2 - call of the menu of choice of the disk displayed on the right panel. +6) Sorting files in the active panel: + a) Ctrl+F3 - sorting according names. + b) Ctrl+F4 - sorting according extensions. + c) Ctrl+F5 - sorting according a size. + d) Ctrl+F6 - sorting by date of modification. +7) Ctrl+R - repeated loading of contents of the directory in the active panel. +8) Delete and F8 - the deleting of the file on which is the cursor. +9) Insert - the selection by red colour of the file on which is the cursor and cursor update on 1 position downwards. +10) F4 - to open the file for editing in the registered application, according to a contents of the file kfm.ini, unit " < > files association1 ". +11) F7 - creation of the directory in the active panel. +12) F5 - copying file from the active panel in opposite. +13) F6 - moving of the file from the active panel in opposite. +14) Ctrl+A and Ctrl + (NumPad (+) Up) - selection of all files and directories in the active panel, except for the directory '..' +15) Ctrl + (NumPad (-) Up) - to deselect of all files and directories in the active panel, except for the directory '..' +16) Ctrl + (NumPad (*) Up) - to invert selection of all files and directories in the active panel, except for the directory '..' +17) F12 - program termination. +18) F1 - help, hot shortcut keys. The presence of the file kfm_keys.txt in the directory is required where the application is located. +19) Open file in other application with parameter: + р) Shift + W - set background, mode: tile. + с) Ctrl + W - set background, mode: stretch. +20) Alt+Enter - get for files and directories: location, name, size, amount of files and directories (including for a case of selection of separate files and directories). + +In the menu of choice of the disk: +1) Up arrow and down arrow (including keys, located in an additional part of keyboard) - cursor update on one position upwards or downwards. +2) Enter - the choice of the disk on which position is a selection cursor. +3) Home and PageUp - cursor in a beginning of the list +4) End and PageDown - cursor in the end of the list. +5) Insert - load tray of selected ATAPI device. +6) Delete - eject tray of selected ATAPI device. diff --git a/programs/fs/kfm/trunk/docs/russian/dos_kolibri/history.txt b/programs/fs/kfm/trunk/docs/russian/dos_kolibri/history.txt new file mode 100644 index 0000000000..802630f677 --- /dev/null +++ b/programs/fs/kfm/trunk/docs/russian/dos_kolibri/history.txt @@ -0,0 +1,343 @@ +KFM - Kolibri File Manager + +13.10.07 - v0.47b - 27271b +Изменения: +1) Исправлен баг связанный с неверной обработкой жестких дисков содержащих + разделы с неподдерживаемыми ОС файловыми системами или не содержащими + разделов. +2) Новая версия EDITBOX. Исправлен баг - завершение или некорректная работа + приложения, при одновременном выделении мышью и нажатии клавиш в EDITBOX. + +11.10.07 - v0.47 - 27226b +Изменения: +1) навигация клавиатурой: + a) Alt+Enter - получение для файлов и директорий: + расположения, названия, размера, количества файлов и директорий + (в том числе и для случая выделения отдельных файлов и директорий). + Отдельное спасибо и Mute, за помощь в реализации процедуры + деления целых 64 битных чисел, без использования сопроцессора. +2) Прогресс удаления теперь учитывает все вложенные файлы и директории. +3) Исправлен глюк связанный с неверной обработкой скроллера мыши. + +30.09.07 - v0.46 - 25458b +Изменения: +1) Удаление вложенных папок и файлов, прогресс удаления пока учитывает + выделенные файлы и папки только в родительской директории. + +26.08.07 - v0.45h - 24915b +Изменения: +1) SCROLL BAR - размер бегунка зависит от количества файлов в директории. + +17.08.07 - v0.45g - 24617b +Изменения: +1) навигация мышью: + a) Обработка физических скроллеров мыши, в левой и правой панели. + +09.08.07 - v0.45f - 24257b +Изменения: +1) навигация клавиатурой: + a) Открыть файл в стороннем приложении с параметром: + Shift + W - установить фоновый рисунок рабочего стола, режим отрисовки замостить. + Ctrl + W - установить фоновый рисунок рабочего стола, режим отрисовки растянуть. + (Данные опции пока работают лишь для JPEGVIEW версии 0.18 или выше) + +04.08.07 - v0.45e - 24137b +Изменения: +1) Меню выбора диска - навигация клавиатурой: + а) Insert - загрузить лоток выбранного ATAPI привода. + б) Delete - выгрузить лоток выбранного ATAPI привода. + +02.08.07 - v0.45d - 24037b +Изменения: +1) Исправлен баг - реакция приложения на события мыши, происходящие + относительно другого приложения, окно которого находится на вершине оконного стека. +2) Исправлен баг - "пожирание" ресурсов системы при минимизации окна в панель. + +12.07.07 - v0.45b - 23977b +Изменения: +1) Исправлен баг приводивший к игнорированию мыши на ядрах выше 566 ревизии. + +05.07.07 - v0.45a - 23993b +Изменения: +1) Исправлен баг появившийся в v0.45 - не работали кнопки выбора устройств. + +24.06.07 - v0.45 - 23988b +Изменения: +1) Использование вывода окна без закрашивания рабочей области (Функция 0, EDX бит C). + Теперь окно не моргает при полной перерисовке. +2) Ограничение на минимальный размер окна: Xmin=495, Ymin=180. + Введено из-за неверного отображения элементов окна при меньших размерах. +3) Исправлена ошибка, приводящая к завершению программы при сворачивании окна в заголовок. + +17.06.07 - v0.44k - 23421b +Изменения: +1) Изменена обработка щелчка мыши - запускаемые приложения выводятся поверх окна KFM. +2) Открывание директорий и запуск файлов по двойному щелчку. + +03.06.07 - v0.44i - 23210b +Изменения: +1) Захват фокуса активным SCROLL BAR до отпускания кнопки мыши. + +04.05.07 - v0.44h - 23066b +Изменения: +1) Устранено пропадание фокуса в EDITBOX, в некоторых случаях. + (Спасибо за исправление кода) + +27.04.07 - v0.44g - 23130b +Изменения: +1) Изменен порядок нумерации иконок в INI и BMP файлах, теперь первые три являются + жестко фиксированными. Ранее этого не было, что могло привести к неточностям + при замене файла с иконками на альтернативный. +2) Ускорение вывода на 20% при листании содержимого директории, за счет оптимизации + процедуры поиска выводимых иконок в INI файле. + +26.04.07 - v0.44e - 23126b +Изменения: +1) Изменение SCROLL BAR - теперь при нажатии крайних стрелок перемещается не курсор, + а сдвигается на один элемент просматриваемое содержимое директории. + (Спасибо Heavyiron за предложение идеи) +2) Если количество отображаемых элементов в панели меньше чем максимально возможное + отображаемое значение код SCROLL BAR становиться пассивным. +3) Устранена ошибка, приводившая к зазору между бегунком SCROLL BAR и нижней стрелкой. +4) Устранена ошибка, приводившая к отсутствию коррекции положения курсора при удалении + последнего по списку файла в директории, размер которой менее максимально возможного + отображаемого значения. +5) Небольшая оптимизация кода по размеру. + +22.04.07 - v0.44 - 23118b +Изменения: +1) Полная реализация элемента управления SCROLL BAR. +2) навигация мышью: + а) Выбор активной панели, кликом по панели. + б) Установка курсора выделения на файл или директорию, кликом по выбираемому пункту. + в) Клик по установленному курсору выделения равнозначен нажатию клавиши ENTER. + г) Управление меню выбора диска при помощи мыши. + +21.04.07 - v0.43с - 21777b +Изменения: +1) Новая версия EDITBOX (), исправлены глюки c остаточным выделением имени. +2) Приемлемый цвет выделения для EDITBOX, в версии 0.43 по ошибке был установлен черный. +3) Первичная реализация элемента управления SCROLL BAR, без обратной связи. + +16.04.07 - v0.43 - 20999b +Изменения: +1) Новая версия EDITBOX (Maxxxx32 и ), устранены глюки с правкой имени + при создании, копировании и перемещении файла. +2) Исправлено отображение файлов: файлы с отсутствующим расширением и одновременно + с точкой в конце теперь отображаются полностью. +3) Меню выбора диска - навигация клавиатурой: + а) Home и PageUp - курсор в начало списка + б) End и PageDown - курсор в конец списка +4) Оптимизация вывода полос прогресса при копировании, перемещение и удалении файлов. + Теперь полосы прогресса рисуются полностью лишь в первый раз и при поступлении + события перерисовки окна. + +01.04.07 - v0.42 - 20707b +Изменения: +1) Отображение прогресса копирования файлов. +2) Отображение прогресса перемещения файлов. + +31.03.07 - v0.41 - 20091b +Изменения: +1) Отображение прогресса удаления файлов. +2) навигация клавиатурой: + a) F1 - справка, горячие комбинации клавиш. +3) навигация мышью: + a) Кнопка F1 - справка, горячие комбинации клавиш. + Требуется наличие файла kfm_keys.txt в директории, где расположено приложение. +4) Новая версия стороннего компонента EDITBOX (Maxxxx32 и ). + +29.03.07 - v0.40a - 19708b +Изменения: +1) навигация клавиатурой: + a) F12 - завершение работы программы. +2) навигация мышью: + a) Кнопка F12 - завершение работы программы. + +28.03.07 - v0.40 - 19603b +Изменения: +1) Перемещение выделенных и одиночных файлов, выделенные директории игнорируются. +2) навигация клавиатурой: + a) F6 - перемещение файла из активной панели в противоположную. + б) Ctrl+A и Ctrl+(NumPad(+) Up) - выделение всех файлов и директорий в активной панели, + за исключением директории '..' + в) Ctrl+(NumPad(-) Up) - снять выделение всех файлов и директорий в активной панели, + за исключением директории '..' + г) Ctrl+(NumPad(*) Up) - инвертировать выделение всех файлов и директорий в активной панели, + за исключением директории '..' +3) навигация мышью: + а) Кнопка F6 - перемещение файла из активной панели в противоположную. + б) Кнопка главной панели "Переместить файл" - + перемещение файла из активной панели в противоположную. + +27.03.07 - v0.39 - 18778b +Изменения: +1) Копирование выделенных файлов, выделенные директории игнорируются. +2) Окончательное устранение глюков с выделением файлов. + +24.03.07 - v0.38 - 18510b +Изменения: +1) Копирование файлов превышающих размер свободного ОЗУ. + Память для буфера копирования резервируется из расчета 25% + от свободной памяти ОЗУ в момент начала копирования. + Если размер файла менее 25% свободного ОЗУ размер буфера равен размеру файла. + +20.03.07 - v0.37b - 18239b +Изменения: +1) Исправлена ошибка, когда не изменялся цвет последнего файла в директории + при выделении клавишей Insert. +2) навигация мышью: +Кнопки главной панели: + а) "Создать директорию" - создание директории в активной панели. + б) "Копировать файл" - копирование файла из активной панели в противоположную. + +17.03.07 - v0.37 - 18157b +Изменения: +1) Одиночное копирование файлов (за один проход) для редактирования названия файла + используется сторонний компонент EDITBOX, спасибо авторам: Maxxxx32 и , + за экономию времени в разработке KFM. +2) навигация клавиатурой: + a) F5 - копирование файла из активной панели в противоположную. +3) навигация мышью: + а) Кнопка F5 - копирование файла из активной панели в противоположную. + +16.03.07 - v0.36 - 17338b +Изменения: +1) Создание директории, для ввода названия директории используется + сторонний компонент EDITBOX, спасибо авторам: Maxxxx32 и , + за экономию времени в разработке KFM. +2) навигация клавиатурой: + a) F7 - создание директории в активной панели. +3) навигация мышью: + а) Кнопка F7 - создание директории в активной панели. + +13.03.07 - v0.35f - 15667b +Изменения: +1) Устранено застревание курсора на последней странице при листании End и PageDown. + +11.03.07 - v0.35e - 15590b +Изменения: +1) Кнопка "перезагрузить директорию" теперь перерисовывает только активную панель. +2) Устранено мерцание из-за лишних прорисовок при достижении конца директории + клавишами End и PageDown. +3) Небольшая оптимизация кода по размеру. + +08.03.07 - v0.35b - 15602b +Изменения: +1) Оптимизация использования области путей к файлам. +2) Исправлена ошибка - выход курсора за пределы экрана + при возврате из развернутого режима окна. + +04.03.07 - v0.35 - 21540b +Изменения: +1) Процедура поиска конца секции в INI файле. +2) Поиск и вывод иконок через ассоциации в INI файле. +3) Оптимизация кода по размеру. +4) навигация клавиатурой: + а) F4 - редактирование файла в стороннем приложении, + ассоциации в INI файле. +5) навигация мышью: + а) Кнопка F4 - редактирование файла в стороннем приложении, + ассоциации в INI файле. + +01.03.07 - v0.34b - 23030b +Изменения: +1) Исправлено пропадание меню подтверждения удаления файлов + при активации окна другого приложения. +2) навигация мышью: + а) Кнопка F8 - удаление файла. + +18.02.07 - v0.34 - 22870b +Изменения: +1) Удаление выделенных файлов. + +17.02.07 - v0.33b - 22841b +Изменения: +1) Меню подтверждения удаления файлов. + +14.02.07 - v0.33 - 22494b +Изменения: +1) Выделение файлов красным цветом. +2) Одиночное удаление файлов. +3) навигация клавиатурой: + а) Delete и F8 - удаление файла, на котором находится курсор. + б) Insert - выделение красным цветом файла, на котором находится курсор + и перемещение курсора на 1 позицию вниз. + +06.02.07 - v0.32 - 20581b +Изменения: +1) Увеличение скорости сортировки по расширениям на 10%. +2) Обработка ошибок файловой системы. +3) Кнопки главной панели: выход из директории, перезагрузить директорию. +4) навигация клавиатурой: + а) Ctrl+R - повторная загрузка содержимого директории в активной панели + +28.01.07 - v0.30 - 19555b +Изменения: +1) Предварительная обработка содержимого директории. +2) Ускорение сортировки содержимого директории по именам и расширениям. +3) Сортировка содержимого директории по размеру файлов. +4) Сортировка содержимого директории по дате модификации файлов. +5) навигация клавиатурой: + а) Ctrl+F3 - сортировка по именам, для активной панели + б) Ctrl+F4 - сортировка по расширениям, для активной панели + в) Ctrl+F5 - сортировка по размеру, для активной панели + г) Ctrl+F6 - сортировка по дате модификации, для активной панели + +27.01.07 - v0.27 - 18985b +Изменения: +1) Сортировка содержимого директории по расширениям. + +22.01.07 - v0.25 - 18718b +Изменения: +1) Сортировка содержимого директории по именам. + +13.01.07 - v0.22e - 17898b +Изменения: +1) Добавлены новые иконки для некоторых типов файлов. +2) Добавлен вывод иконок для некоторых типов графических файлов. +3) Сортировка содержимого директории на папки и директории. + +11.01.07 - v0.22c - 16877b +Изменения: +1) Устранен след от меню выбора диска остающийся после его, + "пустого" завершения, в случае если количество файлов отображаемых + в каталоге не достаточно для затирания изображения меню. + +10.01.07 - v0.22b - 16849b +Изменения: +1) Исправлен обработчик клавиш в меню выбора диска (Alt+F1, F2). + Теперь меню корректно реагирует на активированный NumLock. + +07.01.07 - v0.22 - 16835b +Изменения: +1) динамическое выделение памяти для содержимого каталога + левой и правой панели. +2) правильное размещение курсора при выходе из каталога + в родительский каталог. + +05.01.07 - v0.18- 16064b +Изменения: +1) устранено мерцание при перемещении курсора в пределах панели, + (мерцание проявляется лишь на полосе курсора) +2) уменьшено мерцание при перемещении курсора за пределы панели, +3) навигация клавиатурой: + а) Home - в начало каталога, + б) End - в конец каталога. +4) исправлена ошибка в процедуре + открытия файлов по расширению. + +29.12.06 - v0.1 - 15411b +Изменения: +1) интерфейс 50%, +2) навигация клавиатурой: + а) стрелки вверх и вниз - перемещения курсора выделения, + б) PageUp и PageDown - страница вверх и вниз, + в) Alt+F1 (F2), для выбора диска левой (правой) панели +3) запуск приложений (Enter), +4) открытие файлов по расширению (Enter), +5) подгрузка файлов иконок (BMP) и настроек (INI), + и динамическое выделение памяти для них. + +18.10.06 - начало проекта + Изменения: Ничего! \ No newline at end of file diff --git a/programs/fs/kfm/trunk/docs/russian/dos_kolibri/kfm_keys.txt b/programs/fs/kfm/trunk/docs/russian/dos_kolibri/kfm_keys.txt new file mode 100644 index 0000000000..069c2dc4f1 --- /dev/null +++ b/programs/fs/kfm/trunk/docs/russian/dos_kolibri/kfm_keys.txt @@ -0,0 +1,46 @@ +Управляющие сочетания клавиш в KFM - Kolibri File Manager v0.47. + +В панелях: +1) Перемещение курсора по активной панели: + а) стрелки вверх и вниз (в том числе расположенные в дополнительной части клавиатуры) - перемещение курсора на одну позицию вверх или вниз. + б) PageUp - постраничное листание вверх. + в) PageDown - постраничное листание вниз. + г) Home - в начало каталога с файлами. + д) End - в конец каталога с файлами. +2) Tab - изменение активной панели. +3) Enter - действия с файлом на позиции которого находится курсор выделения: + а) вход в папку. + б) запуск программы. + в) открыть файл в прописанном приложении, согласно содержанию файла kfm.ini, раздела "<>files associations". +4) Alt+F1 - вызов меню выбора диска, отображаемого на левой панели. +5) Alt+F2 - вызов меню выбора диска, отображаемого на правой панели. +6) сортировка файлов в активной панели: + а) Ctrl+F3 - сортировка по именам. + б) Ctrl+F4 - сортировка по расширениям. + в) Ctrl+F5 - сортировка по размеру. + г) Ctrl+F6 - сортировка по дате модификации. +7) Ctrl+R - повторная загрузка содержимого директории в активной панели. +8) Delete и F8 - удаление файла на котором находится курсор. +9) Insert - выделение красным цветом файла на котором находится курсор и перемещение курсора на 1 позицию вниз. +10) F4 - открыть файл для редактирования в прописанном приложении, согласно содержанию файла kfm.ini, раздела "<>files association1". +11) F7 - создание директории в активной панели. +12) F5 - копирование файла из активной панели в противоположную. +13) F6 - перемещение файла из активной панели в противоположную. +14) Ctrl+A и Ctrl+(NumPad(+) Up) - выделение всех файлов и директорий в активной панели, за исключением директории '..' +15) Ctrl+(NumPad(-) Up) - снять выделение всех файлов и директорий в активной панели, за исключением директории '..' +16) Ctrl+(NumPad(*) Up) - инвертировать выделение всех файлов и директорий в активной панели, за исключением директории '..' +17) F12 - завершение работы программы. +18) F1 - справка, горячие комбинации клавиш. Требуется наличие файла kfm_keys.txt в директории где расположено приложение. +19) Открыть файл в стороннем приложении с параметром: + а) Shift + W - установить фоновый рисунок рабочего стола, режим отрисовки замостить. + б) Ctrl + W - установить фоновый рисунок рабочего стола, режим отрисовки растянуть. +20) Alt+Enter - получение для файлов и директорий: расположения, названия, размера, количества файлов и директорий + (в том числе и для случая выделения отдельных файлов и директорий). + +В меню выбора диска: +1) стрелки вверх и вниз (в том числе расположенные в дополнительной части клавиатуры) - перемещение курсора на одну позицию вверх или вниз. +2) Enter - выбор диска на позиции которого находится курсор выделения. +3) Home и PageUp - курсор в начало списка +4) End и PageDown - курсор в конец списка. +5) Insert - загрузить лоток выбранного ATAPI привода. +6) Delete - выгрузить лоток выбранного ATAPI привода. diff --git a/programs/fs/kfm/trunk/docs/russian/windows/history.txt b/programs/fs/kfm/trunk/docs/russian/windows/history.txt new file mode 100644 index 0000000000..c5b0ab58a7 --- /dev/null +++ b/programs/fs/kfm/trunk/docs/russian/windows/history.txt @@ -0,0 +1,343 @@ +KFM - Kolibri File Manager + +13.10.07 - v0.47b - 27271b +╚чьхэхэш : +1) ╚ёяЁртыхэ сру ёт чрээ√щ ё эхтхЁэющ юсЁрсюЄъющ цхёЄъшї фшёъют ёюфхЁцр∙шї + Ёрчфхы√ ё эхяюффхЁцштрхь√ьш ╬╤ Їрщыют√ьш ёшёЄхьрьш шыш эх ёюфхЁцр∙шьш + Ёрчфхыют. +2) ═ютр  тхЁёш  EDITBOX. ╚ёяЁртыхэ сру - чртхЁ°хэшх шыш эхъюЁЁхъЄэр  ЁрсюЄр + яЁшыюцхэш , яЁш юфэютЁхьхээюь т√фхыхэшш ь√°№■ ш эрцрЄшш ъыртш° т EDITBOX. + +11.10.07 - v0.47 - 27226b +╚чьхэхэш : +1) эртшурЎш  ъыртшрЄєЁющ: + a) Alt+Enter - яюыєўхэшх фы  Їрщыют ш фшЁхъЄюЁшщ: + Ёрёяюыюцхэш , эрчтрэш , ЁрчьхЁр, ъюышўхёЄтр Їрщыют ш фшЁхъЄюЁшщ + (т Єюь ўшёых ш фы  ёыєўр  т√фхыхэш  юЄфхы№э√ї Їрщыют ш фшЁхъЄюЁшщ). + ╬Єфхы№эюх ёярёшсю ш Mute, чр яюью∙№ т ЁхрышчрЎшш яЁюЎхфєЁ√ + фхыхэш  Ўхы√ї 64 сшЄэ√ї ўшёхы, схч шёяюы№чютрэш  ёюяЁюЎхёёюЁр. +2) ╧ЁюуЁхёё єфрыхэш  ЄхяхЁ№ єўшЄ√трхЄ тёх тыюцхээ√х Їрщы√ ш фшЁхъЄюЁшш. +3) ╚ёяЁртыхэ уы■ъ ёт чрээ√щ ё эхтхЁэющ юсЁрсюЄъющ ёъЁюыыхЁр ь√°ш. + +30.09.07 - v0.46 - 25458b +╚чьхэхэш : +1) ╙фрыхэшх тыюцхээ√ї яряюъ ш Їрщыют, яЁюуЁхёё єфрыхэш  яюър єўшЄ√трхЄ + т√фхыхээ√х Їрщы√ ш яряъш Єюы№ъю т ЁюфшЄхы№ёъющ фшЁхъЄюЁшш. + +26.08.07 - v0.45h - 24915b +╚чьхэхэш : +1) SCROLL BAR - ЁрчьхЁ схуєэър чртшёшЄ юЄ ъюышўхёЄтр Їрщыют т фшЁхъЄюЁшш. + +17.08.07 - v0.45g - 24617b +╚чьхэхэш : +1) эртшурЎш  ь√°№■: + a) ╬сЁрсюЄър Їшчшўхёъшї ёъЁюыыхЁют ь√°ш, т ыхтющ ш яЁртющ ярэхыш. + +09.08.07 - v0.45f - 24257b +╚чьхэхэш : +1) эртшурЎш  ъыртшрЄєЁющ: + a) ╬ЄъЁ√Є№ Їрщы т ёЄюЁюээхь яЁшыюцхэшш ё ярЁрьхЄЁюь: + Shift + W - єёЄрэютшЄ№ Їюэют√щ Ёшёєэюъ Ёрсюўхую ёЄюыр, Ёхцшь юЄЁшёютъш чрьюёЄшЄ№. + Ctrl + W - єёЄрэютшЄ№ Їюэют√щ Ёшёєэюъ Ёрсюўхую ёЄюыр, Ёхцшь юЄЁшёютъш ЁрёЄ эєЄ№. + (─рээ√х юяЎшш яюър ЁрсюЄр■Є ыш°№ фы  JPEGVIEW тхЁёшш 0.18 шыш т√°х) + +04.08.07 - v0.45e - 24137b +╚чьхэхэш : +1) ╠хэ■ т√сюЁр фшёър - эртшурЎш  ъыртшрЄєЁющ: + р) Insert - чруЁєчшЄ№ ыюЄюъ т√сЁрээюую ATAPI яЁштюфр. + с) Delete - т√уЁєчшЄ№ ыюЄюъ т√сЁрээюую ATAPI яЁштюфр. + +02.08.07 - v0.45d - 24037b +╚чьхэхэш : +1) ╚ёяЁртыхэ сру - ЁхръЎш  яЁшыюцхэш  эр ёюс√Єш  ь√°ш, яЁюшёїюф ∙шх + юЄэюёшЄхы№эю фЁєуюую яЁшыюцхэш , юъэю ъюЄюЁюую эрїюфшЄё  эр тхЁ°шэх юъюээюую ёЄхър. +2) ╚ёяЁртыхэ сру - "яюцшЁрэшх" ЁхёєЁёют ёшёЄхь√ яЁш ьшэшьшчрЎшш юъэр т ярэхы№. + +12.07.07 - v0.45b - 23977b +╚чьхэхэш : +1) ╚ёяЁртыхэ сру яЁштюфшт°шщ ъ шуэюЁшЁютрэш■ ь√°ш эр  фЁрї т√°х 566 Ёхтшчшш. + +05.07.07 - v0.45a - 23993b +╚чьхэхэш : +1) ╚ёяЁртыхэ сру яю тшт°шщё  т v0.45 - эх ЁрсюЄрыш ъэюяъш т√сюЁр єёЄЁющёЄт. + +24.06.07 - v0.45 - 23988b +╚чьхэхэш : +1) ╚ёяюы№чютрэшх т√тюфр юъэр схч чръЁр°штрэш  Ёрсюўхщ юсырёЄш (╘єэъЎш  0, EDX сшЄ C). + ╥хяхЁ№ юъэю эх ьюЁурхЄ яЁш яюыэющ яхЁхЁшёютъх. +2) ╬уЁрэшўхэшх эр ьшэшьры№э√щ ЁрчьхЁ юъэр: Xmin=495, Ymin=180. + ┬тхфхэю шч-чр эхтхЁэюую юЄюсЁрцхэш  ¤ыхьхэЄют юъэр яЁш ьхэ№°шї ЁрчьхЁрї. +3) ╚ёяЁртыхэр ю°шсър, яЁштюф ∙р  ъ чртхЁ°хэш■ яЁюуЁрьь√ яЁш ётюЁрўштрэшш юъэр т чруюыютюъ. + +17.06.07 - v0.44k - 23421b +╚чьхэхэш : +1) ╚чьхэхэр юсЁрсюЄър ∙хыўър ь√°ш - чряєёърхь√х яЁшыюцхэш  т√тюф Єё  яютхЁї юъэр KFM. +2) ╬ЄъЁ√трэшх фшЁхъЄюЁшщ ш чряєёъ Їрщыют яю фтющэюьє ∙хыўъє. + +03.06.07 - v0.44i - 23210b +╚чьхэхэш : +1) ╟рїтрЄ Їюъєёр ръЄштэ√ь SCROLL BAR фю юЄяєёърэш  ъэюяъш ь√°ш. + +04.05.07 - v0.44h - 23066b +╚чьхэхэш : +1) ╙ёЄЁрэхэю яЁюярфрэшх Їюъєёр т EDITBOX, т эхъюЄюЁ√ї ёыєўр ї. + (╤ярёшсю чр шёяЁртыхэшх ъюфр) + +27.04.07 - v0.44g - 23130b +╚чьхэхэш : +1) ╚чьхэхэ яюЁ фюъ эєьхЁрЎшш шъюэюъ т INI ш BMP Їрщырї, ЄхяхЁ№ яхЁт√х ЄЁш  ты ■Єё  + цхёЄъю ЇшъёшЁютрээ√ьш. ╨рэхх ¤Єюую эх с√ыю, ўЄю ьюуыю яЁштхёЄш ъ эхЄюўэюёЄ ь + яЁш чрьхэх Їрщыр ё шъюэърьш эр ры№ЄхЁэрЄштэ√щ. +2) ╙ёъюЁхэшх т√тюфр эр 20% яЁш ышёЄрэшш ёюфхЁцшьюую фшЁхъЄюЁшш, чр ёўхЄ юяЄшьшчрЎшш + яЁюЎхфєЁ√ яюшёър т√тюфшь√ї шъюэюъ т INI Їрщых. + +26.04.07 - v0.44e - 23126b +╚чьхэхэш : +1) ╚чьхэхэшх SCROLL BAR - ЄхяхЁ№ яЁш эрцрЄшш ъЁрщэшї ёЄЁхыюъ яхЁхьх∙рхЄё  эх ъєЁёюЁ, + р ёфтшурхЄё  эр юфшэ ¤ыхьхэЄ яЁюёьрЄЁштрхьюх ёюфхЁцшьюх фшЁхъЄюЁшш. + (╤ярёшсю Heavyiron чр яЁхфыюцхэшх шфхш) +2) ┼ёыш ъюышўхёЄтю юЄюсЁрцрхь√ї ¤ыхьхэЄют т ярэхыш ьхэ№°х ўхь ьръёшьры№эю тючьюцэюх + юЄюсЁрцрхьюх чэрўхэшх ъюф SCROLL BAR ёЄрэютшЄ№ё  ярёёштэ√ь. +3) ╙ёЄЁрэхэр ю°шсър, яЁштюфшт°р  ъ чрчюЁє ьхцфє схуєэъюь SCROLL BAR ш эшцэхщ ёЄЁхыъющ. +4) ╙ёЄЁрэхэр ю°шсър, яЁштюфшт°р  ъ юЄёєЄёЄтш■ ъюЁЁхъЎшш яюыюцхэш  ъєЁёюЁр яЁш єфрыхэшш + яюёыхфэхую яю ёяшёъє Їрщыр т фшЁхъЄюЁшш, ЁрчьхЁ ъюЄюЁющ ьхэхх ьръёшьры№эю тючьюцэюую + юЄюсЁрцрхьюую чэрўхэш . +5) ═хсюы№°р  юяЄшьшчрЎш  ъюфр яю ЁрчьхЁє. + +22.04.07 - v0.44 - 23118b +╚чьхэхэш : +1) ╧юыэр  ЁхрышчрЎш  ¤ыхьхэЄр єяЁртыхэш  SCROLL BAR. +2) эртшурЎш  ь√°№■: + р) ┬√сюЁ ръЄштэющ ярэхыш, ъышъюь яю ярэхыш. + с) ╙ёЄрэютър ъєЁёюЁр т√фхыхэш  эр Їрщы шыш фшЁхъЄюЁш■, ъышъюь яю т√сшЁрхьюьє яєэъЄє. + т) ╩ышъ яю єёЄрэютыхээюьє ъєЁёюЁє т√фхыхэш  Ёртэючэрўхэ эрцрЄш■ ъыртш°ш ENTER. + у) ╙яЁртыхэшх ьхэ■ т√сюЁр фшёър яЁш яюью∙ш ь√°ш. + +21.04.07 - v0.43ё - 21777b +╚чьхэхэш : +1) ═ютр  тхЁёш  EDITBOX (), шёяЁртыхэ√ уы■ъш c юёЄрЄюўэ√ь т√фхыхэшхь шьхэш. +2) ╧Ёшхьыхь√щ ЎтхЄ т√фхыхэш  фы  EDITBOX, т тхЁёшш 0.43 яю ю°шсъх с√ы єёЄрэютыхэ ўхЁэ√щ. +3) ╧хЁтшўэр  ЁхрышчрЎш  ¤ыхьхэЄр єяЁртыхэш  SCROLL BAR, схч юсЁрЄэющ ёт чш. + +16.04.07 - v0.43 - 20999b +╚чьхэхэш : +1) ═ютр  тхЁёш  EDITBOX (Maxxxx32 ш ), єёЄЁрэхэ√ уы■ъш ё яЁртъющ шьхэш + яЁш ёючфрэшш, ъюяшЁютрэшш ш яхЁхьх∙хэшш Їрщыр. +2) ╚ёяЁртыхэю юЄюсЁрцхэшх Їрщыют: Їрщы√ ё юЄёєЄёЄтє■∙шь Ёрё°шЁхэшхь ш юфэютЁхьхээю + ё Єюўъющ т ъюэЎх ЄхяхЁ№ юЄюсЁрцр■Єё  яюыэюёЄ№■. +3) ╠хэ■ т√сюЁр фшёър - эртшурЎш  ъыртшрЄєЁющ: + р) Home ш PageUp - ъєЁёюЁ т эрўрыю ёяшёър + с) End ш PageDown - ъєЁёюЁ т ъюэхЎ ёяшёър +4) ╬яЄшьшчрЎш  т√тюфр яюыюё яЁюуЁхёёр яЁш ъюяшЁютрэшш, яхЁхьх∙хэшх ш єфрыхэшш Їрщыют. + ╥хяхЁ№ яюыюё√ яЁюуЁхёёр Ёшёє■Єё  яюыэюёЄ№■ ыш°№ т яхЁт√щ Ёрч ш яЁш яюёЄєяыхэшш + ёюс√Єш  яхЁхЁшёютъш юъэр. + +01.04.07 - v0.42 - 20707b +╚чьхэхэш : +1) ╬ЄюсЁрцхэшх яЁюуЁхёёр ъюяшЁютрэш  Їрщыют. +2) ╬ЄюсЁрцхэшх яЁюуЁхёёр яхЁхьх∙хэш  Їрщыют. + +31.03.07 - v0.41 - 20091b +╚чьхэхэш : +1) ╬ЄюсЁрцхэшх яЁюуЁхёёр єфрыхэш  Їрщыют. +2) эртшурЎш  ъыртшрЄєЁющ: + a) F1 - ёяЁртър, уюЁ ўшх ъюьсшэрЎшш ъыртш°. +3) эртшурЎш  ь√°№■: + a) ╩эюяър F1 - ёяЁртър, уюЁ ўшх ъюьсшэрЎшш ъыртш°. + ╥ЁхсєхЄё  эрышўшх Їрщыр kfm_keys.txt т фшЁхъЄюЁшш, уфх Ёрёяюыюцхэю яЁшыюцхэшх. +4) ═ютр  тхЁёш  ёЄюЁюээхую ъюьяюэхэЄр EDITBOX (Maxxxx32 ш ). + +29.03.07 - v0.40a - 19708b +╚чьхэхэш : +1) эртшурЎш  ъыртшрЄєЁющ: + a) F12 - чртхЁ°хэшх ЁрсюЄ√ яЁюуЁрьь√. +2) эртшурЎш  ь√°№■: + a) ╩эюяър F12 - чртхЁ°хэшх ЁрсюЄ√ яЁюуЁрьь√. + +28.03.07 - v0.40 - 19603b +╚чьхэхэш : +1) ╧хЁхьх∙хэшх т√фхыхээ√ї ш юфшэюўэ√ї Їрщыют, т√фхыхээ√х фшЁхъЄюЁшш шуэюЁшЁє■Єё . +2) эртшурЎш  ъыртшрЄєЁющ: + a) F6 - яхЁхьх∙хэшх Їрщыр шч ръЄштэющ ярэхыш т яЁюЄштюяюыюцэє■. + с) Ctrl+A ш Ctrl+(NumPad(+) Up) - т√фхыхэшх тёхї Їрщыют ш фшЁхъЄюЁшщ т ръЄштэющ ярэхыш, + чр шёъы■ўхэшхь фшЁхъЄюЁшш '..' + т) Ctrl+(NumPad(-) Up) - ёэ Є№ т√фхыхэшх тёхї Їрщыют ш фшЁхъЄюЁшщ т ръЄштэющ ярэхыш, + чр шёъы■ўхэшхь фшЁхъЄюЁшш '..' + у) Ctrl+(NumPad(*) Up) - шэтхЁЄшЁютрЄ№ т√фхыхэшх тёхї Їрщыют ш фшЁхъЄюЁшщ т ръЄштэющ ярэхыш, + чр шёъы■ўхэшхь фшЁхъЄюЁшш '..' +3) эртшурЎш  ь√°№■: + р) ╩эюяър F6 - яхЁхьх∙хэшх Їрщыр шч ръЄштэющ ярэхыш т яЁюЄштюяюыюцэє■. + с) ╩эюяър уыртэющ ярэхыш "╧хЁхьхёЄшЄ№ Їрщы" - + яхЁхьх∙хэшх Їрщыр шч ръЄштэющ ярэхыш т яЁюЄштюяюыюцэє■. + +27.03.07 - v0.39 - 18778b +╚чьхэхэш : +1) ╩юяшЁютрэшх т√фхыхээ√ї Їрщыют, т√фхыхээ√х фшЁхъЄюЁшш шуэюЁшЁє■Єё . +2) ╬ъюэўрЄхы№эюх єёЄЁрэхэшх уы■ъют ё т√фхыхэшхь Їрщыют. + +24.03.07 - v0.38 - 18510b +╚чьхэхэш : +1) ╩юяшЁютрэшх Їрщыют яЁхт√°р■∙шї ЁрчьхЁ ётюсюфэюую ╬╟╙. + ╧рь Є№ фы  сєЇхЁр ъюяшЁютрэш  ЁхчхЁтшЁєхЄё  шч ЁрёўхЄр 25% + юЄ ётюсюфэющ ярь Єш ╬╟╙ т ьюьхэЄ эрўрыр ъюяшЁютрэш . + ┼ёыш ЁрчьхЁ Їрщыр ьхэхх 25% ётюсюфэюую ╬╟╙ ЁрчьхЁ сєЇхЁр Ёртхэ ЁрчьхЁє Їрщыр. + +20.03.07 - v0.37b - 18239b +╚чьхэхэш : +1) ╚ёяЁртыхэр ю°шсър, ъюуфр эх шчьхэ ыё  ЎтхЄ яюёыхфэхую Їрщыр т фшЁхъЄюЁшш + яЁш т√фхыхэшш ъыртш°хщ Insert. +2) эртшурЎш  ь√°№■: +╩эюяъш уыртэющ ярэхыш: + р) "╤ючфрЄ№ фшЁхъЄюЁш■" - ёючфрэшх фшЁхъЄюЁшш т ръЄштэющ ярэхыш. + с) "╩юяшЁютрЄ№ Їрщы" - ъюяшЁютрэшх Їрщыр шч ръЄштэющ ярэхыш т яЁюЄштюяюыюцэє■. + +17.03.07 - v0.37 - 18157b +╚чьхэхэш : +1) ╬фшэюўэюх ъюяшЁютрэшх Їрщыют (чр юфшэ яЁюїюф) фы  ЁхфръЄшЁютрэш  эрчтрэш  Їрщыр + шёяюы№чєхЄё  ёЄюЁюээшщ ъюьяюэхэЄ EDITBOX, ёярёшсю ртЄюЁрь: Maxxxx32 ш , + чр ¤ъюэюьш■ тЁхьхэш т ЁрчЁрсюЄъх KFM. +2) эртшурЎш  ъыртшрЄєЁющ: + a) F5 - ъюяшЁютрэшх Їрщыр шч ръЄштэющ ярэхыш т яЁюЄштюяюыюцэє■. +3) эртшурЎш  ь√°№■: + р) ╩эюяър F5 - ъюяшЁютрэшх Їрщыр шч ръЄштэющ ярэхыш т яЁюЄштюяюыюцэє■. + +16.03.07 - v0.36 - 17338b +╚чьхэхэш : +1) ╤ючфрэшх фшЁхъЄюЁшш, фы  ттюфр эрчтрэш  фшЁхъЄюЁшш шёяюы№чєхЄё  + ёЄюЁюээшщ ъюьяюэхэЄ EDITBOX, ёярёшсю ртЄюЁрь: Maxxxx32 ш , + чр ¤ъюэюьш■ тЁхьхэш т ЁрчЁрсюЄъх KFM. +2) эртшурЎш  ъыртшрЄєЁющ: + a) F7 - ёючфрэшх фшЁхъЄюЁшш т ръЄштэющ ярэхыш. +3) эртшурЎш  ь√°№■: + р) ╩эюяър F7 - ёючфрэшх фшЁхъЄюЁшш т ръЄштэющ ярэхыш. + +13.03.07 - v0.35f - 15667b +╚чьхэхэш : +1) ╙ёЄЁрэхэю чрёЄЁхтрэшх ъєЁёюЁр эр яюёыхфэхщ ёЄЁрэшЎх яЁш ышёЄрэшш End ш PageDown. + +11.03.07 - v0.35e - 15590b +╚чьхэхэш : +1) ╩эюяър "яхЁхчруЁєчшЄ№ фшЁхъЄюЁш■" ЄхяхЁ№ яхЁхЁшёют√трхЄ Єюы№ъю ръЄштэє■ ярэхы№. +2) ╙ёЄЁрэхэю ьхЁЎрэшх шч-чр ыш°эшї яЁюЁшёютюъ яЁш фюёЄшцхэшш ъюэЎр фшЁхъЄюЁшш + ъыртш°рьш End ш PageDown. +3) ═хсюы№°р  юяЄшьшчрЎш  ъюфр яю ЁрчьхЁє. + +08.03.07 - v0.35b - 15602b +╚чьхэхэш : +1) ╬яЄшьшчрЎш  шёяюы№чютрэш  юсырёЄш яєЄхщ ъ Їрщырь. +2) ╚ёяЁртыхэр ю°шсър - т√їюф ъєЁёюЁр чр яЁхфхы√ ¤ъЁрэр + яЁш тючтЁрЄх шч ЁрчтхЁэєЄюую Ёхцшьр юъэр. + +04.03.07 - v0.35 - 21540b +╚чьхэхэш : +1) ╧ЁюЎхфєЁр яюшёър ъюэЎр ёхъЎшш т INI Їрщых. +2) ╧юшёъ ш т√тюф шъюэюъ ўхЁхч рёёюЎшрЎшш т INI Їрщых. +3) ╬яЄшьшчрЎш  ъюфр яю ЁрчьхЁє. +4) эртшурЎш  ъыртшрЄєЁющ: + р) F4 - ЁхфръЄшЁютрэшх Їрщыр т ёЄюЁюээхь яЁшыюцхэшш, + рёёюЎшрЎшш т INI Їрщых. +5) эртшурЎш  ь√°№■: + р) ╩эюяър F4 - ЁхфръЄшЁютрэшх Їрщыр т ёЄюЁюээхь яЁшыюцхэшш, + рёёюЎшрЎшш т INI Їрщых. + +01.03.07 - v0.34b - 23030b +╚чьхэхэш : +1) ╚ёяЁртыхэю яЁюярфрэшх ьхэ■ яюфЄтхЁцфхэш  єфрыхэш  Їрщыют + яЁш ръЄштрЎшш юъэр фЁєуюую яЁшыюцхэш . +2) эртшурЎш  ь√°№■: + р) ╩эюяър F8 - єфрыхэшх Їрщыр. + +18.02.07 - v0.34 - 22870b +╚чьхэхэш : +1) ╙фрыхэшх т√фхыхээ√ї Їрщыют. + +17.02.07 - v0.33b - 22841b +╚чьхэхэш : +1) ╠хэ■ яюфЄтхЁцфхэш  єфрыхэш  Їрщыют. + +14.02.07 - v0.33 - 22494b +╚чьхэхэш : +1) ┬√фхыхэшх Їрщыют ъЁрёэ√ь ЎтхЄюь. +2) ╬фшэюўэюх єфрыхэшх Їрщыют. +3) эртшурЎш  ъыртшрЄєЁющ: + р) Delete ш F8 - єфрыхэшх Їрщыр, эр ъюЄюЁюь эрїюфшЄё  ъєЁёюЁ. + с) Insert - т√фхыхэшх ъЁрёэ√ь ЎтхЄюь Їрщыр, эр ъюЄюЁюь эрїюфшЄё  ъєЁёюЁ + ш яхЁхьх∙хэшх ъєЁёюЁр эр 1 яючшЎш■ тэшч. + +06.02.07 - v0.32 - 20581b +╚чьхэхэш : +1) ╙тхышўхэшх ёъюЁюёЄш ёюЁЄшЁютъш яю Ёрё°шЁхэш ь эр 10%. +2) ╬сЁрсюЄър ю°шсюъ Їрщыютющ ёшёЄхь√. +3) ╩эюяъш уыртэющ ярэхыш: т√їюф шч фшЁхъЄюЁшш, яхЁхчруЁєчшЄ№ фшЁхъЄюЁш■. +4) эртшурЎш  ъыртшрЄєЁющ: + р) Ctrl+R - яютЄюЁэр  чруЁєчър ёюфхЁцшьюую фшЁхъЄюЁшш т ръЄштэющ ярэхыш + +28.01.07 - v0.30 - 19555b +╚чьхэхэш : +1) ╧ЁхфтрЁшЄхы№эр  юсЁрсюЄър ёюфхЁцшьюую фшЁхъЄюЁшш. +2) ╙ёъюЁхэшх ёюЁЄшЁютъш ёюфхЁцшьюую фшЁхъЄюЁшш яю шьхэрь ш Ёрё°шЁхэш ь. +3) ╤юЁЄшЁютър ёюфхЁцшьюую фшЁхъЄюЁшш яю ЁрчьхЁє Їрщыют. +4) ╤юЁЄшЁютър ёюфхЁцшьюую фшЁхъЄюЁшш яю фрЄх ьюфшЇшърЎшш Їрщыют. +5) эртшурЎш  ъыртшрЄєЁющ: + р) Ctrl+F3 - ёюЁЄшЁютър яю шьхэрь, фы  ръЄштэющ ярэхыш + с) Ctrl+F4 - ёюЁЄшЁютър яю Ёрё°шЁхэш ь, фы  ръЄштэющ ярэхыш + т) Ctrl+F5 - ёюЁЄшЁютър яю ЁрчьхЁє, фы  ръЄштэющ ярэхыш + у) Ctrl+F6 - ёюЁЄшЁютър яю фрЄх ьюфшЇшърЎшш, фы  ръЄштэющ ярэхыш + +27.01.07 - v0.27 - 18985b +╚чьхэхэш : +1) ╤юЁЄшЁютър ёюфхЁцшьюую фшЁхъЄюЁшш яю Ёрё°шЁхэш ь. + +22.01.07 - v0.25 - 18718b +╚чьхэхэш : +1) ╤юЁЄшЁютър ёюфхЁцшьюую фшЁхъЄюЁшш яю шьхэрь. + +13.01.07 - v0.22e - 17898b +╚чьхэхэш : +1) ─юсртыхэ√ эют√х шъюэъш фы  эхъюЄюЁ√ї Єшяют Їрщыют. +2) ─юсртыхэ т√тюф шъюэюъ фы  эхъюЄюЁ√ї Єшяют уЁрЇшўхёъшї Їрщыют. +3) ╤юЁЄшЁютър ёюфхЁцшьюую фшЁхъЄюЁшш эр яряъш ш фшЁхъЄюЁшш. + +11.01.07 - v0.22c - 16877b +╚чьхэхэш : +1) ╙ёЄЁрэхэ ёыхф юЄ ьхэ■ т√сюЁр фшёър юёЄр■∙шщё  яюёых хую, + "яєёЄюую" чртхЁ°хэш , т ёыєўрх хёыш ъюышўхёЄтю Їрщыют юЄюсЁрцрхь√ї + т ърЄрыюух эх фюёЄрЄюўэю фы  чрЄшЁрэш  шчюсЁрцхэш  ьхэ■. + +10.01.07 - v0.22b - 16849b +╚чьхэхэш : +1) ╚ёяЁртыхэ юсЁрсюЄўшъ ъыртш° т ьхэ■ т√сюЁр фшёър (Alt+F1, F2). + ╥хяхЁ№ ьхэ■ ъюЁЁхъЄэю ЁхрушЁєхЄ эр ръЄштшЁютрээ√щ NumLock. + +07.01.07 - v0.22 - 16835b +╚чьхэхэш : +1) фшэрьшўхёъюх т√фхыхэшх ярь Єш фы  ёюфхЁцшьюую ърЄрыюур + ыхтющ ш яЁртющ ярэхыш. +2) яЁртшы№эюх Ёрчьх∙хэшх ъєЁёюЁр яЁш т√їюфх шч ърЄрыюур + т ЁюфшЄхы№ёъшщ ърЄрыюу. + +05.01.07 - v0.18- 16064b +╚чьхэхэш : +1) єёЄЁрэхэю ьхЁЎрэшх яЁш яхЁхьх∙хэшш ъєЁёюЁр т яЁхфхырї ярэхыш, + (ьхЁЎрэшх яЁю ты хЄё  ыш°№ эр яюыюёх ъєЁёюЁр) +2) єьхэ№°хэю ьхЁЎрэшх яЁш яхЁхьх∙хэшш ъєЁёюЁр чр яЁхфхы√ ярэхыш, +3) эртшурЎш  ъыртшрЄєЁющ: + р) Home - т эрўрыю ърЄрыюур, + с) End - т ъюэхЎ ърЄрыюур. +4) шёяЁртыхэр ю°шсър т яЁюЎхфєЁх + юЄъЁ√Єш  Їрщыют яю Ёрё°шЁхэш■. + +29.12.06 - v0.1 - 15411b +╚чьхэхэш : +1) шэЄхЁЇхщё 50%, +2) эртшурЎш  ъыртшрЄєЁющ: + р) ёЄЁхыъш ттхЁї ш тэшч - яхЁхьх∙хэш  ъєЁёюЁр т√фхыхэш , + с) PageUp ш PageDown - ёЄЁрэшЎр ттхЁї ш тэшч, + т) Alt+F1 (F2), фы  т√сюЁр фшёър ыхтющ (яЁртющ) ярэхыш +3) чряєёъ яЁшыюцхэшщ (Enter), +4) юЄъЁ√Єшх Їрщыют яю Ёрё°шЁхэш■ (Enter), +5) яюфуЁєчър Їрщыют шъюэюъ (BMP) ш эрёЄЁюхъ (INI), + ш фшэрьшўхёъюх т√фхыхэшх ярь Єш фы  эшї. + +18.10.06 - эрўрыю яЁюхъЄр + ╚чьхэхэш : ═шўхую! \ No newline at end of file diff --git a/programs/fs/kfm/trunk/docs/russian/windows/kfm_keys.txt b/programs/fs/kfm/trunk/docs/russian/windows/kfm_keys.txt new file mode 100644 index 0000000000..efe66c57d8 --- /dev/null +++ b/programs/fs/kfm/trunk/docs/russian/windows/kfm_keys.txt @@ -0,0 +1,46 @@ +╙яЁрты ■∙шх ёюўхЄрэш  ъыртш° т KFM - Kolibri File Manager v0.47. + +┬ ярэхы ї: +1) ╧хЁхьх∙хэшх ъєЁёюЁр яю ръЄштэющ ярэхыш: + р) ёЄЁхыъш ттхЁї ш тэшч (т Єюь ўшёых Ёрёяюыюцхээ√х т фюяюыэшЄхы№эющ ўрёЄш ъыртшрЄєЁ√) - яхЁхьх∙хэшх ъєЁёюЁр эр юфэє яючшЎш■ ттхЁї шыш тэшч. + с) PageUp - яюёЄЁрэшўэюх ышёЄрэшх ттхЁї. + т) PageDown - яюёЄЁрэшўэюх ышёЄрэшх тэшч. + у) Home - т эрўрыю ърЄрыюур ё Їрщырьш. + ф) End - т ъюэхЎ ърЄрыюур ё Їрщырьш. +2) Tab - шчьхэхэшх ръЄштэющ ярэхыш. +3) Enter - фхщёЄтш  ё Їрщыюь эр яючшЎшш ъюЄюЁюую эрїюфшЄё  ъєЁёюЁ т√фхыхэш : + р) тїюф т яряъє. + с) чряєёъ яЁюуЁрьь√. + т) юЄъЁ√Є№ Їрщы т яЁюяшёрээюь яЁшыюцхэшш, ёюуырёэю ёюфхЁцрэш■ Їрщыр kfm.ini, Ёрчфхыр "<>files associations". +4) Alt+F1 - т√чют ьхэ■ т√сюЁр фшёър, юЄюсЁрцрхьюую эр ыхтющ ярэхыш. +5) Alt+F2 - т√чют ьхэ■ т√сюЁр фшёър, юЄюсЁрцрхьюую эр яЁртющ ярэхыш. +6) ёюЁЄшЁютър Їрщыют т ръЄштэющ ярэхыш: + р) Ctrl+F3 - ёюЁЄшЁютър яю шьхэрь. + с) Ctrl+F4 - ёюЁЄшЁютър яю Ёрё°шЁхэш ь. + т) Ctrl+F5 - ёюЁЄшЁютър яю ЁрчьхЁє. + у) Ctrl+F6 - ёюЁЄшЁютър яю фрЄх ьюфшЇшърЎшш. +7) Ctrl+R - яютЄюЁэр  чруЁєчър ёюфхЁцшьюую фшЁхъЄюЁшш т ръЄштэющ ярэхыш. +8) Delete ш F8 - єфрыхэшх Їрщыр эр ъюЄюЁюь эрїюфшЄё  ъєЁёюЁ. +9) Insert - т√фхыхэшх ъЁрёэ√ь ЎтхЄюь Їрщыр эр ъюЄюЁюь эрїюфшЄё  ъєЁёюЁ ш яхЁхьх∙хэшх ъєЁёюЁр эр 1 яючшЎш■ тэшч. +10) F4 - юЄъЁ√Є№ Їрщы фы  ЁхфръЄшЁютрэш  т яЁюяшёрээюь яЁшыюцхэшш, ёюуырёэю ёюфхЁцрэш■ Їрщыр kfm.ini, Ёрчфхыр "<>files association1". +11) F7 - ёючфрэшх фшЁхъЄюЁшш т ръЄштэющ ярэхыш. +12) F5 - ъюяшЁютрэшх Їрщыр шч ръЄштэющ ярэхыш т яЁюЄштюяюыюцэє■. +13) F6 - яхЁхьх∙хэшх Їрщыр шч ръЄштэющ ярэхыш т яЁюЄштюяюыюцэє■. +14) Ctrl+A ш Ctrl+(NumPad(+) Up) - т√фхыхэшх тёхї Їрщыют ш фшЁхъЄюЁшщ т ръЄштэющ ярэхыш, чр шёъы■ўхэшхь фшЁхъЄюЁшш '..' +15) Ctrl+(NumPad(-) Up) - ёэ Є№ т√фхыхэшх тёхї Їрщыют ш фшЁхъЄюЁшщ т ръЄштэющ ярэхыш, чр шёъы■ўхэшхь фшЁхъЄюЁшш '..' +16) Ctrl+(NumPad(*) Up) - шэтхЁЄшЁютрЄ№ т√фхыхэшх тёхї Їрщыют ш фшЁхъЄюЁшщ т ръЄштэющ ярэхыш, чр шёъы■ўхэшхь фшЁхъЄюЁшш '..' +17) F12 - чртхЁ°хэшх ЁрсюЄ√ яЁюуЁрьь√. +18) F1 - ёяЁртър, уюЁ ўшх ъюьсшэрЎшш ъыртш°. ╥ЁхсєхЄё  эрышўшх Їрщыр kfm_keys.txt т фшЁхъЄюЁшш уфх Ёрёяюыюцхэю яЁшыюцхэшх. +19) ╬ЄъЁ√Є№ Їрщы т ёЄюЁюээхь яЁшыюцхэшш ё ярЁрьхЄЁюь: + р) Shift + W - єёЄрэютшЄ№ Їюэют√щ Ёшёєэюъ Ёрсюўхую ёЄюыр, Ёхцшь юЄЁшёютъш чрьюёЄшЄ№. + с) Ctrl + W - єёЄрэютшЄ№ Їюэют√щ Ёшёєэюъ Ёрсюўхую ёЄюыр, Ёхцшь юЄЁшёютъш ЁрёЄ эєЄ№. +20) Alt+Enter - яюыєўхэшх фы  Їрщыют ш фшЁхъЄюЁшщ: Ёрёяюыюцхэш , эрчтрэш , ЁрчьхЁр, ъюышўхёЄтр Їрщыют ш фшЁхъЄюЁшщ + (т Єюь ўшёых ш фы  ёыєўр  т√фхыхэш  юЄфхы№э√ї Їрщыют ш фшЁхъЄюЁшщ). + +┬ ьхэ■ т√сюЁр фшёър: +1) ёЄЁхыъш ттхЁї ш тэшч (т Єюь ўшёых Ёрёяюыюцхээ√х т фюяюыэшЄхы№эющ ўрёЄш ъыртшрЄєЁ√) - яхЁхьх∙хэшх ъєЁёюЁр эр юфэє яючшЎш■ ттхЁї шыш тэшч. +2) Enter - т√сюЁ фшёър эр яючшЎшш ъюЄюЁюую эрїюфшЄё  ъєЁёюЁ т√фхыхэш . +3) Home ш PageUp - ъєЁёюЁ т эрўрыю ёяшёър +4) End ш PageDown - ъєЁёюЁ т ъюэхЎ ёяшёър. +5) Insert - чруЁєчшЄ№ ыюЄюъ т√сЁрээюую ATAPI яЁштюфр. +6) Delete - т√уЁєчшЄ№ ыюЄюъ т√сЁрээюую ATAPI яЁштюфр. diff --git a/programs/fs/kfm/trunk/draw.inc b/programs/fs/kfm/trunk/draw.inc new file mode 100644 index 0000000000..d575ac29f9 --- /dev/null +++ b/programs/fs/kfm/trunk/draw.inc @@ -0,0 +1,1210 @@ +draw_buttons_panel: + mov ecx,[skin_high] + add ecx,19 + shl ecx,16 + mov cx,18 + mov ebx,[window_width] + sub ebx,9 + add ebx,5 shl 16 + mcall 13,,,0xffffff + mov edx,15 shl 16+20 + add edx,[skin_high] + pusha + call .calculate_button + mov edx,150 + int 0x40 + popa + mcall 7,[buttons_img_start],<16,16> + add edx,26 shl 16 + add ebx,16*16*3 + pusha + call .calculate_button + mov edx,151 + int 0x40 + popa + int 0x40 + add edx,26 shl 16 + add ebx,16*16*3 + pusha + call .calculate_button + mov edx,152 + int 0x40 + popa + int 0x40 + add edx,26 shl 16 + add ebx,16*16*3 + pusha + call .calculate_button + mov edx,153 + int 0x40 + popa + int 0x40 + add edx,26 shl 16 + add ebx,16*16*3 + pusha + call .calculate_button + mov edx,154 + int 0x40 + popa + int 0x40 + add edx,26 shl 16 + add ebx,16*16*3 + pusha + call .calculate_button + mov edx,155 + int 0x40 + popa + int 0x40 + add edx,26 shl 16 + add ebx,16*16*3 + pusha + call .calculate_button + mov edx,156 + int 0x40 + popa + int 0x40 + add edx,26 shl 16 + add ebx,16*16*3 + pusha + call .calculate_button + mov edx,157 + int 0x40 + popa + int 0x40 + ret +.calculate_button: + mov esi,0xffffff + mov ebx,edx + mov bx,15 + mov ecx,edx + shl ecx,16 + mov cx,bx + mov eax,8 + ret +;--------------------------------------------------------------------- +draw_left_sort_button: + mov bx,[left_panel_x.start_x] + add bx,[left_panel_x.size_x] + sub ebx,50+15 + mov cx,[left_panel_y.start_y] + call calclulate_sort_button_1 + mov edx,145 +.start: + mov esi,0xffffff + dec ebp + cmp [left_sort_flag],ebp + jne @f + mov esi,0xccccff +@@: + call calclulate_sort_button_2 + jnz .start + ret +;--------------------------------------------------------------------- +calclulate_sort_button_1: + shl ebx,16 + mov bx,50 + sub cx,14 + shl ecx,16 + mov cx,12 + mov eax,8 + mov ebp,4 + ret +;--------------------------------------------------------------------- +calclulate_sort_button_2: + inc ebp + int 0x40 + pusha + push ebx + mov eax,ebx + inc eax + shl eax,16 + add ebx,eax + cmp ebp,4 + jne @f + mov bx,15 + jmp .continue +@@: + mov bx,1 +.continue: + mov edx,0xcccccc + inc ecx + mcall 13 + pop ebx + cmp ebp,1 + jne @f + mov eax,[temp_panel_end] + shl eax,16 + add eax,[temp_panel_end] + shr eax,16 + shr ebx,16 + sub ebx,eax + shl ebx,16 + mov bx,ax + rol ebx,16 + mcall 13 + mov [temp_panel_end],ebx +@@: + popa + pusha + shr ecx,16 + mov bx,cx + add ebx,3 shl 16+2 + mov ecx,0x10000000 + mov edx,ebp + dec edx + shl edx,2 + add edx,sort_button_name + mov eax,4 + mov esi,eax + int 0x40 + popa + dec edx + sub ebx,38 shl 16 + mov bx,36 + dec ebp + ret +;--------------------------------------------------------------------- +draw_right_sort_button: + mov bx,[right_panel_x.start_x] + add bx,[right_panel_x.size_x] + sub ebx,50+15 + mov cx,[right_panel_y.start_y] + call calclulate_sort_button_1 + mov edx,149 +.start: + mov esi,0xffffff + dec ebp + cmp [right_sort_flag],ebp + jne @f + mov esi,0xccccff +@@: + call calclulate_sort_button_2 + jnz .start + ret +;--------------------------------------------------------------------- +draw_left_select_disk_button: + mov bx,[left_panel_x.start_x] + mov cx,[left_panel_y.start_y] + mov ebp,read_folder_name ;read_folder.name + mov edx,0x40000000+140 +.1: + shl ebx,16 + mov bx,60 + sub cx,14 + shl ecx,16 + mov cx,13 + mov esi,0xffffff + mov eax,8 + int 0x40 + mov edx,0xffffff + mov eax,13 + int 0x40 + pusha +; mov esi,read_folder.name+2 + mov esi,ebp + add esi,2 +@@: + inc esi + cmp [esi],byte 0 + je @f + cmp [esi],byte '/' + jne @r + add esi,2 +@@: + sub esi,ebp ;read_folder.name + add ebx,1 shl 16 + shr ecx,16 + mov bx,cx + add ebx,3 + mov edx,ebp + mcall 4, ,0 ;,read_folder.name + popa + add ebx,50 shl 16 + mov bx,10 + mov edx,0x6060ff + int 0x40 + mov [temp_panel_end],ebx + add ebx,1 shl 16 + shr ecx,16 + mov bx,cx + add ebx,3 + mcall 4, ,0x80ffffff,select_disk_char + add ebx,1 shl 16 + int 0x40 + ret +;--------------------------------------------------------------------- +draw_right_select_disk_button: + mov bx,[right_panel_x.start_x] + mov cx,[right_panel_y.start_y] + mov ebp,read_folder_1_name ;read_folder_1.name + mov edx,0x40000000+141 + jmp draw_left_select_disk_button.1 +;--------------------------------------------------------------------- +draw_device_button: + mov edi,device_present + mov edx,120 + mov bx,[left_panel_x.start_x] + mov cx,[left_panel_y.start_y] + mov eax,[left_panel_x] + mov [temp_panel_end],eax + mov [temp_counter],0 + call .draw +; inc edx + mov edx,130 + mov bx,[right_panel_x.start_x] + mov cx,[right_panel_y.start_y] + mov eax,[right_panel_x] + mov [temp_panel_end],eax + mov [temp_counter],1 +.draw: + shl ebx,16 + mov bx,25 + sub cx,30 + shl ecx,16 + mov cx,12 + mov eax,8 + mov esi,0xaa00 + cmp [edi],byte 1 + jne @f + mov ebp,read_folder_device_name.rd + call .draw_1 +@@: + inc edx + cmp [edi+1],byte 1 + jne @f + mov ebp,read_folder_device_name.fd + call .draw_1 +@@: + inc edx + cmp [edi+2],byte 1 + jne @f + mov ebp,read_folder_device_name.hd0 + call .draw_1 +@@: + inc edx + cmp [edi+3],byte 1 + jne @f + mov ebp,read_folder_device_name.hd1 + call .draw_1 +@@: + inc edx + cmp [edi+4],byte 1 + jne @f + mov ebp,read_folder_device_name.hd2 + call .draw_1 +@@: + inc edx + cmp [edi+5],byte 1 + jne @f + mov ebp,read_folder_device_name.hd3 + call .draw_1 +@@: + inc edx + cmp [edi+6],byte 1 + jne @f + mov ebp,read_folder_device_name.cd0 + call .draw_1 +@@: + inc edx + cmp [edi+7],byte 1 + jne @f + mov ebp,read_folder_device_name.cd1 + call .draw_1 +@@: + inc edx + cmp [edi+8],byte 1 + jne @f + mov ebp,read_folder_device_name.cd2 + call .draw_1 +@@: + inc edx + cmp [edi+9],byte 1 + jne @f + mov ebp,read_folder_device_name.cd3 + call .draw_1 +@@: + push ebx + mov ebx,[temp_panel_end] + mov ax,bx + shr ebx,16 + add eax,ebx + pop ebx + ror ebx,16 + sub ax,bx + rol ebx,16 + mov bx,ax + add ecx,1 + add ebx,1 + mcall 13,,,0xcccccc + cmp [temp_counter],0 + je @f + mov ax,bx + shr ebx,16 + add bx,ax + mov eax,[window_width] + sub eax,4 + sub ax,bx + cmp eax,0 + jbe @f + shl ebx,16 + mov bx,ax + mov ax,[right_panel_y.size_y] + add ax,[right_panel_y.start_y] + shr ecx,16 + sub ax,cx + shl ecx,16 + mov cx,ax + mov edx,0xcccccc + mcall 13 + ret + +.draw_1: + int 0x40 + pusha + mov eax,ebx + inc eax + shl eax,16 + add ebx,eax + mov bx,1 + inc ecx + mov edx,0xcccccc + mcall 13 + popa + pusha + mov edx,ebp + shr ecx,16 + mov bx,cx + add ebx,2 shl 16 +3 + mov ecx,0x90000000 + mov eax,4 + int 0x40 + mov ecx,0x90ffffff + sub ebx,1 shl 16 + 1 + int 0x40 + popa + add ebx,27 shl 16 +@@: + ret +;--------------------------------------------------------------------- +draw_ATAPI_tray_control: + ret +;--------------------------------------------------------------------- +calc_max_panel_line: + xor eax,eax + mov ax,[left_panel_y.size_y] + mov ebx,10 + xor edx,edx + div ebx + mov [max_panel_line],eax + ret +;--------------------------------------------------------------------- +draw_icon: + pusha + test [edx-40],byte 0x10 + jnz .draw_dir_pic + call get_icon_number + imul ebx,270 + add ebx,mem + jmp .draw +.draw_dir_pic: + mov ebx,mem + cmp [edx],word '..' + jne .draw + add ebx,270 ;*17 +.draw: + mov edx,[esp+16] ;ebx + ror edx,16 + sub edx,12 + rol edx,16 + mcall 7, ,<10,9> + popa + ret +;--------------------------------------------------------------------- +; ╧┼╨┼┬╬─ 10-═█╒ ╫╚╤┼╦ ╤╬ ╟═└╩╬╠ ┬ ╤╥╨╬╩╬┬█╔ ┬╚─ +; ┬їюф: +; AX - ўшёыю +; EBX - рфЁхё ёЄЁюъш +; ┬√їюф: +; ёЄЁюър ёюфхЁцшЄ ўшёыю, ъюэхЎ юЄьхўхэ ъюфюь 0 +decimal_string_2: + push eax ebx ecx edx + xor ecx,ecx + mov [ebx],byte '0' + inc ebx +.p3: + xor edx,edx + push ebx + mov ebx,10 + div ebx + pop ebx + add edx,48 + push edx + inc ecx + cmp ax,0 + jne .p3 + cmp ecx,1 + jbe .p4 + mov ecx,2 + dec ebx +.p4: + pop edx + mov [ebx],dl + inc ebx + loop .p4 + pop edx ecx ebx eax + ret +;--------------------------------------------------------------------- +decimal_string_4: + push eax ecx edx + xor ecx,ecx + mov [ebx],byte '0' + inc ebx +.p3: + xor edx,edx + push ebx + mov ebx,10 + div ebx + pop ebx + add edx,48 + push edx + inc ecx + cmp eax,0 + jne .p3 + cmp ecx,3 + jbe .p4 + mov ecx,4 + dec ebx +.p4: + pop edx + mov [ebx],dl + inc ebx + loop .p4 + pop edx ecx eax + ret +;--------------------------------------------------------------------- +draw_type_size_date: + pusha + test [edx-40],byte 0x10 + jz .copy_type + mov [type_table],dword ' ' + mov [file_name_length],0 + mov [extension_size],0 + jmp .start ;.size +.copy_type: + mov [type_table],dword ' ' + mov [type_table+4],word ' ' +.start: + mov esi,edx + xor eax,eax +@@: + cld + lodsb + test eax,eax + jnz @b + mov [file_name_length],esi + sub [file_name_length],edx + mov [temp_counter_1],esi + test [edx-40],byte 0x10 + jnz .size +;@@: + dec esi + dec edx +@@: + std + lodsb + cmp esi,edx + je .extension_size_0 ;@f + cmp al,'.' + jnz @b + add esi,2 + mov [extension_start],esi + mov ecx,[temp_counter_1] + sub ecx,esi + inc ecx + mov [extension_size],ecx + sub [file_name_length],ecx + cmp ecx,2 + ja @f + inc [file_name_length] +@@: + sub ecx,2 + cmp ecx,4 + jbe @f + mov ecx,4 + mov [type_table+4],word '..' +@@: + mov edi,type_table ;+1 + cld + rep movsb + mov [edi],byte ' ' + inc edx + jmp .size +.extension_size_0: + inc edx + mov [extension_size],0 +.size: + test [edx-40],byte 0x10 + jz .copy_size + mov [size_table],dword '----' + mov [size_table+4],word '- ' + jmp .date +.copy_size: +;/0x40000000 - Gb +;/0x100000 - Mb +;/0x400 Kb + mov [size_table],dword ' ' + mov [size_table+4],word ' ' + push ebx + push edx + mov eax,[edx-40+32] + mov ebx,0x40000000 + xor edx,edx + div ebx + cmp eax,0 + je @f + mov ebx,size_table + call decimal_string_4 + mov [ebx],byte 'G' + jmp .size_convert_end +@@: + mov edx,[esp] + mov eax,[edx-40+32] + mov ebx,0x100000 + xor edx,edx + div ebx + cmp eax,0 + je @f + mov ebx,size_table + call decimal_string_4 + mov [ebx],byte 'M' + jmp .size_convert_end +@@: + mov edx,[esp] + mov eax,[edx-40+32] + mov ebx,0x400 + xor edx,edx + div ebx + cmp eax,0 + je @f + mov ebx,size_table + call decimal_string_4 + mov [ebx],byte 'K' + jmp .size_convert_end +@@: + mov edx,[esp] + mov eax,[edx-40+32] +;.size_convert: + mov ebx,size_table + call decimal_string_4 +.size_convert_end: + cmp [size_table],byte '0' + jne @f + mov [size_table],byte ' ' +@@: + cmp [size_table+4],byte ' ' + jne @f + mov esi,size_table+3 + mov edi,esi + inc edi + mov ecx,5 + std + rep movsb + jmp @r +@@: + pop edx + pop ebx +.date: + xor eax,eax + mov al,[edx-40+28] + push ebx + mov ebx,date_table + call decimal_string_2 + mov al,[edx-40+29] + mov ebx,date_table+3 + call decimal_string_2 + mov ax,[edx-40+30] + mov ebx,year_table + call decimal_string_4 + mov ax,[year_table+2] + mov [date_table+6],ax + pop ebx + ror ebx,16 + add bx,[left_panel_x.size_x] + sub ebx,122+12+15 + rol ebx,16 + mov ecx,0 + cmp [marked_file],byte 0 + je @f + mov ecx,0xff0000 +@@: + mov edx,type_table + mov esi,20 + mov eax,4 + int 0x40 + popa + ret +;--------------------------------------------------------------------- +draw_folder_data: + cmp [drawing_panel_folder],1 + jne .right_panel + mov eax,[left_folder_block] + sub eax,[max_panel_line] + test eax,0x8000000 + jz .ok_left + mov [left_start_draw_line],0 + jmp @f +.ok_left: + cmp eax,[left_start_draw_line] + jae @f + mov [left_start_draw_line],eax +@@: + mov bx,[left_panel_x.start_x] +; inc bx + add bx,12 + shl ebx,16 + mov bx,[left_panel_y.start_y] + inc bx + mov edx,[left_start_draw_line] + imul edx,304 + add edx,[left_folder_data] + add edx,32+40 + mov [temp_counter],0 + jmp .type_folder +.right_panel: + mov eax,[right_folder_block] + sub eax,[max_panel_line] + test eax,0x8000000 + jz .ok_right + mov [right_start_draw_line],0 + jmp @f +.ok_right: + cmp eax,[right_start_draw_line] + jae @f + mov [right_start_draw_line],eax +@@: + mov bx,[right_panel_x.start_x] +; inc bx + add bx,12 + shl ebx,16 + mov bx,[right_panel_y.start_y] + inc bx + mov edx,[right_start_draw_line] + imul edx,304 + add edx,[right_folder_data] + add edx,32+40 + mov [temp_counter],1 +; mov edx,retrieved_devices_table +.type_folder: + xor eax,eax +.start: + pusha + mov eax,edx + cmp [temp_counter],1 + je @f + sub eax,[left_folder_data] + sub eax,32+40 + xor edx,edx + mov ebx,304 + div ebx + cmp eax,[left_folder_block] + je .end_1 + jmp .continue_1 +@@: + sub eax,[right_folder_data] + sub eax,32+40 + xor edx,edx + mov ebx,304 + div ebx + cmp eax,[right_folder_block] + je .end_1 +.continue_1: + popa + cmp eax,[max_panel_line] ; 20 + je .end_2 ;.end + mov [marked_file],0 + cmp [edx+299-40],byte 0 + je @f + mov [marked_file],1 +@@: + call clear_line + call draw_type_size_date + call draw_icon + push eax + xor eax,eax + mov ax,[left_panel_x.size_x] + push ebx edx + mov ebx,6 + xor edx,edx + div ebx + pop edx ebx + sub eax,23+2+2 + mov esi,[file_name_length] + mov [temp_counter_1],0 + cmp esi,eax + jbe @f + mov esi,eax + mov [temp_counter_1],1 +@@: + mov ecx,0 + cmp [marked_file],byte 0 + je @f + mov ecx,0xff0000 +@@: + mov eax,4 + int 0x40 + cmp [temp_counter_1],0 + je .continue + mov eax,esi ;[file_name_length] + imul eax,6 + shl eax,16 + push ebx edx + add ebx,eax + mov esi,2 + mov ecx,0xff0000 + mov edx,truncated_filename_char + mov eax,4 + int 0x40 + add ebx,1 shl 16 + int 0x40 + pop edx ebx +.continue: + add ebx,10 + add edx,304 ;10 + pop eax + inc eax + jmp .start +.end_1: + popa +.end_2: + mov ax,[left_panel_y.start_y] + add ax,[left_panel_y.size_y] + mov cx,bx + dec cx + rol ecx,16 + mov cx,ax + mov eax,ecx + shr eax,16 + sub cx,ax + cmp cx,0 + jbe @f + mov bx,[left_panel_x.size_x] + sub ebx,12 shl 16 + mov edx,0xffffff + mcall 13 +@@: + +.end: + cmp [drawing_panel_folder],1 + jne @f + call draw_scroll_bar_left + ret +@@: + call draw_scroll_bar_right + ret +;--------------------------------------------------------------------- +clear_line: + cmp [not_clear_lines],0 + jne .end_1 + pusha + shl ebx,16 + shr ebx,16 + dec ebx + cmp [drawing_panel_folder],1 + jne .right + cmp [select_panel_counter],0 + jne .continue + mov ax,[left_start_draw_cursor_line] + add ax,[left_panel_y.start_y] + cmp bx,ax + je .end + jmp .continue +.right: + cmp [select_panel_counter],0 + je .continue + mov ax,[right_start_draw_cursor_line] + add ax,[right_panel_y.start_y] + cmp bx,ax + je .end +.continue: + mov ebx,[esp+16] + mov cx,bx + dec cx + rol ecx,16 + mov cx,10 + mov bx,[left_panel_x.size_x] + cmp [drawing_panel_folder],1 + je @f + dec ebx +@@: + sub ebx,12 shl 16+15 + mov edx,0xffffff + mov eax,13 + int 0x40 +.end: + popa +.end_1: + ret +;--------------------------------------------------------------------- +draw_left_panel: + call clear_left_panel + call calc_max_panel_line + call draw_left_panel_selection + mov [drawing_panel_folder],1 + call draw_folder_data + call draw_left_panel_patch + ret +;--------------------------------------------------------------------- +draw_right_panel: + call clear_right_panel + call calc_max_panel_line + call draw_right_panel_selection + mov [drawing_panel_folder],2 + call draw_folder_data + call draw_right_panel_patch + ret +;--------------------------------------------------------------------- +draw_left_panel_patch: + cmp [select_panel_counter],0 + jne .end + mov edx,read_folder_name ;read_folder.name +.1: + call clear_patch_area + mov ebx,[window_high] + sub ebx,33 + add ebx,8 shl 16 + mcall 4, ,0x80000000 ; ,read_folder.name +.end: + ret +;--------------------------------------------------------------------- +draw_right_panel_patch: + cmp [select_panel_counter],1 + jne draw_left_panel_patch.end + mov edx,read_folder_1_name ;read_folder_1.name + jmp draw_left_panel_patch.1 +;--------------------------------------------------------------------- +clear_patch_area: + push edx + mov ebx,[window_width] + sub ebx,9 + add ebx,5 shl 16 + mov ecx,[window_high] + sub ecx,35 + shl ecx,16 + mov cx,12 + mov edx,0xffffcc + mov eax,13 + int 0x40 + pop edx + ret +;--------------------------------------------------------------------- +draw_left_panel_selection: + cmp [select_panel_counter],0 + jne .end + mov eax,[left_folder_block] + sub eax,[left_start_draw_line] + mov edx,left_start_draw_cursor_line + mov cx,[edx] + call for_all_panel_selection + mov eax,[left_folder_block] + dec eax + imul eax,10 + cmp ax,cx + jae @f + mov cx,ax +@@: + mov [edx],cx + mov ebx,[left_panel_x] + add cx,[left_panel_y.start_y] +.1: + shl ecx,16 + mov cx,10 + mov edx,0xbbddff + sub ebx,15 + mov eax,13 + int 0x40 +.end: + ret +;--------------------------------------------------------------------- +draw_right_panel_selection: + cmp [select_panel_counter],1 + jne draw_left_panel_selection.end + mov eax,[right_folder_block] + sub eax,[right_start_draw_line] + mov edx,right_start_draw_cursor_line + mov cx,[edx] + call for_all_panel_selection + mov eax,[right_folder_block] + dec eax + imul eax,10 + cmp ax,cx + jae @f + mov cx,ax +@@: + mov [edx],cx + mov ebx,[right_panel_x] + add cx,[right_panel_y.start_y] + jmp draw_left_panel_selection.1 +;--------------------------------------------------------------------- +for_all_panel_selection: +; dec eax + imul eax,10 + cmp ax,cx + jae @f + mov cx,ax +@@: + mov eax,[max_panel_line] + dec eax + imul eax,10 + cmp ax,cx + jae @f + mov cx,ax +@@: + ret +;--------------------------------------------------------------------- +clear_left_panel: + mov ebx,7 shl 16 + add ebx,[window_width] + shr bx,1 + sub ebx,6+1 + mov [left_panel_x],ebx + call calculate_panel_1 + mov [left_panel_y],ecx +; cmp [left_panel_clear_all],0 +; je @f +; call calculate_panel_2 +; mov [left_panel_clear_all],0 +;@@: + ret +;--------------------------------------------------------------------- +calculate_panel_1: + mov ecx,[skin_high] + add ecx,70 + shl ecx,16 + add ecx,[window_high] + sub ecx,130 + ret +;--------------------------------------------------------------------- +;calculate_panel_2: +; sub ebx,15 +; mov edx,0xffffff +; mov eax,13 +; int 0x40 +; ret +;--------------------------------------------------------------------- +clear_right_panel: + mov ebx,[window_width] + shr ebx,1 + add ebx,3 + shl ebx,16 + add ebx,[window_width] + shr bx,1 + sub bx,2+6 + mov [right_panel_x],ebx + call calculate_panel_1 + mov [right_panel_y],ecx +; cmp [right_panel_clear_all],0 +; je @f +; call calculate_panel_2 +; mov [right_panel_clear_all],0 +;@@: + ret +;--------------------------------------------------------------------- +erase_fbutton: + mov edx,0x80000065 + mov eax,8 + mov ebp,12 +.start: + int 0x40 + dec ebp + jnz .start + ret +;--------------------------------------------------------------------- +draw_fbutton: + mov ecx,[window_high] + sub ecx,20 + shl ecx,16 + add ecx,15 + mov eax,[window_width] +; sub eax,8 + mov ebx,12 + xor edx,edx + div ebx + mov [fbutton_width],eax + mov ebx,5 shl 16 + add ebx,eax + sub ebx,2 + mov esi,0xaa00 + mov edx,101 + mov eax,8 + mov ebp,12 +.start: + cmp ebp,1 + jne @f + mov eax,ebx + shr eax,16 + mov bx,ax + mov eax,[window_width] + sub ax,bx + sub ax,5 + mov bx,ax + mov eax,8 +@@: + mcall + push eax ebx edx + mov edx,0x6060ff + mov bx,10 + cmp ebp,4 + jae @f + mov bx,18 +@@: + mcall 13 + cmp ebp,1 + je @f + ror ebx,16 + add ebx,[fbutton_width] + dec ebx + rol ebx,16 + mov bx,1 + mov edx,0xcccccc + inc ecx + mcall + dec ecx +@@: + pop edx ebx eax + call .rol_ror + inc edx + dec ebp + jnz .start + call draw_fbutton_name + ret +.rol_ror: + rol ebx,16 + add ebx,[fbutton_width] + ror ebx,16 + ret +;--------------------------------------------------------------------- +draw_fbutton_name: + mov ebx, 7 shl 16 + add ebx,[window_high] + sub ebx,15 + mov eax,4 + mov ecx,0x90000000 + push ebx + call .type_1 + pop ebx + mov ecx,0x90ffffff + sub ebx,1 shl 16 + 1 +.type_1: + cmp [shift_flag],1 + je .type_shift + cmp [ctrl_flag],1 + je .type_ctrl + cmp [alt_flag],1 + je .type_alt +.type: + mov edx,fbutton_name.f1 + call .type_all + mov edx,fbutton_name.f2 + call .type_all + mov edx,fbutton_name.f3 + call .type_all + mov edx,fbutton_name.f4 + call .type_all + mov edx,fbutton_name.f5 + call .type_all + mov edx,fbutton_name.f6 + call .type_all + mov edx,fbutton_name.f7 + call .type_all + mov edx,fbutton_name.f8 + call .type_all + mov edx,fbutton_name.f9 + call .type_all + mov edx,fbutton_name.f10 + call .type_all + mov edx,fbutton_name.f11 + call .type_all + mov edx,fbutton_name.f12 + int 0x40 + ret +.type_shift: + mov edx,fbutton_name_shift.f1 + call .type_all + mov edx,fbutton_name_shift.f2 + call .type_all + mov edx,fbutton_name_shift.f3 + call .type_all + mov edx,fbutton_name_shift.f4 + call .type_all + mov edx,fbutton_name_shift.f5 + call .type_all + mov edx,fbutton_name_shift.f6 + call .type_all + mov edx,fbutton_name_shift.f7 + call .type_all + mov edx,fbutton_name_shift.f8 + call .type_all + mov edx,fbutton_name_shift.f9 + call .type_all + mov edx,fbutton_name_shift.f10 + call .type_all + mov edx,fbutton_name_shift.f11 + call .type_all + mov edx,fbutton_name_shift.f12 + int 0x40 + ret +.type_ctrl: + mov edx,fbutton_name_ctrl.f1 + call .type_all + mov edx,fbutton_name_ctrl.f2 + call .type_all + mov edx,fbutton_name_ctrl.f3 + call .type_all + mov edx,fbutton_name_ctrl.f4 + call .type_all + mov edx,fbutton_name_ctrl.f5 + call .type_all + mov edx,fbutton_name_ctrl.f6 + call .type_all + mov edx,fbutton_name_ctrl.f7 + call .type_all + mov edx,fbutton_name_ctrl.f8 + call .type_all + mov edx,fbutton_name_ctrl.f9 + call .type_all + mov edx,fbutton_name_ctrl.f10 + call .type_all + mov edx,fbutton_name_ctrl.f11 + call .type_all + mov edx,fbutton_name_ctrl.f12 + int 0x40 + ret +.type_alt: + mov edx,fbutton_name_alt.f1 + call .type_all + mov edx,fbutton_name_alt.f2 + call .type_all + mov edx,fbutton_name_alt.f3 + call .type_all + mov edx,fbutton_name_alt.f4 + call .type_all + mov edx,fbutton_name_alt.f5 + call .type_all + mov edx,fbutton_name_alt.f6 + call .type_all + mov edx,fbutton_name_alt.f7 + call .type_all + mov edx,fbutton_name_alt.f8 + call .type_all + mov edx,fbutton_name_alt.f9 + call .type_all + mov edx,fbutton_name_alt.f10 + call .type_all + mov edx,fbutton_name_alt.f11 + call .type_all + mov edx,fbutton_name_alt.f12 +.type_all: + int 0x40 + call draw_fbutton.rol_ror + ret diff --git a/programs/fs/kfm/trunk/editbox.mac b/programs/fs/kfm/trunk/editbox.mac new file mode 100644 index 0000000000..972057e391 --- /dev/null +++ b/programs/fs/kfm/trunk/editbox.mac @@ -0,0 +1,1129 @@ +;Макрос для вывода основных функций которые испльзуются боксом +macro use_general_func +{ +;debug_func +;---------------------------------------------------------- +;--- процедура прорисовки выделеной части ----------------- +;---------------------------------------------------------- +.draw_shift: + test word ed_flags,ed_shift_bac ;установка флага, выделенной области + jz @f + mov ebp,shift_color + mov ebx,dword ed_shift_pos + call .sh_cl_ +@@: ret +;---------------------------------------------------------- +;--- процедура прорисовки текста -------------------------- +;---------------------------------------------------------- +.draw_text: +;--- вычисляем, сколько помещается символов --- +;--- чтобы мусор не рисовать --- + call .get_n + mov esi,ed_size + mov ebx,ed_offset + sub esi,ebx + cmp eax,esi + jae @F + mov esi,eax ;чтобы не выходить за пределы экрана +;--- рисуем текст --- +@@: mov eax,4 + mov ebx,ed_left + mov edx,ed_offset + add ebx,2 + shl ebx,16 + add ebx,ed_top + mov ecx,ed_text_color + add ebx,4 + add edx,ed_text + mcall +ret +;---------------------------------------------------------- +;--- процедура прорисовки фона ---------------------------- +;входные данные +;eax +;edx - color +;---------------------------------------------------------- +;вход только цвет edx +.draw_bg: + mov ebx,ed_left + add ebx,1 + mov edx,ed_color + shl ebx,16 + add ebx,ed_width + sub ebx,1 +.draw_bg_eax: + mov ecx,ed_top + mov eax,13 + add ecx,1 + shl ecx,16 + add ecx,ed_height + dec ecx + mcall +ret +;---------------------------------------------------------- +;--- процедура получения количества символов в текущей щирине компонента +;---------------------------------------------------------- +.get_n: + mov eax,ed_width ;получем ширину компонента + xor edx,edx ;результат распологается в паре edx:eax в eax - остаток + sub eax,4 ;вычтим 4 + mov ebx,6 ;загрузми делитель + div ebx ;размделим на 6 +ret +;---------------------------------------------------------- +;--- процедура рисования курсора -------------------------- +;---------------------------------------------------------- +;входные ebp- цвет +.clear_cursor: + mov edx,ebp + mov ebx,cl_curs_x + mov ecx,cl_curs_y + jmp .draw_curs +.draw_cursor: + mov edx,ed_text_color + mov ebx,ed_pos + mov ecx,ed_offset + sub ebx,ecx + + lea ebx,[ebx*2+ebx] + shl ebx,1 + ;imul ebx,6 + add ebx,ed_left + mov ecx,ed_top + inc ebx + add ecx,2 + mov ebp,ebx + shl ebx,16 + mov bx,bp + mov ebp,ecx + + shl ecx,16 + mov cx,bp + add ecx,ed_height-4 + + mov cl_curs_x,ebx + mov cl_curs_y,ecx +.draw_curs: + mcall 38 +ret +;---------------------------------------------------------- +;--- процедура рисования рамки ---------------------------- +;---------------------------------------------------------- +.draw_border: +;--- цвет рамки --- + test word ed_flags,ed_focus + mov edx,ed_focus_border_color + jne @f + mov edx,ed_blur_border_color +@@: +;--- сверху --- + mov eax,38 + mov ebx,ed_left + mov ecx,ebx + shl ebx,16 + mov bx,cx + add ebx,ed_width + mov ecx,ed_top + mov esi,ecx + shl ecx,16 + mov cx,si + mcall +;--- снизу --- + mov esi,ecx + add ecx,ed_height + mov ebp,ecx + shl ecx,16 + mov cx,bp + mcall +;--- слева --- + mov cx,si + mov ebp,ebx + sub ebx,ed_width + mcall +;--- справа --- + mov ebx,ebp + shl ebx,16 + mov bx,bp + mcall +ret +;---------------------------------------------------------- +;--- проверка, зашел ли курсор за границы и, если надо, --- +;--- изменяем смещение ------------------------------------ +;--- если смещение было установка флага ed_offset_cl иначе +; если ничего не изменилось то выставление ed_offset_fl +; в общей битовой маррице состояния компонентов word ed_flags +;---------------------------------------------------------- +.check_offset: +pusha + mov ecx,ed_pos + mov ebx,ed_offset + cmp ebx,ecx + ja .sub_8 + + push ebx + call .get_n ;получим кол-во символов в паре регистров edx:eax + pop ebx + mov edx,ebx + add edx,eax ;ed_offset+width editbox + inc edx ;необходимо для номального положения курсора в крайней левой позиции + cmp edx,ecx + ja @f + + mov edx,ed_size + cmp edx,ecx + je .add_end + + sub edx,ecx + cmp edx,8 + jbe .add_8 + add ebx,8 + jmp .chk_d + +.sub_8: cmp ecx,0 + je .sub_min + cmp ebx,8 + jbe .sub_min + sub ebx,8 ;ebx=ed_offset + jmp .chk_d +.sub_min: + xor ebx,ebx + jmp .chk_d + +.add_end:sub edx,eax + mov ebx,edx + jmp .chk_d +.add_8: add ebx,edx +.chk_d: mov ed_offset,ebx + call .draw_bg + and word ed_flags,ed_offset_cl +edit_ex +@@: + or word ed_flags,ed_offset_fl +edit_ex +} + +macro use_key_func +{ +;Обработка Shift для снятия выделения неизвестной области +.shift: ;;;;;;;SHIFT + test word ed_flags,ed_shift + je .f_exit + +@@: mov ebp,shift_color + or word ed_flags,ed_shift_bac ;установка флага, выделенной области + mov ebx,dword ed_shift_pos + call .sh_cl_ + jmp .draw_cursor_text +;;;;;;;;;;;;;;;;;;;;; +.f_exit:call .check_offset + and word ed_flags,ed_shift_cl + call .enable_null + jmp .draw_cursor_text +.sh_cl_: +;;;;;;SHIFT end +;обработка очистки, при левом - правом движении выделения +;для обработки снятия выделения +;входные параметры ebp=color ebx=ed_shift_pos + mov eax,dword ed_pos + cmp eax,ebx + + jae .sh_n + push eax ;меньшее в eax + push ebx ;большее + jmp .sh_n1 + ;если иначе +.sh_n: push ebx + push eax +.sh_n1: + call .check_offset + call .get_n + mov edx,eax ;size of ed_box + mov ecx,ed_offset + add eax,ecx ;eax = w_off= ed_offset+width + mov edx,eax ;save + pop ebx ;большее + pop eax ;меньшее + + cmp eax,ecx ;сравнение с меньшего с offset. + jae .f_f ;если больше + xor eax,eax + cmp edx,ebx ;cравним размер w_off с большим + jb @f + sub ebx,ecx + jmp .nxt_f +@@: mov ebx,edx + sub ebx,ecx + jmp .nxt_f +.f_f: + sub eax,ecx + cmp edx,ebx ;cравним размер w_off с большим + jle @f + sub ebx,ecx + sub ebx,eax + jmp .nxt_f +@@: + mov ebx,edx + sub ebx,ecx + sub ebx,eax +.nxt_f: + mov edx,ebx + lea ebx,[eax*2+eax] + shl ebx,1 + add ebx,ed_left + inc ebx + shl ebx,16 + lea ecx,[edx*2+edx] + shl ecx,1 + mov bx,cx + inc ebx + mov edx,ebp;shift_color + + call .draw_bg_eax +@@: call .enable_null + ret +;;;;;;;;;;;;;;;;;;;;; +;Установка- снятие выделения в один символ +;;;;;;;;;;;;;;;;;;;;; +.drw_sim: + mov eax,dword ed_pos + call .draw_rectangle ;нарисовать прямоугольник с заданным цветом + jmp @b +;;;;;;;;;;;;;;;;;;;;; +;Фукция установки выделения при движения влево и вправо и нажатии shift +;Логика: +;;;;;;;;;; +.draw_wigwag: +;функция установки переменных + mov ebp,shift_color + call .clear_cursor + + or word ed_flags,ed_shift_bac ;установка флага, выделенной области + mov ebp,shift_color + mov eax,dword ed_pos + test word ed_flags,ed_left_fl + jz .low + jmp @f +;;;;;;;;;; +;Фукция удаления выделения при движения влево и вправо и нажатии shift +;Логика: +;;;;;;;;;; +.draw_wigwag_cl: +;функция установки переменных + mov ebp,ed_color + call .clear_cursor + + mov ebp,ed_color + mov eax,dword ed_pos + test word ed_flags,ed_left_fl + jz .low +@@: call .draw_rectangle ;нарисовать прямоугольник закрашиваемой области + ret +.low: dec eax + jmp @b +;входной параметр ebx - ed_pos +.sh_first_sh: + test word ed_flags,ed_shift + je @f + mov dword ed_shift_pos_old,ebx + test word ed_flags,ed_shift_on + jne @f + mov dword ed_shift_pos,ebx + or word ed_flags,ed_shift_on +@@: ret +;Обработка крайних положений в editbox при нажатом shift +;производит снятие выделение, если нет shift +;иначе вообще выходит +.sh_st_of: + test word ed_flags,ed_shift + jne @f + test word ed_flags,ed_shift_bac + je @f + mov ebp,ed_color + mov ebx,dword ed_shift_pos + call .sh_cl_ ;очистка выделеного фрагмента + and word ed_flags,ed_shift_cl ; очистка от того что убрали выделение + jmp .draw_cursor_text +@@: + and word ed_flags,ed_shift_off +edit_ex +;проверка состояния shift был ли он нажат раньше? +.sh_enable: + test word ed_flags,ed_shift + jne .sh_ext_en ;нарисовать закрашеный прямоугольник + + test word ed_flags,ed_shift_bac + je @f + call .check_offset + + mov ebp,ed_color + mov ebx,dword ed_shift_pos + call .sh_cl_ ;очистка выделеного фрагмента + call .draw_wigwag_cl + and word ed_flags,ed_shift_cl ; 1вар не нужно + ret + +@@: mov ebp,ed_color + call .clear_cursor + call .check_offset + ret +.sh_ext_en: + call .check_offset + test word ed_flags,ed_offset_fl + je @f +;Рисование закрашеных прямоугольников и очистка их + mov eax,dword ed_shift_pos + mov ebx,dword ed_pos + mov ecx,dword ed_shift_pos_old +;проверка и рисование закрашеных областей + cmp eax,ecx + je .1_shem + jb .smaller + cmp ecx,ebx + ja .1_shem + call .draw_wigwag_cl ;clear + jmp .sh_e_end +.smaller: + cmp ecx,ebx + jb .1_shem + call .draw_wigwag_cl ;clear + jmp .sh_e_end +;alike = +.1_shem: call .draw_wigwag +.sh_e_end: and word ed_flags,ed_shift_off + ret +@@: mov ebp,shift_color + mov ebx,dword ed_shift_pos + call .sh_cl_ + jmp .sh_e_end +;функция для обработки shift при нажатии home and end +.sh_home_end: + mov ebp,ed_color + call .clear_cursor + test word ed_flags,ed_shift_bac + je @f + mov ebp,ed_color + mov ebx,dword ed_shift_pos_old + call .sh_cl_ + +@@: test word ed_flags,ed_shift + je .sh_exit_ ;выйти + mov ebp,shift_color + mov ebx,dword ed_shift_pos + call .sh_cl_ + or word ed_flags,ed_shift_bac ;установка флага, выделенной области + jmp .sh_e_end +.sh_exit_: call .check_offset + ret +;функция внесения 0 по адресу ed_size+1 +.enable_null: + pusha + mov eax,ed_size + mov ebx,ed_text + test eax,eax + add eax,ebx + jne @f + inc eax +@@: xor ebx,ebx + mov [eax],bl +edit_ex +;- удаление символа +;Входные данные edx=ed_size;ecx=ed_pos +.del_char: + mov esi,ed_text + test word ed_flags,ed_shift_on + je @f + mov eax,dword ed_shift_pos + mov ebx,esi + cmp eax,ecx + jae .dh_n + + mov ed_pos,eax ;что бы не было убегания курсора + mov ebp,ecx + sub ebp,eax + add ebx,eax ;eax меньше + sub edx,ecx + add esi,ecx + + mov dword ed_shift_pos,ebp + jmp .del_ch_sh + ;если иначе +.dh_n: + mov ebp,eax + sub ebp,ecx + add ebx,ecx + sub edx,eax + add esi,eax + mov dword ed_shift_pos,ebp + jmp .del_ch_sh + +@@: add esi,ecx ;указатель + смещение к реальному буфферу + mov ebx,esi + inc esi + cld + + sub edx,ecx +.del_ch_sh: + + push edi + mov edi,ebx +@@: + lodsb + stosb + dec edx + jns @b + + pop edi + ret +;вычислить закрашиваемую область +;соглашение в ebp - передается ed_size +.clear_bg: + call .get_n ;получить размер в символах ширины компонента + push eax + mov ebx,ed_offset + add eax,ebx ;eax = w_off= ed_offset+width + mov ebx,ebp ;ed_size + + cmp eax,ebx + jb @f + mov eax,ed_pos + sub ebx,eax + mov ecx,ed_offset + sub eax,ecx + jmp .nxt +@@: mov ebx,ed_pos + push ebx + sub eax,ebx + mov ebx,eax ;It is don't optimal + + pop eax ;ed_pos + mov ecx,ed_offset + sub eax,ecx +.nxt: + mov ebp,eax ;проверка на выход закрашиваемой области за пределы длины + add ebp,ebx + pop edx + cmp ebp,edx + je @f + inc ebx + +@@: mov edx,ebx + lea ebx,[eax*2+eax] + shl ebx,1 + add ebx,ed_left + inc ebx + shl ebx,16 + lea ecx,[edx*2+edx] + shl ecx,1 + mov bx,cx + mov edx,ed_color + call .draw_bg_eax + ret +;;;;;;;;;;;;;;;;;;; +;;; Обработка примитивов +;;;;;;;;;;;;;;;;;;;; +;Нарисовать прямоугольник, цвет передается в ebp +;входные параметры: +;eax=dword ed_pos +;ebp=-цвет ed_color or shift_color +.draw_rectangle: + mov ecx,dword ed_offset + sub eax,ecx + lea ebx,[eax*2+eax] + shl ebx,1 + inc ebx + add ebx,ed_left + shl ebx,16 + add ebx,6 + mov edx,ebp + call .draw_bg_eax + ret +;;;;;;;;;;;;;;;;;; +;;Проверка нажат ли shift +;;;;;;;;;;;;;;;;;; +.check_shift: +pusha ;сохраним все регистры + mcall 66,3,1 + test al,0x03 + je @f + or word ed_flags,ed_shift ;установим флаг +@@:edit_ex +} +;макрос клавиш на которые происходит реакция +macro use_key_process backspase,delete,left,right,home,end,insert +{ +if backspase eq +else + cmp ah,8 + jz .backspace +end if +if delete eq +else + cmp ah,0xb6 + jz .delete +end if +if left eq +else + cmp ah,176 + jz .left +end if +if right eq +else + cmp ah,179 + jz .right +end if +if home eq +else + cmp ah,180 + jz .home +end if +if home eq +else + cmp ah,181 + jz .end +end if +if insert eq +else + cmp ah,185 ;insert + jz .insert +end if +} +macro use_key_no_process up,down,esc +{ +if up eq +else + cmp ah,177 + jz .editbox_exit +end if +if down eq +else + cmp ah,178 + jz .editbox_exit +end if +if esc eq +else + cmp ah,27 ;ESC - клавиша )) + jz .editbox_exit +end if +} + +macro use_key_figures_only +{ + test word ed_flags,ed_figure_only ; только цифры ? + jz @f + cmp ah,'0' + jb .editbox_exit + cmp ah,'9' + ja .editbox_exit +@@: +} +macro are_key_shift_press +{ + test word ed_flags,ed_shift_on + je @f + ;Входные данные edx=ed_size;ecx=ed_pos + push eax + mov edx,ed_size + mov ecx, ed_pos + pusha +;;;;;;;;;;;;;;;;;;;;; +;clear input arrea + mov ebp,ed_color + mov ebx,dword ed_shift_pos + call .sh_cl_ + mov ebp,ed_size + call .clear_bg +;;;;;;;;;;;;;;;;;;;;; + popa + call .del_char +;;;; + mov eax,dword ed_shift_pos + mov ebx,ed_size + sub ebx,eax + mov ed_size,ebx + pop eax +@@: +} +macro are_key_cur_end +{ + mov ecx,ed_size + mov edx, ed_max + test word ed_flags,ed_insert + jne @f + cmp ecx,edx + jae .editbox_exit +@@: mov ebx, ed_pos + cmp ebx,edx + jl @f ; если меньше или равно + jmp .editbox_exit + +@@: ; сдвигаем символы после курсора вправо + mov ecx,ed_size + push edi eax + mov ebp,edi + mov esi,ed_text ; Указатель на буфер + ;Будем работать со строкой + add esi,ecx ;add ed_size добавим max size + mov edi,esi + + cmp ecx,ebx ;Если у нас позиция курсора = текущему размеру напечатанных символов т.е. курсор стоит в конце + je .In_k + + test word [ebp+40],ed_insert ;IF insert is enable т.к. edi изменен адресуем через ebp + jne .ins_v +;clear +pusha + mov edi,ebp + mov ebp,ed_size + call .clear_bg +popa + sub ecx,ebx ;Найдем кол-во символов для передвижения. + inc edi ;Сместим наши символы в право + std + inc ecx + @@: + ;-------- + lodsb + stosb + ;-------- + loop @b +.In_k: cld + pop eax + mov al,ah + stosb + pop edi +; вставляем код клавиши туда, где курсор + ; увеличиваем значение размера и позиции + inc dword ed_size + inc dword ed_pos + call .draw_all2 + jmp .shift +} +macro use_work_key +{ +.insert: test word ed_flags,ed_insert ;not word ed_insert + je @f + and word ed_flags,ed_insert_cl + jmp .editbox_exit +@@: + or word ed_flags,ed_insert + jmp .editbox_exit +.ins_v: + dec dword [ebp+42];ed_size ;processing is insert + sub esi,ecx + add esi,ebx + mov edi,esi +;clear +pusha + mov edi,ebp + mov ebp,ed_pos + call .clear_bg +popa + jmp .In_k +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +.delete: + mov edx,ed_size + mov ecx,ed_pos + cmp edx,ecx + jg .bac_del + test word ed_flags,ed_shift_on + jne .del_bac +edit_ex +.bac_del: + call .del_char + jmp .draw_all +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;--- нажата клавиша backspace --- +.backspace: + ; проверяем, курсор у левого края ? + mov ecx,ed_pos + test ecx,ecx + jnz .del_bac + test word ed_flags,ed_shift_on + jne .bac_del + +edit_ex +.del_bac: + mov edx,ed_size + cmp edx,ecx ;if ed_pos=ed_size + je @f + dec ecx + call .del_char +@@: test word ed_flags,ed_shift_on + jne .bac_del + dec dword ed_pos +.draw_all: + push .shift;.draw_cursor_text;eax + + test word ed_flags,ed_shift_on + je @f + mov eax,dword ed_shift_pos + mov ebx,ed_size + sub ebx,eax + mov ed_size,ebx + + mov ebp,ed_color + call .clear_cursor + call .check_offset + call .draw_bg + ret +@@: dec dword ed_size + +.draw_all2: + and word ed_flags,ed_shift_cl + mov ebp,ed_color + call .clear_cursor + call .check_offset + mov ebp,ed_size + call .clear_bg + ret +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;--- нажата клавиша left --- +.left: mov ebx,ed_pos + test ebx,ebx + jz .sh_st_of + or word ed_flags,ed_left_fl + call .sh_first_sh + dec dword ed_pos + call .sh_enable + jmp .draw_cursor_text +;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;--- нажата клавиша right --- +.right: mov ebx,ed_pos + cmp ebx,ed_size + je .sh_st_of + and word ed_flags,ed_right_fl + call .sh_first_sh + inc dword ed_pos + call .sh_enable + jmp .draw_cursor_text +;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +.home: + mov ebx,ed_pos + test ebx,ebx + jz .sh_st_of + call .sh_first_sh + xor eax,eax + mov ed_pos,eax + call .sh_home_end + jmp .draw_cursor_text +;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +.end: + mov ebx,ed_pos + cmp ebx,dword ed_size + je .sh_st_of + call .sh_first_sh + mov eax,ed_size + mov ed_pos,eax + call .sh_home_end + jmp .draw_cursor_text +} + +macro use_mouse_func scr_w +{ +;---------------------------------------------------------- +;--- Обработка .mouse_wigwag +;---------------------------------------------------------- +.mouse_wigwag: + shr eax,16 + or word ed_flags,ed_shift_bac+ed_shift_on+ed_shift +;;;;;;;;;;;;;;;;;; +;;процедура обработки положения выделенного текста, когда происходит выход за пределы editbox +;;;;;;;;;;;;;;;;;; + mov ebx,dword [procinfo+34] + add ebx,ed_left +if scr_w eq +else + add ebx,dword scr_w +end if + cmp eax,ebx + jb .mleft + + add ebx,ed_width + cmp eax,ebx + ja .mright + + sub ebx,ed_width + + xor edx,edx + sub eax,ebx ; вычтим из координат мышки по оси х координаты до editbox по оси х + mov ebx,6 + div ebx +;;;;;;;;;;;;;;;;;; +;;процедура обработки положения выделенного текста, в пределах области editbox +;;;;;;;;;;;;;;;;;; +;Получили координаты в eax мышки, т.е. куда она переместилась +;Рисование закрашеных прямоугольников и очистка их + add eax,ed_offset ;добавим смещение + cmp eax,dword ed_size ;если вышли за пределы, то ничего не делать + ja .mwigvag +.mdraw: + mov dword ed_pos,eax ;сохраним новое значение +;Рисование закрашеных прямоугольников и очистка их + mov ecx,dword ed_shift_pos + mov ebx,dword ed_shift_pos_old + mov dword ed_shift_pos_old,eax ;внесем новое значение старой позиции курсора +;проверка и рисование закрашеных областей + cmp ecx,ebx ;выясняем куда было движение на один шаг назад + je .m1_shem ;движения не было ранее + jb .msmaller ;движение было -> + cmp ebx,eax ;движение было до этого <- и тут мы проверяем сейчас куда движение происходит + ja .m1_shem ;если было движение <- то нужно закрасить область + je .mwigvag ;если изменения не было, то ничего не делать + mov ebp,ed_color ;тут нужно очистить область c ed_pos ed_shift_pos_old +;входные параметры ebp=color ebx=ed_shift_pos + call .sh_cl_ + jmp .mwigvag +.msmaller: + cmp ebx,eax + jb .m1_shem + mov ebp,ed_color +;входные параметры ebp=color ebx=ed_shift_pos + call .sh_cl_ + jmp .mwigvag +;alike = +.m1_shem: + mov ebp,shift_color +;входные параметры ebp=color ebx=ed_shift_pos + mov ebx,ecx + call .sh_cl_ + jmp .mwigvag +.mwigvag: + and word ed_flags,ed_shift_mcl + jmp .draw_cursor_text +; popa +; ret +.mleft: + mov eax,ed_pos + cmp eax,0 + jbe .mwigvag + dec eax + call .check_offset + push eax + mov ebx,ed_shift_pos + mov ebp,shift_color + call .sh_cl_ + pop eax + jmp .mdraw +.mright: + mov eax,ed_pos + mov ebx,ed_size + cmp eax,ebx + jae .mwigvag + inc eax + call .check_offset + mov ebx,ed_shift_pos + mov ebp,shift_color + push eax + call .sh_cl_ + pop eax + jmp .mdraw +} + +macro use_work_mause scr_h,scr_w +;---------------------------------------------------------- +;--- А не удерживаем ли мы клавишу мышки, перемещая курсор, во все разные стороны? +;---------------------------------------------------------- +{ + test word ed_flags,ed_mouse_on + jne .mouse_wigwag +;---------------------------------------------------------- +;--- проверяем, попадает ли курсор в edit box ------------- +;---------------------------------------------------------- + mov ebx,dword [procinfo + 38] + add ebx,ed_top +if scr_h eq +else + add ebx,scr_h +end if + cmp ax,bx + jl ._blur;.mouse_end_no_focus + + add ebx,ed_height + cmp ax,bx + jg ._blur;.mouse_end_no_focus + + shr eax,16 + + mov ebx,dword [procinfo + 34] + add ebx,ed_left +if scr_w eq +else + add ebx,scr_w +end if + cmp ax,bx + jl ._blur;.mouse_end_no_focus + + add ebx,ed_width + cmp ax,bx + jg ._blur;.mouse_end_no_focus +;--- изменяем позицию курсора --- + push eax + mov ebp,ed_color + call .clear_cursor + pop eax +._mvpos: + mov ebx,dword [procinfo+ 34] + xor edx,edx + sub eax,ed_left + sub eax,ebx +if scr_w eq +else + add ebx,scr_w + sub eax,2 +end if + mov ebx,6 + div bx + add eax,ed_offset + cmp eax,ed_size + jna ._mshift + mov eax,ed_size +._mshift: +;;;;;;; +;;Секция обработки shift и выделения по shift +;;;;;;; + test word ed_flags,ed_shift_bac + je @f + mov ebp,dword ed_color + mov ebx,dword ed_shift_pos + push eax + call .sh_cl_ + and word ed_flags,ed_shift_bac_cl + pop eax +@@: + test word ed_flags,ed_mouse_on + jne @f + + mov dword ed_shift_pos,eax + or word ed_flags,ed_mouse_on + mov dword ed_pos,eax + mov dword [mouse_flag],edi ;установим идентификатор + bts word ed_flags,1 ;установка фокуса + jmp .m_sh +@@: + cmp eax,dword ed_shift_pos ;если позиции не изменились + je .editbox_exit + mov ed_pos,eax + mov ebp,dword shift_color + mov ebx,dword ed_shift_pos + call .sh_cl_ + or word ed_flags,ed_mous_adn_b ;установим бит что мы выделили +shift_on + +.m_sh: call .draw_text + call .draw_cursor +;---------------------------------------------------------- +;--- процедура установки фокуса --------------------------- +;---------------------------------------------------------- + jmp .drc +._blur: + test word ed_flags,ed_always_focus + jne .editbox_exit + btr word ed_flags,1 ; если не в фокусе, выходим + jnc .editbox_exit + + mov ebp,ed_color + call .clear_cursor +.drc: call .draw_border + jmp .editbox_exit +} + + +; Макрос выхода +macro edit_ex +{ +popa +ret +} +macro debug +{ + ;----------- отладка + pushad +; mov dword [ed_buffer.2],0 +; mov eax,edi + mov eax,dword [ed_buffer.2] + mov edi,ed_buffer.3 + call .str + ;рисование фона + mov eax,13 + mov ebx,178*65536+70 + mov ecx,28*65536+10 + xor edx,edx + int 0x40 + ;вывод значения на экран + mov eax,4 + mov ebx,180*65536+30 + mov ecx,0x10DDBBCC + mov edx,ed_buffer.3 + mov esi,8 + int 0x40 + popad + ;----------- отладка +} +macro debug_func +{ +.str: + mov ecx,0x0a ;задается система счисления изменяются регистры ebx,eax,ecx,edx входные параметры eax - число + ;преревод числа в ASCII строку взодные данные ecx=система счисленя edi адрес куда записывать, будем строку, причем конец переменной + cmp eax,ecx ;сравнить если в eax меньше чем в ecx то перейти на @@-1 т.е. на pop eax + jb @f + xor edx,edx ;очистить edx + div ecx ;разделить - остаток в edx + push edx ;положить в стек + ;dec edi ;смещение необходимое для записи с конца строки + call .str;перейти на саму себя т.е. вызвать саму себя и так до того момента пока в eax не станет меньше чем в ecx + pop eax + @@: ;cmp al,10 ;проверить не меньше ли значение в al чем 10 (для системы счисленя 10 данная команда - лишная)) + ;sbb al,$69 ;- честно данная инструкция меня заставляет задуматься т.е. я не знаю как это работает + ;das ;после данной команды как бы происходит уменьшение al на 66h (в книге написано другое) + or al,0x30 ;данная команда короче чем две выше + stosb ;записать элемент из регистра al в ячеку памяти es:edi + + ret ;вернуться чень интересный ход т.к. пока в стеке храниться кол-во вызовов то столько раз мы и будем вызываться +} + +;;;;;;;;;;;;;;; +;For LibGui +;;;;;;;;;;;;;;; +macro srt_ed_libgui +{ +ed_width equ [EditBox.ed_width] ;ширина компонента +ed_left equ [EditBox.ed_left] ;положение по оси х +ed_top equ [EditBox.ed_top] ;положение по оси у +ed_color equ [EditBox.ed_color] ;цвет фона компонента +shift_color equ [EditBox.shift_color] ;=0x6a9480 +ed_focus_border_color equ [EditBox.ed_focus_border_color] ;цвет рамки компонента +ed_blur_border_color equ [EditBox.ed_blur_border_color] ;цвет не активного компонента +ed_text_color equ [EditBox.ed_text_color] ;цвет текста +ed_max equ [EditBox.ed_max] ;кол-во символов которые можно максимально ввести +ed_text equ [EditBox.ed_text] ;указатель на буфер +ed_flags equ [EditBox.ed_flags] ;флаги +ed_size equ [EditBox.ed_size] ;кол-во символов +ed_pos equ [EditBox.ed_poz] ;позиция курсора +ed_offset equ [EditBox.ed_offset] ;смещение +cl_curs_x equ [EditBox.cl_curs_x] ;предыдущее координата курсора по х +cl_curs_y equ [EditBox.cl_curs_y] ;предыдущее координата курсора по у +ed_shift_pos equ [EditBox.ed_shift_pos] ;положение курсора +ed_shift_pos_old equ [EditBox.ed_shift_pos_old] ;старое положение курсора +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Bit mask from editbox +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +ed_figure_only= 1000000000000000b ;одни символы +ed_always_focus= 100000000000000b +ed_focus= 10b ;фокус приложения +ed_shift_on= 1000b ;если не установлен -значит впервые нажат shift,если был установлен, значит мы уже что - то делали удерживая shift +ed_shift_on_off=1111111111110111b +ed_shift= 100b ;включается при нажатии на shift т.е. если нажимаю +ed_shift_off= 1111111111111011b +ed_shift_bac= 10000b ;бит для очистки выделеного shift т.е. при установке говорит что есть выделение +ed_shift_bac_cl=1111111111101111b ;очистка при удалении выделения +ed_shift_cl= 1111111111100011b +ed_shift_mcl= 1111111111111011b +ed_left_fl= 100000b +ed_right_fl= 1111111111011111b +ed_offset_fl= 1000000b +ed_offset_cl= 1111111110111111b +ed_insert= 10000000b +ed_insert_cl= 1111111101111111b +ed_mouse_on = 100000000b +ed_mous_adn_b= 100011000b +ed_mouse_on_off=1111111011111111b +ed_height=14 ; высота +} \ No newline at end of file diff --git a/programs/fs/kfm/trunk/err_wind.inc b/programs/fs/kfm/trunk/err_wind.inc new file mode 100644 index 0000000000..e6795898be --- /dev/null +++ b/programs/fs/kfm/trunk/err_wind.inc @@ -0,0 +1,58 @@ +read_folder_error: + mov [error_pointer],read_folder_name ;read_folder.name + jmp error_window +read_folder_1_error: + mov [error_pointer],read_folder_1_name ;read_folder_1.name + jmp error_window +initiation_error: + mov [error_pointer],ini_file_name + jmp error_window +buttons_error: + mov [error_pointer],buttons_file_name + jmp error_window +icon_error: + mov [error_pointer],icons_file_name +error_window: + mov [file_system_error],eax +.red: + call draw_error_window +.still: + mcall 10 + cmp eax,1 + je .red + cmp eax,3 + je .button + jmp .still +.button: + mcall -1 + jmp .still +;--------------------------------------------------------------------- +draw_error_window: + mcall 12, 1 + mcall 0,[error_window_x] ,[error_window_y], 0x03ff0000 + mcall 4,<10,30>,0x90ffffff,[error_pointer] + mcall 4,<10,50>, ,error_type + mcall 47,0xa0000,[file_system_error],<140,50>,0x10ffffff + mcall 12, 2 + ret +;--------------------------------------------------------------------- +start_error_window_thread: + mov [file_system_error],eax + mcall 9, procinfo, -1 + mov eax,[ebx+46] + shr eax,1 + add eax,[ebx+38] + sub eax,40 + mov [error_window_y+2],ax + mov eax,[ebx+42] + shr eax,1 + add eax,[ebx+34] + sub eax,125 + mov [error_window_x+2],ax + mcall 51,1,thread_start,thread_stack + ret +;--------------------------------------------------------------------- +thread_start: +; mov [error_pointer],start_file_data.name + jmp error_window.red +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/exit.inc b/programs/fs/kfm/trunk/exit.inc new file mode 100644 index 0000000000..c890ed9519 --- /dev/null +++ b/programs/fs/kfm/trunk/exit.inc @@ -0,0 +1,6 @@ +exit_apl: + mov [confirmation_type],exit_type + call confirmation_action + cmp [work_confirmation_yes],1 + jne red + mcall -1 \ No newline at end of file diff --git a/programs/fs/kfm/trunk/file_inf.inc b/programs/fs/kfm/trunk/file_inf.inc new file mode 100644 index 0000000000..901deec311 --- /dev/null +++ b/programs/fs/kfm/trunk/file_inf.inc @@ -0,0 +1,481 @@ +files_information: + xor eax,eax + mov [alt_flag],al + mov [files_counter],eax + mov [directories_counter],eax + mov [files_size.low],eax + mov [files_size.high],eax + call get_files_information + mov eax,files_size + mov ebx,type_size_string + call decimal_string_20 + call start_files_information_thread + jmp still +;--------------------------------------------------------------------- +start_files_information_thread: + mcall 9, procinfo, -1 + mov eax,[ebx+46] + shr eax,1 + add eax,[ebx+38] + sub eax,150 + mov [files_information_window_y+2],ax + mov eax,[ebx+42] + shr eax,1 + add eax,[ebx+34] + sub eax,125 + mov [files_information_window_x+2],ax + mcall 51,1,thread_files_information_start,thread_stack + ret +;--------------------------------------------------------------------- +draw_files_information_window: + mcall 12, 1 + mcall 0,[files_information_window_x] ,[files_information_window_y], 0x03ffffcc + mov edx,90 shl 16+50 + mov ebx,0xa0000 + mov esi,0x10000000 + cmp [inf_marked_yes],1 + je .continue_4 + cmp [nesting_direction],1 + je @f + add edx,15 +.continue_4: + mcall 47, ,[files_counter] +@@: + cmp [inf_marked_yes],1 + je .continue_2 + cmp [nesting_direction],0 + je .continue_2 + cmp [directories_counter],0 + je @f +.continue_2: + add edx,15 + mcall 47, ,[directories_counter] +@@: + add edx,15 + mov ebx,edx + mcall 4, ,0x90000000,type_size_string + cmp [select_panel_counter],0 + jne .right_1 + mov edx,read_folder_name + jmp @f +.right_1: + mov edx,read_folder_1_name +@@: + mcall 4,<75,35>,0x80000000, ;file_name + mcall 4,<10,35>,0x90000000,type_location + cmp [inf_marked_yes],1 + je .continue + mcall 4,<90,50>,0x80000000,type_name + mov ecx,0x90000000 + cmp [nesting_direction],1 + je @f + mcall 4,<10,50>, ,type_dir_name + jmp .continue +@@: + mcall 4,<10,50>, ,type_file_name +.continue: + cmp [inf_marked_yes],1 + je .continue_3 + cmp [nesting_direction],1 + je @f +.continue_3: + add ebx,15 + mcall 4, , ,type_files +@@: + cmp [inf_marked_yes],1 + je .continue_1 + cmp [nesting_direction],0 + je .continue_1 + cmp [directories_counter],0 + je @f +.continue_1: + add ebx,15 + mcall 4, , ,type_dir +@@: + add ebx,15 + mcall 4, , ,type_size + mcall 12, 2 + ret +;--------------------------------------------------------------------- +thread_files_information_start: +.red: + call draw_files_information_window +.still: + mcall 10 + cmp eax,1 + je .red + cmp eax,2 + je .key + cmp eax,3 + je .button + jmp .still +.key: +.button: + mcall -1 + jmp .still +;--------------------------------------------------------------------- +; ╧┼╨┼┬╬─ 10-═█╒ ╫╚╤┼╦ ╤╬ ╟═└╩╬╠ ┬ ╤╥╨╬╩╬┬█╔ ┬╚─ +; ┬їюф: +; EAX - єърчрЄхы№ эр ўшёыю +; EBX - рфЁхё ёЄЁюъш +;--------------------------------------------------------------------- +decimal_string_20: + push eax ebx ecx edx + mov [divisor],word 10 + mov ebp,eax + xor ecx,ecx +; mov [ebx],byte '0' +; inc ebx +.p3: + xor edx,edx + push ebx + call Division_64bit + mov eax,[quotent] + mov [ebp],eax + mov eax,[quotent+4] + mov [ebp+4],eax + pop ebx + add edx,48 + push edx + inc ecx + cmp [ebp],dword 0 + jne .p3 + cmp [ebp+4],dword 0 + jne .p3 + cmp ecx,19 + jbe .p4 + mov ecx,20 + dec ebx +.p4: + pop edx + mov [ebx],dl + inc ebx + loop .p4 + mov [ebx], byte 0 + pop edx ecx ebx eax + ret +;---------------------------------------------------------- +; фхыхэшх 64-сшЄэюую ўшёыр divident эр 16-сшЄэюх ўшёыю divisor. +; ╫рёЄэюх яюьх∙рхЄё  т 64-сшЄэє■ яхЁхьхээє■ quotent, +; р юёЄрЄюъ - т 16-сшЄэє■ яхЁхьхээє■ modulo +Division_64bit: + mov ax,[ebp+6] + xor dx,dx + mov bx,[divisor] + div bx + mov [quotent+6],ax + mov ax,[ebp+4] + div bx + mov [quotent+4],ax + mov ax,[ebp+2] + div bx + mov [quotent+2],ax + mov ax,[ebp] + div bx + mov [quotent],ax +; mov [modulo],dx + ret + +;divident: +; rb 8 +divisor: + rb 2 +quotent: + rb 8 +;modulo: +; rb 2 +;--------------------------------------------------------------------- +copy_type_name: + push esi + mov esi,ebx + mov edi,type_name +@@: + cld + lodsb + stosb + test al,al + jnz @b + pop esi + ret +;--------------------------------------------------------------------- +get_files_information: + call get_information_marked_files + cmp [inf_marked_yes],1 + je .end_2 + xor eax,eax + xor edx,edx + cmp [select_panel_counter],0 + jne .right_1 + mov ax,[left_start_draw_cursor_line] + mov ebx,10 + div ebx + mov ebx,[left_start_draw_line] + add ebx,eax + imul ebx,304 + add ebx,[left_folder_data] + call prepare_data_8 + mov esi,read_folder_name + jmp .end +.right_1: + mov ax,[right_start_draw_cursor_line] + mov ebx,10 + div ebx + mov ebx,[right_start_draw_line] + add ebx,eax + imul ebx,304 + add ebx,[right_folder_data] + call prepare_data_8 + mov esi,read_folder_1_name +.end: + mov [error_pointer],ebx + call copy_type_name + mov edi,file_name + call copy_path_1 + test [ebx-40],byte 0x10 + jz @f + push eax ebx + call get_inf_dir + mov [nesting_direction],0 + pop ebx eax + dec [directories_counter] + jmp .end_2 +@@: + mov [nesting_direction],1 + call get_file_size + test eax,eax + jz .end_1 + call start_error_window_thread + add esp,4 + jmp reload_dir_all +.end_1: +; inc [files_counter] + mov eax,[file_features_temp_area+32] + add [files_size.low],eax + mov eax,[file_features_temp_area+32+4] + adc [files_size.high],eax +.end_2: + ret +;--------------------------------------------------------------------- +get_information_marked_files: + xor eax,eax + mov [inf_marked_yes],al + cmp [select_panel_counter],al + jne .right_1 + mov ebp,[left_folder_block] +.start: + mov ebx,ebp + dec ebx + imul ebx,304 + add ebx,[left_folder_data] + add ebx,32+40 + cmp [ebx+299-40],byte 0 + je @f + cmp [ebx],word '..' + jne .continue + cmp [ebx+2],byte 0 + je .continue_1 +.continue: + mov esi,read_folder_name + call prepare_data_9 +.continue_1: + mov [inf_marked_yes],1 +@@: + dec ebp + jnz .start + ret +.right_1: + mov ebp,[right_folder_block] +.start_1: + mov ebx,ebp + dec ebx + imul ebx,304 + add ebx,[right_folder_data] + add ebx,32+40 + cmp [ebx+299-40],byte 0 + je @f + cmp [ebx],word '..' + jne .continue_2 + cmp [ebx+2],byte 0 + je .continue_3 +.continue_2: + mov esi,read_folder_1_name + call prepare_data_9 +.continue_3: + mov [inf_marked_yes],1 +@@: + dec ebp + jnz .start_1 + ret +;--------------------------------------------------------------------- +prepare_data_9: + mov [error_pointer],ebx + mov edi,file_name + call copy_path_1 + test [ebx-40],byte 0x10 + jz @f + call get_inf_dir + ret +@@: + inc [files_counter] + call get_file_size + test eax,eax + jz .continue + call start_error_window_thread + add esp,8+4 + ret +.continue: + mov eax,[file_features_temp_area+32] + add [files_size.low],eax + mov eax,[file_features_temp_area+32+4] + adc [files_size.high],eax +.continue_1: + ret +;--------------------------------------------------------------------- +prepare_data_8: + add ebx,32+40 + cmp [ebx],word '..' + jne .continue + cmp [ebx+2],byte 0 + jne .continue + add esp,4+4 + jmp reload_dir +.continue: + ret +;--------------------------------------------------------------------- +get_inf_dir: + mov [nesting_direction],0 + pusha + mov [recursive_pointer],0 + mov eax,[appl_memory] + mov [appl_memory_old],eax +.1: + mov [read_delete_dir_data.size],0 + mov [read_delete_dir_data.return],delete_dir_data + call read_delete_dir + test eax,eax + jz @f + mov [error_pointer],file_name + call start_error_window_thread + popa + add esp,8+8 + ret +@@: + mov eax,[delete_dir_data+8] + imul eax,304 + add eax,32 + mov ebx,eax + add ebx,[appl_memory_old] + cmp ebx,[appl_memory] + jbe @f + mov ecx,[appl_memory] + mov ecx,ebx + mov [appl_memory],ecx + mcall 64,1 +@@: + mov eax,[delete_dir_data+8] + mov [read_delete_dir_data.size],eax + mov eax,[appl_memory_old] + mov [read_delete_dir_data.return],eax + call read_delete_dir + test eax,eax + jz @f + mov [error_pointer],file_name + call start_error_window_thread + popa + add esp,8+8 + ret +@@: + cmp [nesting_direction],0 + je @f + call get_inf_dir_2 + jnc .end + dec ebp + push ebp + jmp .1 +@@: + call get_inf_dir_1 + jnc .end + dec ebp + push ebp + jmp .1 +.end: + call return_delete_path + dec [recursive_pointer] + cmp [recursive_pointer],0 + jge .1 + mov ecx,[appl_memory_old] + cmp [appl_memory],ecx + je @f + mov [appl_memory],ecx + mcall 64,1 +@@: + popa + ret +;--------------------------------------------------------------------- +get_inf_dir_2: + pop eax + pop ebp + push eax + jmp get_inf_dir_1.start +get_inf_dir_1: + inc [directories_counter] + mov ebp,[appl_memory_old] + mov ebp,[ebp+8] +.start: + mov ebx,ebp + dec ebx + imul ebx,304 + add ebx,[appl_memory_old] + add ebx,32+40 + cmp [ebx],byte '.' + jne @f + cmp [ebx+1],byte 0 + je .continue_4 +@@: + cmp [ebx],word '..' + jne .continue + cmp [ebx+2],byte 0 + je .continue_4 +.continue: + mov esi,file_name + inc [recursive_pointer] + call copy_path_2 + test [ebx-40],byte 0x10 + jnz .continue_3 +@@: + inc [files_counter] +.continue_1: + mov eax,[ebx+32-40] + add [files_size.low],eax + mov eax,[ebx+32+4-40] + adc [files_size.high],eax + dec [recursive_pointer] + call return_delete_path + dec ebp + jnz .start + +.continue_4: + clc + mov [nesting_direction],1 + ret +.continue_3: + stc + mov [nesting_direction],0 + ret +;--------------------------------------------------------------------- +;type_patch_test: +; pusha +; mcall 5,200 +; mcall 13,<290,300>,<3,13>,0x0 +; mcall 4,<300, 5>,0x80FFFFFF,file_name ;[error_pointer] +; mcall 47,0x160100,[recursive_pointer],<300, 5>,0xffffff +; mcall 47,0x160100,ebp,<300, 5>,0xffffff +; mcall 5,1 +; popa +; ret +;temp_value_1 db '1',0 +;temp_value_2 db '2',0 +;temp_value_3 db '3',0 +;temp_value_4 db '4',0 +;temp_value_5 db '5',0 +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/files.inc b/programs/fs/kfm/trunk/files.inc new file mode 100644 index 0000000000..ba69349982 --- /dev/null +++ b/programs/fs/kfm/trunk/files.inc @@ -0,0 +1,476 @@ +read_delete_dir: + mcall 70, read_delete_dir_data + ret +;--------------------------------------------------------------------- +create_directory_f70: + mcall 70, create_dir_file_data + ret +;--------------------------------------------------------------------- +del_file: + mcall 70, delete_file_data + ret +;--------------------------------------------------------------------- +start_appl: + mcall 70, start_file_data + ret +;--------------------------------------------------------------------- +get_file_size: + mcall 70, read_file_features + ret +;--------------------------------------------------------------------- +load_file: + mcall 70, read_file + ret +;--------------------------------------------------------------------- +write_file: + mcall 70, save_file + ret +;--------------------------------------------------------------------- +add_write_file: + mcall 70, add_save_file + ret +;--------------------------------------------------------------------- +proc_read_left_folder: + xor eax,eax + mov [left_marked_counter],eax + mov [read_folder.start],eax ;dword 0 + inc eax + mov [read_folder.size],eax ;dword 1 + mov eax,[left_folder_data] + push eax + mov [read_folder.return],eax + mcall 70, read_folder + test eax,eax + jz @f + cmp eax,6 + jne .error_1 +@@: + mov eax,[esp] + cmp [eax+32+40],word 2Eh + jne @f + mov [read_folder.start],dword 1 +@@: + mov ebx,[eax+8] + mov [read_folder.size],ebx ;dword 10 ;5000 + imul ebx,304 + add ebx,32 + mov ecx,[right_folder_data] + sub ecx,[left_folder_data] + push ebx ecx + cmp ebx,ecx + je .continue + sub ebx,ecx + js .sub_mem +.add_mem: + mov ecx,[appl_memory] + add ecx,ebx + mov [esp],ebx + mov ebx,[appl_memory] + mov [esp+4],ebx + mov [appl_memory],ecx + mcall 64,1 + call move_up_right_table +; mov [temp_znak],1 + jmp .continue +.sub_mem: + mov ebx,[esp] + mov ecx,[esp+4] + sub ebx,ecx + mov ecx,[appl_memory] + sub ecx,ebx + mov [esp],ebx + mov ebx,[appl_memory] + mov [esp+4],ebx + mov [appl_memory],ecx + call move_down_right_table + mcall 64,1 +; mov [temp_znak],2 +.continue: +; mov edi,eax ;folder_data +; call clear_folder_data_area + mcall 70, read_folder + mov [left_folder_block],ebx + add esp,4*3 + test eax,eax + jz @f + cmp eax,6 + jne .error +@@: + push eax + call left_files_name_normalize + call left_prepare_extension_start + call left_sort_files + pop eax +; pusha +; call draw_window +; popa + ret +.error_1: + add esp,4 +.error: + mov [left_folder_block],dword 2 + mov edi,[left_folder_data] + call error_handler + ret +;--------------------------------------------------------------------- +error_handler: + push eax + xor eax,eax + add edi,32+40 + push edi + sub edi,40 + mov ecx,304/4 + cld + rep stosd + pop edi + mov [edi-40],byte 0x10 + mov [edi],word '..' + mov [edi+2],al + add edi,304 + push edi + sub edi,40 + mov ecx,304/4 + cld + rep stosd + pop edi + mov eax,[esp] + mov [edi+32-40],eax + mov esi,error_type + mov ecx,19 + cld + rep movsb + pop eax + ret +;--------------------------------------------------------------------- +proc_read_right_folder: + xor eax,eax + mov [right_marked_counter],eax + mov [read_folder_1.start],eax ;dword 0 + inc eax + mov [read_folder_1.size],eax ;dword 1 + mov eax,[right_folder_data] + push eax + mov [read_folder_1.return],eax + mcall 70, read_folder_1 + test eax,eax + jz @f + cmp eax,6 + jne .error_1 +@@: + mov eax,[esp] + cmp [eax+32+40],word 2Eh + jne @f + mov [read_folder_1.start],dword 1 +@@: + mov ebx,[eax+8] + mov [read_folder_1.size],ebx ;dword 10 ;5000 + imul ebx,304 + add ebx,32 + mov ecx,[appl_memory] + sub ecx,[right_folder_data] + push ebx ecx + cmp ebx,ecx + je .continue + sub ebx,ecx + js .sub_mem +.add_mem: + mov ecx,[appl_memory] + add ecx,ebx + mov [appl_memory],ecx + mcall 64,1 +; mov [temp_znak],1 + jmp .continue +.sub_mem: + mov ebx,[esp] + mov ecx,[esp+4] + sub ebx,ecx + mov ecx,[appl_memory] + sub ecx,ebx + mov [appl_memory],ecx + mcall 64,1 +; mov [temp_znak],2 +.continue: +; mov edi,eax ;folder_data_1 +; call clear_folder_data_area + mcall 70, read_folder_1 + mov [right_folder_block],ebx + add esp,4*3 + test eax,eax + jz @f + cmp eax,6 + jne .error +@@: + push eax + call right_files_name_normalize + call right_prepare_extension_start + call right_sort_files + pop eax +; pusha +; call draw_window +; popa + ret +.error_1: + add esp,4 +.error: + mov [right_folder_block],dword 2 + mov edi,[right_folder_data] + call error_handler + ret +;--------------------------------------------------------------------- +move_up_right_table: + mov esi,[esp+8] + mov ecx,esi + sub ecx,[right_folder_data] + mov edi,esi + add edi,[esp+4] + shr ecx,2 + std +; rep movsb + rep movsd + mov eax,[esp+4] + add [right_folder_data],eax + ret +;--------------------------------------------------------------------- +move_down_right_table: + mov esi,[right_folder_data] + mov edi,esi + sub edi,[esp+4] + push ecx + mov ecx,[esp+12] + sub ecx,[right_folder_data] + shr ecx,2 + cld +; rep movsb + rep movsd + pop ecx + mov eax,[esp+4] + sub [right_folder_data],eax + ret +;--------------------------------------------------------------------- +;clear_folder_data_area: +; mov ecx,4096*10/4 +; xor eax,eax +; cld +; rep stosd +; ret +;--------------------------------------------------------------------- +proc_read_folder: + call proc_read_left_folder +; mov [left_panel_clear_all],1 + cmp [search_pre_folder],0 + jne @f + mov [left_start_draw_cursor_line],0 + mov [left_start_draw_line],0 + jmp .continue +@@: + mov edi,[left_folder_data] + add edi,32+40 + sub edi,304 + xor ebp,ebp +.search_file: + cmp [left_folder_block],ebp + jbe .end_folder + mov esi,[temp_counter_dword] + mov ecx,[extension_size] + add edi,304 + inc ebp + cld +; mov [temp_counter_dword_1],edi + push edi + rep cmpsb + pop edi + jne .search_file + dec ebp + mov eax,[left_folder_block] + cmp [max_panel_line],eax + js @f + mov eax,ebp + imul eax,10 + mov [left_start_draw_cursor_line],ax + mov [left_start_draw_line],0 + jmp .end_folder +@@: +; sub eax,ebp +; push eax +; sub eax,[max_panel_line] +; jns @f +; mov eax,[max_panel_line] +; sub eax,[esp] +; imul eax,10 +; mov [left_start_draw_cursor_line],ax +;@@: + mov [left_start_draw_cursor_line],0 + mov [left_start_draw_line],ebp +.end_folder: + mov [search_pre_folder],0 +.continue: + call draw_left_panel + call draw_left_select_disk_button +; call draw_window +; pop eax + jmp still +;--------------------------------------------------------------------- +proc_read_folder_1: + call proc_read_right_folder +; mov [right_panel_clear_all],1 + cmp [search_pre_folder],0 + jne @f + mov [right_start_draw_cursor_line],0 + mov [right_start_draw_line],0 + jmp .continue +@@: + mov edi,[right_folder_data] + add edi,32+40 + sub edi,304 + xor ebp,ebp +.search_file: + cmp [right_folder_block],ebp + jbe .end_folder + mov esi,[temp_counter_dword] + mov ecx,[extension_size] + add edi,304 + inc ebp + cld +; mov [temp_counter_dword_1],edi + push edi + rep cmpsb + pop edi + jne .search_file + dec ebp + mov eax,[right_folder_block] + cmp [max_panel_line],eax + js @f + mov eax,ebp + imul eax,10 + mov [right_start_draw_cursor_line],ax + mov [right_start_draw_line],0 + jmp .end_folder +@@: +; sub eax,ebp +; push eax +; sub eax,[max_panel_line] +; jns @f +; mov eax,[max_panel_line] +; sub eax,[esp] +; imul eax,10 +; mov [right_start_draw_cursor_line],ax +;@@: + mov [right_start_draw_cursor_line],0 + mov [right_start_draw_line],ebp +.end_folder: + mov [search_pre_folder],0 +.continue: + call draw_right_panel + call draw_right_select_disk_button + jmp still +;--------------------------------------------------------------------- +copy_folder_name: + mov edi,read_folder_name+1 ;read_folder.name+1 +@@: + cld + lodsb + stosb + cmp al,0 + jne @r + ret +;--------------------------------------------------------------------- +copy_folder_name_1: + mov edi,read_folder_1_name+1 ;read_folder_1.name+1 +@@: + cld + lodsb + stosb + cmp al,0 + jne @r + ret +;--------------------------------------------------------------------- +read_folder: + .subfunction dd 1 + .start dd 0 + .flags dd 0 + .size dd 5000 + .return dd 0 ;folder_data + db 0 + .name: dd read_folder_name +;--------------------------------------------------------------------- +read_folder_1: + .subfunction dd 1 + .start dd 0 + .flags dd 0 + .size dd 5000 + .return dd 0 ;folder_data_1 + db 0 + .name: dd read_folder_1_name +;--------------------------------------------------------------------- +read_file_features: + .subfunction dd 5 + .Offset dd 0 + .Offset_1 dd 0 + .size dd 0 + .return dd file_features_temp_area + db 0 + .name: dd file_name +;--------------------------------------------------------------------- +read_file: + .subfunction dd 0 + .Offset dd 0 + .Offset_1 dd 0 + .size dd 0 + .return dd mem + db 0 + .name: dd file_name +;--------------------------------------------------------------------- +save_file: + .subfunction dd 2 + .Offset dd 0 + .Offset_1 dd 0 + .size dd 0 + .pointer dd mem + db 0 + .name: dd start_parameter +;--------------------------------------------------------------------- +add_save_file: + .subfunction dd 3 + .Offset dd 0 + .Offset_1 dd 0 + .size dd 0 + .pointer dd mem + db 0 + .name: dd start_parameter +;--------------------------------------------------------------------- +create_dir_file_data: + .subfunction dd 9 + .flags dd 0 + .param dd 0 + .rezerv dd 0 + .rezerv1 dd 0 + db 0 + .name: dd file_name +;--------------------------------------------------------------------- +start_file_data: + .subfunction dd 7 + .flags dd 0 + .param dd 0 + .rezerv dd 0 + .rezerv1 dd 0 + db 0 + .name: dd file_name +;--------------------------------------------------------------------- +delete_file_data: + .subfunction dd 8 + .flags dd 0 + .param dd 0 + .rezerv dd 0 + .rezerv1 dd 0 + db 0 + .name: dd file_name +;--------------------------------------------------------------------- +read_delete_dir_data: + .subfunction dd 1 + .start dd 0 + .flags dd 0 + .size dd 0 + .return dd delete_dir_data + db 0 + .name: dd file_name +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/help.inc b/programs/fs/kfm/trunk/help.inc new file mode 100644 index 0000000000..39c978bfa7 --- /dev/null +++ b/programs/fs/kfm/trunk/help.inc @@ -0,0 +1,9 @@ +help_start: + mov ebx,help_file_name + mov esi,path + mov edi,start_parameter ;file_name + call copy_path + call draw_window + mov [use_patch],1 + mov esi,help_file_name-40 + jmp file_no_folder \ No newline at end of file diff --git a/programs/fs/kfm/trunk/icons.bmp b/programs/fs/kfm/trunk/icons.bmp new file mode 100644 index 0000000000000000000000000000000000000000..8f6c0f1c50ab8c8925ea899b8a1d74fd7627b319 GIT binary patch literal 5238 zcmdT|JB}4G5cEn!kRbv@L`X_PMDRq;4G8xP#B&Ka0Jk6_C*VX#L%GY{Q*PU{yH6l3 zmdDesPj}Dnt+XFLetuDGyus_Y>AE&W9ld z)UMYx!^d38w(l{4A=b6$Nzy5P6aj-(8N>#r4w9sa8k)#!{OkhGMSZpdp401Fsdg1X z8hHA0H8S-bTk!^_!Hg$H)tVPZ4X`anl%4TG4rOQR9>blkBR^)M6&^`yO`*1Ckz8FE zv>$h%t2j5A*@Tg zYUAK(_BHVo%Zhj5g3rYBTOc$FMrRT9eCyT=rY-z6`+6PzT=j{}i4>6~$2D`tykf=g zJs{HlewD8&;3iRb#I7(5*}IsC7kk+lL7M!2>;0pQ*KL$d0F;lvS={^ zz``?E01+6@x2cBX-RtlAoUcYco>>MfLCMnI{4;xPz=oArWnlgC>3g2;#(73IpQt1R zdCCt`8gzAuVj4dRetJ^_Ts)L3c|PedBar+cmG`$I)Z|0bwn)%^f9Ao#r$pS=2D-8h z#$&S9xcDwoL|}aE#=sx(`B{7t9v%TDyn?rHJW@mgBJu;!02g2@B;$(3pnhCKuntC( zBCXbbJB<1v)vQ&$8V5hvZy(}kmDw7Yx4=S79{ov+D?SqS!TP=lsZuYlYRe@rnf*pNOg1jANjTUh^7C)G!PzP z8V~~U_au?V{1g7J{=BXB(GUI6AMHAy()N7aK{%V{|EqkIwqVRZ@Uyl;M1PV5+kf{| x35k$?Vj8;&|2up2`eYja)Gy!UcZvY{{i&e9LN9w literal 0 HcmV?d00001 diff --git a/programs/fs/kfm/trunk/key.inc b/programs/fs/kfm/trunk/key.inc new file mode 100644 index 0000000000..9cca4cfd12 --- /dev/null +++ b/programs/fs/kfm/trunk/key.inc @@ -0,0 +1,719 @@ +key: + mcall 2 + cmp [extended_key],1 + je .extended_key + test al, al + jnz still + cmp ah, 0xE0 + jne @f + mov [extended_key],1 + jmp still +@@: + cmp ah,15 + jne .no_tab + inc [select_panel_counter] + and [select_panel_counter],1b + call draw_left_panel + call draw_right_panel + jmp still +.no_tab: + cmp ah,72 ; arrow up + je key_72.1 + cmp ah,80 ; arrow down + je key_80.1 + cmp ah,28 ; Enter + je key_28.1 + cmp ah,17 ; W + je set_background + cmp ah,19 ; R + je reload_dir_1 + cmp ah,42 + je key_shift_up + cmp ah,54 + je key_shift_up + cmp ah,170 + je key_shift_down + cmp ah,182 + je key_shift_down + cmp ah,29 + je key_ctrl_up.1 + cmp ah,157 + je key_ctrl_down.1 + cmp ah,56 + je key_alt_up.1 + cmp ah,184 + je key_alt_down.1 + cmp ah,206 ; NumPad+ Up + je NumPad_plus_Up + cmp ah,202 ; NumPad- Up + je NumPad_minus_Up + cmp ah,183 ; NumPad* Up + je NumPad_sneg_Up + cmp ah,158 + je symbol_a_up + cmp ah,59 ; down F1 + je f_key_f1 + cmp ah,60 ; down F2 + je f_key_f2 + cmp ah,61 ; down F3 + je f_key_f3 ;sort_name + cmp ah,62 ; down F4 + je f_key_f4 ;sort_type + cmp ah,63 ; down F5 + je f_key_f5 ;sort_size + cmp ah,64 ; down F6 + je f_key_f6 ; sort_date + cmp ah,65 ; down F7 + je f_key_f7 ; + cmp ah,66 ; down F8 + je f_key_f8 ; delete_file + cmp ah,88 ; down F12 + je f_key_f12 + jmp still +;------------------------------------------------------------- +.extended_key: + mov [extended_key],0 +key_80: + cmp ah,80 ; arrow down + jne key_72 +.1: + cmp [select_panel_counter],0 + jne .right_1 + mov eax,[left_folder_block] + dec eax + imul eax,10 + cmp ax,[left_start_draw_cursor_line] + jbe .marked_action ;still + mov ax,[left_start_draw_cursor_line] + add ax,10 + cmp ax,[left_panel_y.size_y] + jae @f +.add_1: + add [left_start_draw_cursor_line],10 + call draw_left_panel_selection + mov [drawing_panel_folder],1 +.all: + sub ecx,10 shl 16 + mov edx,0xffffff + int 0x40 + mov [not_clear_lines],1 + call draw_folder_data + mov [not_clear_lines],0 + jmp still +.marked_action: + cmp [marked_action],0 + je still + mov [marked_action],0 + call draw_left_panel + jmp still +.marked_action_1: + cmp [marked_action],0 + je still + mov [marked_action],0 + call draw_right_panel + jmp still +@@: + mov eax,[left_folder_block] + sub eax,[max_panel_line] + test eax,0x80000000 + jz @f + xor eax,eax +@@: + cmp [marked_action],0 + jne @f + cmp [left_start_draw_line],eax + je still +@@: + mov [marked_action],0 + inc [left_start_draw_line] + call draw_left_panel + jmp still +.right_1: + mov eax,[right_folder_block] + dec eax + imul eax,10 + cmp ax,[right_start_draw_cursor_line] + jbe .marked_action_1 ;still + mov ax,[right_start_draw_cursor_line] + add ax,10 + cmp ax,[right_panel_y.size_y] + jae @f +.add_2: + add [right_start_draw_cursor_line],10 + call draw_right_panel_selection + mov [drawing_panel_folder],2 + jmp key_80.all +@@: + mov eax,[right_folder_block] + sub eax,[max_panel_line] + test eax,0x80000000 + jz @f + xor eax,eax +@@: + cmp [marked_action],0 + jne @f + cmp [right_start_draw_line],eax + je still +@@: + mov [marked_action],0 + inc [right_start_draw_line] + call draw_right_panel + jmp still +;------------------------------------------------------------- +key_72: + cmp ah,72 ;arrow up + jne key_81 +.1: + cmp [select_panel_counter],0 + jne .right_1 + mov ax,[left_start_draw_cursor_line] + add ax,[left_panel_y.start_y] + cmp [left_panel_y.start_y],ax + je @f + sub [left_start_draw_cursor_line],10 + call draw_left_panel_selection + mov [drawing_panel_folder],1 +.all: + add ecx,10 shl 16 + mov edx,0xffffff + int 0x40 + mov [not_clear_lines],1 + call draw_folder_data + mov [not_clear_lines],0 + jmp still +@@: + cmp [left_start_draw_line],0 + je still + dec [left_start_draw_line] + call draw_left_panel + jmp still +.right_1: + mov ax,[right_start_draw_cursor_line] + add ax,[right_panel_y.start_y] + cmp [right_panel_y.start_y],ax + je @f + sub [right_start_draw_cursor_line],10 + call draw_right_panel_selection + mov [drawing_panel_folder],2 + jmp key_72.all +@@: + cmp [right_start_draw_line],0 + je still + dec [right_start_draw_line] + call draw_right_panel + jmp still +;------------------------------------------------------------- +key_81: + cmp ah,81 ; PageDown + jne key_73 + mov eax,[max_panel_line] + cmp [select_panel_counter],0 + jne .right_1 + mov ebx,[left_folder_block] + sub ebx,eax + test ebx,0x80000000 + jnz .left_2 + sub ebx,[left_start_draw_line] + cmp ebx,eax + ja .ok_1 + mov ebx,[left_folder_block] + sub ebx,eax + call prepare_data_left_down + ja @f + cmp ebx,[left_start_draw_line] + je still +@@: + mov [left_start_draw_line],ebx +.left_3: + dec eax + imul eax,10 +.left_1: + mov [left_start_draw_cursor_line],ax + call draw_left_panel + jmp still +.left_2: + mov eax,[left_folder_block] + sub eax,[left_start_draw_line] + dec eax + imul eax,10 + cmp ax,[left_start_draw_cursor_line] + jbe still + jmp .left_1 +.ok_1: + add [left_start_draw_line],eax + call draw_left_panel + jmp still +.right_1: + mov ebx,[right_folder_block] + sub ebx,eax + test ebx,0x80000000 + jnz .right_3 + sub ebx,[right_start_draw_line] + cmp ebx,eax + jae .ok_2 + mov ebx,[right_folder_block] + sub ebx,eax + call prepare_data_right_down + ja @f + cmp ebx,[right_start_draw_line] + je still +@@: + mov [right_start_draw_line],ebx +.right_4: + dec eax + imul eax,10 +.right_2: + mov [right_start_draw_cursor_line],ax + call draw_right_panel + jmp still +.right_3: + mov eax,[right_folder_block] + sub eax,[right_start_draw_line] + dec eax + imul eax,10 + cmp ax,[right_start_draw_cursor_line] + jbe still + jmp .right_2 +.ok_2: + add [right_start_draw_line],eax + call draw_right_panel + jmp still +;------------------------------------------------------------- +prepare_data_right_down: + mov ecx,[right_folder_block] + sub ecx,[right_start_draw_line] + dec ecx + imul ecx,10 + cmp cx,[right_start_draw_cursor_line] + ret +;------------------------------------------------------------- +prepare_data_left_down: + mov ecx,[left_folder_block] + sub ecx,[left_start_draw_line] + dec ecx + imul ecx,10 + cmp cx,[left_start_draw_cursor_line] + ret +;------------------------------------------------------------- +key_73: + cmp ah,73 ; PageUp + jne key_71 + mov eax,[max_panel_line] + cmp [select_panel_counter],0 + jne .right_1 + mov ebx,[left_start_draw_line] + sub ebx,eax + test ebx,0x8000000 + jz @f + cmp [left_start_draw_line],0 + jne .draw_line_1 + cmp [left_start_draw_cursor_line],0 + je still + mov [left_start_draw_cursor_line],0 +.draw_line_1: + mov [left_start_draw_line],0 + call draw_left_panel + jmp still +@@: + sub [left_start_draw_line],eax + call draw_left_panel + jmp still +.right_1: + mov ebx,[right_start_draw_line] + sub ebx,eax + test ebx,0x80000000 + jz @f + cmp [right_start_draw_line],0 + jne .draw_line_2 + cmp [right_start_draw_cursor_line],0 + je still + mov [right_start_draw_cursor_line],0 +.draw_line_2: + mov [right_start_draw_line],0 + call draw_right_panel + jmp still +@@: + sub [right_start_draw_line],eax + call draw_right_panel + jmp still +;------------------------------------------------------------- +key_71: + cmp ah,71 ; Home + jne key_79 + cmp [select_panel_counter],0 + jne .right_1 + cmp [left_start_draw_line],0 + jne .draw_left_panel + cmp [left_start_draw_cursor_line],0 + je still +.draw_left_panel: + mov [left_start_draw_line],0 + mov [left_start_draw_cursor_line],0 + call draw_left_panel + jmp still +.right_1: + cmp [right_start_draw_line],0 + jne .draw_right_panel + cmp [right_start_draw_cursor_line],0 + je still +.draw_right_panel: + mov [right_start_draw_line],0 + mov [right_start_draw_cursor_line],0 + call draw_right_panel + jmp still +;------------------------------------------------------------- +key_79: + cmp ah,79 ; End + jne key_28 + cmp [select_panel_counter],0 + jne .right_1 + mov eax,[left_folder_block] + sub eax,[max_panel_line] + test eax,0x80000000 + jnz key_81.left_2 + call prepare_data_left_down + ja @f + cmp eax,[left_start_draw_line] + je still +@@: + mov [left_start_draw_line],eax + mov eax,[max_panel_line] + jmp key_81.left_3 +.right_1: + mov eax,[right_folder_block] + sub eax,[max_panel_line] + test eax,0x80000000 + jnz key_81.right_3 + call prepare_data_right_down + ja @f + cmp eax,[right_start_draw_line] + je still +@@: + mov [right_start_draw_line],eax + mov eax,[max_panel_line] + jmp key_81.right_4 +;------------------------------------------------------------- +key_28: + cmp ah,28 ; Enter + jne key_ctrl_up +.1: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je still + cmp [alt_flag],1 + je files_information + + mov [open_param],0 +.2: + cmp [select_panel_counter],0 + jne .right_1 + mov ebp,read_folder_name ;read_folder.name + call calculate_left_data_1 + add esi,32 + cmp [exit_dir],1 + je .up_patch + test [esi],byte 0x10 + jz file_no_folder + cmp [open_param],0 + jne still + cmp [esi+40],word 2Eh + je still + cmp [esi+40],word '..' + je .up_patch + call calculate_key_28_1 + mov [left_start_draw_cursor_line],0 + mov [left_start_draw_line],0 + jmp proc_read_folder +.up_patch: + call calculate_key_28_2 + jmp proc_read_folder +.right_1: + mov ebp,read_folder_1_name ;read_folder_1.name + call calculate_right_data_1 + add esi,32 + cmp [exit_dir],1 + je .up_patch_1 + test [esi],byte 0x10 + jz file_no_folder + cmp [esi+40],word 2Eh + je still + cmp [esi+40],word '..' + je .up_patch_1 + call calculate_key_28_1 + mov [right_start_draw_cursor_line],0 + mov [right_start_draw_line],0 + jmp proc_read_folder_1 +.up_patch_1: + call calculate_key_28_2 + jmp proc_read_folder_1 +;--------------------------------------------------------------------- +calculate_key_28_1: +; mov edi,read_folder.name-1 + mov edi,ebp + dec edi + inc ebp +@@: + inc edi + cmp [edi],byte 0 + jne @r + cmp edi,ebp ;read_folder.name+1 + je @f + mov al,'/' + mov [edi],al + inc edi +@@: + add esi,40 +@@: + cld + lodsb + stosb + cmp al,0 + jnz @r + ret +;--------------------------------------------------------------------- +calculate_key_28_2: + mov [exit_dir],0 + mov edi,ebp ;read_folder.name +@@: + inc edi + cmp [edi],byte 0 + jne @r + mov [extension_size],edi + dec edi +@@: + dec edi + cmp [edi],byte '/' + jne @r + mov eax,ebp ;read_folder.name + cmp edi,eax + jbe @f + mov [edi],byte 0 +@@: + inc edi + mov [temp_counter_dword],edi + dec edi + sub [extension_size],edi + mov [search_pre_folder],1 + ret +;--------------------------------------------------------------------- +set_background: + cmp [shift_flag],1 + je .shift + cmp [ctrl_flag],1 + jne still + mov [open_param],background_stretch + jmp key_28.2 +.shift: + mov [open_param],background_tile + jmp key_28.2 +;--------------------------------------------------------------------- +reload_dir_1: + cmp [ctrl_flag],0 + je still + jmp reload_dir +;--------------------------------------------------------------------- +symbol_a_up: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je .ctrl + cmp [alt_flag],1 + je still + jmp still +.ctrl: + mov [mark_action_counter],0 + jmp mark_all_file +;--------------------------------------------------------------------- +NumPad_plus_Up: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je .ctrl + cmp [alt_flag],1 + je still + jmp still +.ctrl: + mov [mark_action_counter],0 + jmp mark_all_file +;--------------------------------------------------------------------- +NumPad_minus_Up: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je .ctrl + cmp [alt_flag],1 + je still + jmp still +.ctrl: + mov [mark_action_counter],1 + jmp mark_all_file +;--------------------------------------------------------------------- +NumPad_sneg_Up: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je .ctrl + cmp [alt_flag],1 + je still + jmp still +.ctrl: + mov [mark_action_counter],2 + jmp mark_all_file +;--------------------------------------------------------------------- +f_key_f1: +;sort_name: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je still + cmp [alt_flag],1 + je draw_left_select_disk_menu + jmp help_start +;--------------------------------------------------------------------- +f_key_f2: +;sort_name: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je still + cmp [alt_flag],1 + je draw_right_select_disk_menu + jmp still +;--------------------------------------------------------------------- +f_key_f3: +;sort_name: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je .ctrl + cmp [alt_flag],1 + je still + jmp still +.ctrl: + cmp [select_panel_counter],1 + je right_sort_name + jmp left_sort_name +;--------------------------------------------------------------------- +f_key_f4: +;sort_type: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je .ctrl + cmp [alt_flag],1 + je still + jmp open_file_f4 +.ctrl: + cmp [select_panel_counter],1 + je right_sort_type + jmp left_sort_type +;--------------------------------------------------------------------- +f_key_f5: +;sort_size: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je .ctrl + cmp [alt_flag],1 + je still + jmp copy_file_f5 +.ctrl: + cmp [select_panel_counter],1 + je right_sort_size + jmp left_sort_size +;--------------------------------------------------------------------- +f_key_f6: +;sort_date: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je .ctrl + cmp [alt_flag],1 + je still + jmp move_file_f6 +.ctrl: + cmp [select_panel_counter],1 + je right_sort_date + jmp left_sort_date +;--------------------------------------------------------------------- +f_key_f7: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je still + cmp [alt_flag],1 + je still + jmp create_directory +;--------------------------------------------------------------------- +f_key_f8: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je still + cmp [alt_flag],1 + je still + jmp delete_file +;--------------------------------------------------------------------- +f_key_f12: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je still + cmp [alt_flag],1 + je still + jmp exit_apl +;--------------------------------------------------------------------- +key_shift_up: + cmp [shift_flag],1 + je still + mov [shift_flag],1 + jmp key_alt_down.for_all +;--------------------------------------------------------------------- +key_shift_down: + mov [shift_flag],0 + jmp key_alt_down.for_all +;--------------------------------------------------------------------- +key_ctrl_up: + cmp ah,29 + jne key_ctrl_down +.1: + cmp [ctrl_flag],1 + je still + mov [ctrl_flag],1 + jmp key_alt_down.for_all +;--------------------------------------------------------------------- +key_ctrl_down: + cmp ah,157 + jne key_alt_up +.1: + mov [ctrl_flag],0 + jmp key_alt_down.for_all +;--------------------------------------------------------------------- +key_alt_up: + cmp ah,56 + jne key_alt_down +.1: + cmp [alt_flag],1 + je still + mov [alt_flag],1 + jmp key_alt_down.for_all +;--------------------------------------------------------------------- +key_alt_down: + cmp ah,184 + jne key_insert +.1: + mov [alt_flag],0 +.for_all: + call erase_fbutton + call draw_fbutton + jmp still +;--------------------------------------------------------------------- +key_insert: + cmp ah,82 ; Insert + je mark_file + cmp ah,83 + je delete_file +key_end: + jmp still +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/kfm.ini b/programs/fs/kfm/trunk/kfm.ini new file mode 100644 index 0000000000..35f7c17f57 --- /dev/null +++ b/programs/fs/kfm/trunk/kfm.ini @@ -0,0 +1,157 @@ +start +<>icons_associations +asm 0004 +inc 0004 +txt 0003 +rtf 0003 +ini 0003 +log 0003 +dic 0003 +doc 0003 +exc 0003 +wtx 0003 +inf 0003 +jpg 0006 +jpe 0006 +jpeg 0006 +jif 0006 +jfif 0006 +jp2 0006 +jpx 0006 +jpk 0006 +j2k 0006 +jpc 0006 +j2c 0006 +bmp 0006 +dib 0006 +rle 0006 +pbm 0006 +wbm 0006 +wbmp 0006 +xbm 0006 +xpm 0006 +gif 0006 +png 0006 +ico 0006 +cur 0006 +ani 0006 +tif 0006 +tiff 0006 +xif 0006 +tga 0006 +pcx 0006 +dcx 0006 +ppm 0006 +psd 0006 +psp 0006 +raw 0006 +raf 0006 +x3f 0006 +orf 0006 +nef 0006 +mrw 0006 +dcr 0006 +crw 0006 +cr2 0006 +ras 0006 +pix 0006 +pict 0006 +pct 0006 +pic 0006 +pgm 0006 +pef 0006 +pcd 0006 +iff 0006 +lbm 0006 +ilbm 0006 +fpx 0006 +djv 0006 +djvu 0006 +iw4 0006 +wav 0007 +mp3 0007 +mid 0007 +midi 0007 +aif 0007 +aifc 0007 +aiff 0007 +au 0007 +snd 0007 +wma 0007 +wm 0007 +avi 0011 +mpg 0011 +img 0005 +ima 0005 +imz 0005 +bwz 0005 +dsk 0005 +vfd 0005 +wil 0005 +wlz 0005 +exe 0008 +com 0008 +bat 0008 +7z 0009 +rar 0009 +zip 0009 +cab 0009 +arj 0009 +lha 0009 +lzh 0009 +tar 0009 +taz 0009 +tbz 0009 +tbz2 0009 +bz 0009 +bz2 0009 +ice 0009 +gz 0009 +tgz 0009 +uue 0009 +uu 0009 +xxe 0009 +z 0009 +dat 0010 +ttf 0012 +ttc 0012 +chr 0012 +mt 0012 +htm 0013 +html 0013 +lif 0014 +3ds 0015 +kex 0016 +skn 0017 +<>end + +<>files_associations +asm /rd/1/tinypad +inc /rd/1/tinypad +txt /rd/1/tinypad +ini /rd/1/tinypad +log /rd/1/tinypad +dat /rd/1/tinypad +inf /rd/1/tinypad +bat /rd/1/tinypad +jpg /rd/1/jpegview +jpeg /rd/1/jpegview +jpe /rd/1/jpegview +gif /rd/1/gifview +wav /rd/1/ac97snd +mp3 /rd/1/ac97snd +mid /rd/1/midamp +bmp /rd/1/mv +png /rd/1/@rcher +rtf /rd/1/rtfread +3ds /rd/1/3d/view3ds +lif /rd/1/demos/life2 +skn /rd/1/desktop +avi /rd/1/kvid.kex +<>end + +<>files_association1 +bmp /rd/1/animage +<>end + +end diff --git a/programs/fs/kfm/trunk/macros.inc b/programs/fs/kfm/trunk/macros.inc new file mode 100644 index 0000000000..6df8eca325 --- /dev/null +++ b/programs/fs/kfm/trunk/macros.inc @@ -0,0 +1,269 @@ +; new application structure +macro meos_app_start + { + use32 + org 0x0 + + db 'MENUET01' + dd 0x01 + dd __start + dd __end + dd __memory + dd __stack + + if used __params & ~defined __params + dd __params + else + dd 0x0 + end if + + dd 0x0 + } +MEOS_APP_START fix meos_app_start + +macro code + { + __start: + } +CODE fix code + +macro data + { + __data: + } +DATA fix data + +macro udata + { + if used __params & ~defined __params + __params: + db 0 + __end: + rb 255 + else + __end: + end if + __udata: + } +UDATA fix udata + +macro meos_app_end + { + align 32 + rb 2048 + __stack: + __memory: + } +MEOS_APP_END fix meos_app_end + + +; macro for defining multiline text data +struc mstr [sstring] + { + forward + local ssize + virtual at 0 + db sstring + ssize = $ + end virtual + dd ssize + db sstring + common + dd -1 + } + + +; strings +macro sz name,[data] { ; from MFAR [mike.dld] + common + if used name + label name + end if + forward + if used name + db data + end if + common + if used name + .size = $-name + end if +} + +macro lsz name,[lng,data] { ; from MFAR [mike.dld] + common + if used name + label name + end if + forward + if (used name)&(lang eq lng) + db data + end if + common + if used name + .size = $-name + end if +} + + + +; easy system call macro +macro mpack dest, hsrc, lsrc +{ + if (hsrc eqtype 0) & (lsrc eqtype 0) + mov dest, (hsrc) shl 16 + lsrc + else + if (hsrc eqtype 0) & (~lsrc eqtype 0) + mov dest, (hsrc) shl 16 + add dest, lsrc + else + mov dest, hsrc + shl dest, 16 + add dest, lsrc + end if + end if +} + +macro __mov reg,a,b { ; mike.dld + if (~a eq)&(~b eq) + mpack reg,a,b + else if (~a eq)&(b eq) + mov reg,a + end if +} + +macro mcall a,b,c,d,e,f { ; mike.dld + __mov eax,a + __mov ebx,b + __mov ecx,c + __mov edx,d + __mov esi,e + __mov edi,f + int 0x40 +} + + + +; optimize the code for size +__regs fix + +macro add arg1,arg2 + { + if (arg2 eqtype 0) + if (arg2) = 1 + inc arg1 + else + add arg1,arg2 + end if + else + add arg1,arg2 + end if + } + +macro sub arg1,arg2 + { + if (arg2 eqtype 0) + if (arg2) = 1 + dec arg1 + else + sub arg1,arg2 + end if + else + sub arg1,arg2 + end if + } + +macro mov arg1,arg2 + { + if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0')) + if (arg2) = 0 + xor arg1,arg1 + else if (arg2) = 1 + xor arg1,arg1 + inc arg1 + else if (arg2) = -1 + or arg1,-1 + else if (arg2) > -128 & (arg2) < 128 + push arg2 + pop arg1 + else + mov arg1,arg2 + end if + else + mov arg1,arg2 + end if + } + + +macro struct name + { + virtual at 0 + name name + sizeof.#name = $ - name + end virtual + } + +; structures used in MeOS +struc process_information + { + .cpu_usage dd ? ; +0 + .window_stack_position dw ? ; +4 + .window_stack_value dw ? ; +6 + .not_used1 dw ? ; +8 + .process_name rb 12 ; +10 + .memory_start dd ? ; +22 + .used_memory dd ? ; +26 + .PID dd ? ; +30 + .x_start dd ? ; +34 + .y_start dd ? ; +38 + .x_size dd ? ; +42 + .y_size dd ? ; +46 + .slot_state dw ? ; +50 + dw ? ; +52 - reserved + .client_left dd ? ; +54 + .client_top dd ? ; +58 + .client_width dd ? ; +62 + .client_height dd ? ; +66 + .wnd_state db ? ; +70 + rb (1024-71) + } +;struct process_information + +struc system_colors + { + .frame dd ? + .grab dd ? + .grab_button dd ? + .grab_button_text dd ? + .grab_text dd ? + .work dd ? + .work_button dd ? + .work_button_text dd ? + .work_text dd ? + .work_graph dd ? + } +;struct system_colors + + +; constants + +; events +EV_IDLE = 0 +EV_TIMER = 0 +EV_REDRAW = 1 +EV_KEY = 2 +EV_BUTTON = 3 +EV_EXIT = 4 +EV_BACKGROUND = 5 +EV_MOUSE = 6 +EV_IPC = 7 +EV_STACK = 8 + +; event mask bits for function 40 +EVM_REDRAW = 1b +EVM_KEY = 10b +EVM_BUTTON = 100b +EVM_EXIT = 1000b +EVM_BACKGROUND = 10000b +EVM_MOUSE = 100000b +EVM_IPC = 1000000b +EVM_STACK = 10000000b \ No newline at end of file diff --git a/programs/fs/kfm/trunk/markfile.inc b/programs/fs/kfm/trunk/markfile.inc new file mode 100644 index 0000000000..8731cfa38d --- /dev/null +++ b/programs/fs/kfm/trunk/markfile.inc @@ -0,0 +1,158 @@ +;--------------------------------------------------------------------- +mark_file: + mov [marked_action],1 + cmp [select_panel_counter],0 + jne .right_1 + call calculate_left_data_1 + jmp .for_all +.right_1: + call calculate_right_data_1 +.for_all: + add esi,32+299 + mov al,[esi] + and al,1 + cmp [select_panel_counter],0 + jne .right_2 + test al,al + jnz @f + inc [left_marked_counter] + jmp .for_all_1 +@@: + dec [left_marked_counter] +.for_all_1: + mov al,[esi] + inc al + and al,1 + mov [esi],al + jmp key_80.1 +.right_2: + test al,al + jnz @f + inc [right_marked_counter] + jmp .for_all_1 +@@: + dec [right_marked_counter] + jmp .for_all_1 +;--------------------------------------------------------------------- +calculate_left_data_1: + xor eax,eax + mov ax,[left_start_draw_cursor_line] + xor edx,edx + mov ebx,10 + div ebx + mov esi,[left_start_draw_line] + add esi,eax + imul esi,304 + add esi,[left_folder_data] + ret +;--------------------------------------------------------------------- +calculate_right_data_1: + xor eax,eax + mov ax,[right_start_draw_cursor_line] + xor edx,edx + mov ebx,10 + div ebx + mov esi,[right_start_draw_line] + add esi,eax + imul esi,304 + add esi,[right_folder_data] + ret +;--------------------------------------------------------------------- +mark_all_file: + cmp [select_panel_counter],0 + jne .right_1 + mov ebp,[left_folder_block] +.start: + mov ebx,ebp + dec ebx + imul ebx,304 + add ebx,[left_folder_data] + add ebx,32+40 + cmp [ebx],word '..' + jne .continue + cmp [ebx+2],byte 0 + je .continue_1 +.continue: + call select_mark_action +.continue_1: +@@: + dec ebp + jnz .start + call draw_left_panel + cmp [mark_action_counter],0 + jne @f + mov eax,[left_folder_block] +; dec eax +; mov [left_marked_counter],eax +; jmp still + jmp .end +@@: + cmp [mark_action_counter],1 + jne @f + mov [left_marked_counter],0 + jmp still +@@: + mov eax,[left_folder_block] + sub eax,[left_marked_counter] +.end: + dec eax + mov [left_marked_counter],eax + jmp still +.right_1: + mov ebp,[right_folder_block] +.start_1: + mov ebx,ebp + dec ebx + imul ebx,304 + add ebx,[right_folder_data] + add ebx,32+40 + cmp [ebx],word '..' + jne .continue_2 + cmp [ebx+2],byte 0 + je .continue_3 +.continue_2: + call select_mark_action +.continue_3: +@@: + dec ebp + jnz .start_1 + call draw_right_panel + cmp [mark_action_counter],0 + jne @f + mov eax,[right_folder_block] +; dec eax +; mov [right_marked_counter],eax +; jmp still + jmp .end_1 +@@: + cmp [mark_action_counter],1 + jne @f + mov [right_marked_counter],0 + jmp still +@@: + mov eax,[right_folder_block] + sub eax,[right_marked_counter] +.end_1: + dec eax + mov [right_marked_counter],eax + jmp still +;--------------------------------------------------------------------- +select_mark_action: + add ebx,299-40 + cmp [mark_action_counter],0 + jne @f + mov [ebx],byte 1 + jmp .continue +@@: + cmp [mark_action_counter],1 + jne @f + mov [ebx],byte 0 + jmp .continue +@@: + mov al,[ebx] + inc al + and al,1 + mov [ebx],al +.continue: + ret +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/menu_bar.inc b/programs/fs/kfm/trunk/menu_bar.inc new file mode 100644 index 0000000000..1a41f42f60 --- /dev/null +++ b/programs/fs/kfm/trunk/menu_bar.inc @@ -0,0 +1,47 @@ +draw_menu_bar: + mov ecx,[skin_high] + shl ecx,16 + mov cx,19 + mov ebx,[window_width] + sub ebx,9 + add ebx,5 shl 16 + mcall 13,,,0xcccccc + add ecx,37 shl 16 + mov cx,3 + mcall + push ecx + add ecx,16 shl 16 + mcall + add ecx,16 shl 16 + mov cx,1 + mcall + pop ecx + add ecx,3 shl 16 + mov eax,[window_high] + shr ecx,16 + sub eax,ecx + sub eax,4 + shl ecx,16 + add ecx,eax + mov bx,2 + sub ecx,33 + mcall 13 + push ebx + ror ebx,16 + mov bx,[right_panel_x.start_x] + sub bx,2 + rol ebx,16 + mcall + pop ebx + mov ax,cx + dec ax + shl eax,16 + add ecx,eax + mov cx,3 + mov eax,[window_width] + mov bx,ax + sub ebx,9 + mcall 13 + add ecx,15 shl 16 + mcall + ret \ No newline at end of file diff --git a/programs/fs/kfm/trunk/menu_drv.inc b/programs/fs/kfm/trunk/menu_drv.inc new file mode 100644 index 0000000000..903168b2df --- /dev/null +++ b/programs/fs/kfm/trunk/menu_drv.inc @@ -0,0 +1,420 @@ +;--------------------------------------------------------------------- +key_menu: + mcall 2 + cmp [extended_key],1 + je .extended_key + test al, al + jnz .end_1 + cmp ah, 0xE0 + jne @f + mov [extended_key],1 +.end_1: + ret +@@: + cmp ah,72 + je menu_key_72.1 + cmp ah,80 + je menu_key_80.1 + cmp ah,28 + je menu_key_28.1 +.end: + cmp ah,208 + je .end_1 + cmp ah,200 + je .end_1 + cmp ah,156 + je .end_1 + cmp ah,184 + je .end_5 + cmp ah,187 + je .end_1 + cmp ah,188 + je .end_1 + cmp ah,199 + je .end_1 + cmp ah,207 + je .end_1 + cmp ah,201 + je .end_1 + cmp ah,209 + je .end_1 + cmp ah,42 ; NumLock ON + je .end_1 + cmp ah,170 ; NumLock ON + je .end_1 + cmp ah,210 + je .end_1 + cmp ah,211 + je .end_1 + cmp ah,56 + je .end_4 + cmp ah,59 + je .end_2 + cmp ah,60 + je .end_3 +.for_all: + mov [close_menu],1 + ret + +.end_2: + cmp [alt_flag],0 + je .for_all + cmp [select_panel_counter],0 + je .end_1 + mov [close_menu],2 + ret +.end_3: + cmp [alt_flag],0 + je .for_all + cmp [select_panel_counter],0 + jne .end_1 + mov [close_menu],2 + ret +.end_4: + cmp [alt_flag],1 + je .end_1 + mov [alt_flag],1 + jmp @f +.end_5: + cmp [alt_flag],0 + je .end_1 + mov [alt_flag],0 +@@: + call erase_fbutton + call draw_fbutton + ret +;--------------------------------------------------------------------- +.extended_key: + mov [extended_key],0 +menu_key_80: + cmp ah,80 ; arrow down + jne menu_key_72 +.1: + mov eax,[retrieved_devices_table_counter] + dec eax + cmp eax,[start_draw_menu_cursor_line] + je @f + inc [start_draw_menu_cursor_line] +@@: + ret +;--------------------------------------------------------------------- +menu_key_72: + cmp ah,72 ;arrow up + jne menu_key_71 +.1: + cmp [start_draw_menu_cursor_line],0 + je @f + dec [start_draw_menu_cursor_line] +@@: + ret +;--------------------------------------------------------------------- +menu_key_71: + cmp ah,71 ;Home + je @f + cmp ah,73 ;PageUp + jne menu_key_79 +@@: + mov [start_draw_menu_cursor_line],0 + ret +;--------------------------------------------------------------------- +menu_key_79: + cmp ah,79 ; End + je @f + cmp ah,81 ; PageDown + jne menu_key_82 +@@: + mov eax,[retrieved_devices_table_counter] + dec eax + mov [start_draw_menu_cursor_line],eax + ret +;--------------------------------------------------------------------- +menu_key_82: + cmp ah,82 ; Insert + jne menu_key_83 + mov esi,[start_draw_menu_cursor_line] + imul esi,10 + add esi,retrieved_devices_table + inc esi + cmp [esi],word 'cd' + jne @f + xor ecx,ecx + mov cl,[esi+2] + sub ecx,0x30 + mcall 24,5 +@@: + ret +;--------------------------------------------------------------------- +menu_key_83: + cmp ah,83 ; Delete + jne menu_key_28 + mov esi,[start_draw_menu_cursor_line] + imul esi,10 + add esi,retrieved_devices_table + inc esi + cmp [esi],word 'cd' + jne @f + xor ecx,ecx + mov cl,[esi+2] + sub ecx,0x30 + mcall 24,4 +@@: + ret +;--------------------------------------------------------------------- +menu_key_28: + cmp ah,28 ; Enter + jne menu_key_end +.1: + mov [press_enter_menu],1 + ret +menu_key_end: + jmp key_menu.end +;--------------------------------------------------------------------- +key_menu_left: + mov [close_menu],0 + mov [press_enter_menu],0 + call key_menu + cmp [press_enter_menu],1 + je .press_enter_menu + cmp [close_menu],0 + je draw_left_select_disk_menu.red +.1: +; mov [left_panel_clear_all],1 + call draw_left_panel +; mov [right_panel_clear_all],1 + call draw_right_panel + cmp [alt_flag],0 + je still + cmp [close_menu],2 + je draw_right_select_disk_menu + jmp still +.press_enter_menu: + mov esi,[start_draw_menu_cursor_line] + imul esi,10 + add esi,retrieved_devices_table + inc esi + call copy_folder_name + mov [left_start_draw_cursor_line],0 + call proc_read_folder + jmp still +;--------------------------------------------------------------------- +key_menu_right: + mov [close_menu],0 + mov [press_enter_menu],0 + call key_menu + cmp [press_enter_menu],1 + je .press_enter_menu + cmp [close_menu],0 + je draw_right_select_disk_menu.red +.1: +; mov [left_panel_clear_all],1 + call draw_left_panel +; mov [right_panel_clear_all],1 + call draw_right_panel + cmp [alt_flag],0 + je still + cmp [close_menu],2 + je draw_left_select_disk_menu + jmp still +.press_enter_menu: + mov esi,[start_draw_menu_cursor_line] + imul esi,10 + add esi,retrieved_devices_table + inc esi + call copy_folder_name_1 + mov [right_start_draw_cursor_line],0 + call proc_read_folder_1 + jmp still +;--------------------------------------------------------------------- +draw_left_select_disk_menu: + mov [select_panel_counter],0 + call draw_left_panel + call draw_right_panel + mov [start_draw_menu_cursor_line],0 +.red: + call draw_left_menu +.still: + mcall 10 + cmp eax,1 + je red + cmp eax,2 + je key_menu_left + cmp eax,3 + je @f + cmp eax,6 + je mouse_menu_left + jmp .still +@@: + call draw_left_panel + jmp button +;--------------------------------------------------------------------- +draw_right_select_disk_menu: + mov [select_panel_counter],1 + call draw_left_panel + call draw_right_panel + mov [start_draw_menu_cursor_line],0 +.red: + call draw_right_menu +.still: + mcall 10 + cmp eax,1 + je red + cmp eax,2 + je key_menu_right + cmp eax,3 + je @f + cmp eax,6 + je mouse_menu_right + jmp .still +@@: + call draw_right_panel + jmp button +;--------------------------------------------------------------------- +draw_left_menu: + mov ebx,[left_panel_x] + mov bx,60 + mov ecx,[left_panel_y] + mov eax,[retrieved_devices_table_counter] + mov cx,ax + imul cx,10 + mov edx,0xffffcc + mov eax,13 + int 0x40 + call draw_menu_Selection + call draw_menu_data + ret +;--------------------------------------------------------------------- +draw_right_menu: + mov ebx,[right_panel_x] + mov bx,60 + mov ecx,[right_panel_y] + mov eax,[retrieved_devices_table_counter] + mov cx,ax + imul cx,10 + mov edx,0xffffcc + mov eax,13 + int 0x40 + call draw_menu_Selection + call draw_menu_data + ret +;--------------------------------------------------------------------- +draw_menu_data: + mov edx,retrieved_devices_table + shr ecx,16 + mov bx,cx + mov ebp,0 +.start: + mcall 4, ,0x80000000 + add ebx,10 + add edx,10 + inc ebp + cmp ebp,[retrieved_devices_table_counter] + jne .start + ret +;--------------------------------------------------------------------- +draw_menu_Selection: + push ebx ecx + mov eax,[start_draw_menu_cursor_line] + imul eax,10 + shl eax,16 + add ecx,eax + mov cx,10 + mov edx,0xbbffbb + mov eax,13 + int 0x40 + pop ecx ebx + ret +;--------------------------------------------------------------------- +mouse_menu_left: + mcall 37,2 + mov [mouse_keys],eax + mcall 37,1 + mov [mouse_position],eax + test eax,0x80000000 + jnz draw_left_select_disk_menu.still + test eax,0x8000 + jnz draw_left_select_disk_menu.still + mov ebx,eax + shr ebx,16 + shl eax,16 + shr eax,16 + cmp ebx,[window_width] + ja draw_left_select_disk_menu.still + cmp eax,[window_high] + ja draw_left_select_disk_menu.still + xor ecx,ecx + mov cx,[left_panel_y.start_y] + cmp ax,cx + jbe .close + mov edx,[retrieved_devices_table_counter] + imul edx,10 + add cx,dx + cmp ax,cx + jae .close + mov cx,[left_panel_x.start_x] + cmp bx,cx + jbe .close + add cx,60 + cmp bx,cx + jae .close + sub ax,[left_panel_y.start_y] + mov ebx,10 + xor edx,edx + div ebx + mov [start_draw_menu_cursor_line],eax + cmp [mouse_keys],0 + je draw_left_select_disk_menu.red + jmp key_menu_left.press_enter_menu +.close: + cmp [mouse_keys],0 + je draw_left_select_disk_menu.still +; mov [left_panel_clear_all],1 + call draw_left_panel + jmp still +;--------------------------------------------------------------------- +mouse_menu_right: + mcall 37,2 + mov [mouse_keys],eax + mcall 37,1 + mov [mouse_position],eax + test eax,0x80000000 + jnz draw_right_select_disk_menu.still + test eax,0x8000 + jnz draw_right_select_disk_menu.still + mov ebx,eax + shr ebx,16 + shl eax,16 + shr eax,16 + cmp ebx,[window_width] + ja draw_right_select_disk_menu.still + cmp eax,[window_high] + ja draw_right_select_disk_menu.still + xor ecx,ecx + mov cx,[right_panel_y.start_y] + cmp ax,cx + jbe .close + mov edx,[retrieved_devices_table_counter] + imul edx,10 + add cx,dx + cmp ax,cx + jae .close + mov cx,[right_panel_x.start_x] + cmp bx,cx + jbe .close + add cx,60 + cmp bx,cx + jae .close + sub ax,[right_panel_y.start_y] + mov ebx,10 + xor edx,edx + div ebx + mov [start_draw_menu_cursor_line],eax + cmp [mouse_keys],0 + je draw_right_select_disk_menu.red + jmp key_menu_right.press_enter_menu +.close: + cmp [mouse_keys],0 + je draw_right_select_disk_menu.still +; mov [right_panel_clear_all],1 + call draw_right_panel + jmp still +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/mouse.inc b/programs/fs/kfm/trunk/mouse.inc new file mode 100644 index 0000000000..00bb1d7bd5 --- /dev/null +++ b/programs/fs/kfm/trunk/mouse.inc @@ -0,0 +1,266 @@ +mouse: + mcall 18,7 + cmp [active_process],eax + jne still + mcall 37,7 + mov [mouse_scroll_data],eax +; test eax,eax +; jnz .continue_2 + mcall 37,2 + cmp [mouse_keys],eax + je @f + mov [mouse_keys],eax + mov [mouse_keys_delta],0 + jmp .continue_2 +@@: + mov [mouse_keys_delta],1 +.continue_2: + mcall 37,1 + mov [mouse_position],eax +; mcall 18,7 +; cmp [active_process],eax +; jne still + mov eax,[mouse_position] + test eax,0x80000000 + jnz still + test eax,0x8000 + jnz still + mov ebx,eax + shr ebx,16 + shl eax,16 + shr eax,16 + cmp [mouse_keys_delta],0 + je @f + cmp [scroll_pointer],0 + jne .check_scroll_bar_left +@@: + cmp ebx,[window_width] + ja still + cmp eax,[window_high] + ja still +.check_scroll_bar_left: + xor ecx,ecx + mov cx,[left_panel_y.start_y] + cmp [mouse_keys_delta],0 + je @f + cmp [scroll_pointer],1 + je .check_scroll_bar_left_event + cmp [scroll_pointer],2 + je .check_scroll_bar_right_event +@@: + cmp ax,cx + jbe .other + add cx,[left_panel_y.size_y] + cmp ax,cx + jae .other + mov cx,[left_panel_x.start_x] + cmp bx,cx + jbe .other + add cx,[left_panel_x.size_x] + cmp bx,cx + jae .check_scroll_bar_right + mov edx,[left_folder_block] + cmp edx,[max_panel_line] + jbe @f +.check_scroll_bar_left_event: + mov [scroll_bar_event],0 + call check_scroll_left_event + cmp [scroll_bar_event],0 + jne still + mov [scroll_bar_event],0 + call check_scroll_bar_left_event + cmp [scroll_bar_event],0 + jne still ;.continue +; cmp [scroll_pointer],1 +; je .continue +@@: + call check_left_panel_mouse_event +; jmp still +.continue: +; mov [temp_edx],mouse_left_panel +; call mouse.draw_data +; mov [scroll_pointer],0 +; mov [mouse_keys_delta_1],0 + jmp still + +.check_scroll_bar_right: + xor ecx,ecx + mov cx,[right_panel_x.start_x] + cmp bx,cx + jbe .other + add cx,[right_panel_x.size_x] + cmp bx,cx + jae .other + mov edx,[right_folder_block] + cmp edx,[max_panel_line] + jbe @f +.check_scroll_bar_right_event: + mov [scroll_bar_event],0 + call check_scroll_right_event + cmp [scroll_bar_event],0 + jne still + mov [scroll_bar_event],0 + call check_scroll_bar_right_event + cmp [scroll_bar_event],0 + jne still ;.continue_1 +@@: + call check_right_panel_mouse_event +.continue_1: +; mov [temp_edx],mouse_right_panel +; call mouse.draw_data + jmp still + +.other: +; mov [temp_edx],mouse_other_panel +; call mouse.draw_data + jmp still + +;.draw_data: +; pusha +; mov [temp_eax],eax +; mcall 13,<190,400>,<3,15>,0x0 +; xor ecx,ecx +; mov cx,[mouse_position.x] +; mcall 47,0x80000, ,<200, 5>,0xffffff +; mov cx,[mouse_position.y] +; mcall 47,0x80000, ,<300, 5>,0xffffff +; mcall 47,0x80000,[mouse_keys],<400, 5>,0xffffff +; mcall 4,<500,5>,0xffffff,[temp_edx],5 +; mcall 47,0x80000,[mouse_keys],<200, 5>,0xffffff +; popa +; ret +;--------------------------------------------------------------------- +check_left_panel_mouse_event: +; cmp [scroll_pointer],0 +; je @f + mov [scroll_pointer],0 +; ret +@@: + cmp [mouse_keys_delta],0 + jz .start + cmp [mouse_keys],0 + jz .end +.start: + sub ax,[left_panel_y.start_y] + mov ebx,10 + xor edx,edx + div ebx + imul eax,10 + cmp [select_panel_counter],0 + je @f + mov [select_panel_counter],0 + mov [mouse_keys_delta_1],0 + push eax + call draw_right_panel + pop eax + jmp .continue +@@: + cmp [left_start_draw_cursor_line],ax + jne @f + cmp [mouse_keys],0 + jnz .continue + cmp [mouse_keys_delta],0 + je .enter +@@: + mov [mouse_keys_delta_1],0 +.continue: + imul ebx,[left_folder_block],10 + cmp eax,ebx + jb @f + sub ebx,10 + mov [left_start_draw_cursor_line],bx + jmp .continue_1 +@@: + mov [left_start_draw_cursor_line],ax +.continue_1: + call draw_left_panel +.end: + ret +.enter: + cmp [mouse_keys_delta_1],1 + je .enter_1 + mcall 26,9 + add eax,[mouse_key_delay] + mov [mouse_keys_tick],eax + mov [mouse_keys_delta_1],1 + jmp .continue_1 +.enter_1: + mov [mouse_keys_delta_1],0 + mcall 26,9 + cmp eax,[mouse_keys_tick] + jbe @f + ret +@@: + add esp,4 +; call draw_left_panel + jmp key_28.1 +;--------------------------------------------------------------------- +check_right_panel_mouse_event: +; cmp [scroll_pointer],0 +; je @f + mov [scroll_pointer],0 +; ret +@@: + cmp [mouse_keys_delta],0 + jz .start + cmp [mouse_keys],0 + jz .end +.start: + sub ax,[right_panel_y.start_y] + mov ebx,10 + xor edx,edx + div ebx + imul eax,10 + cmp [select_panel_counter],1 + je @f + mov [select_panel_counter],1 + mov [mouse_keys_delta_1],0 + push eax + call draw_left_panel + pop eax + jmp .continue +@@: + cmp [right_start_draw_cursor_line],ax + jne @f + cmp [mouse_keys],0 + jnz .continue + cmp [mouse_keys_delta],0 + je .enter +@@: + mov [mouse_keys_delta_1],0 +; cmp [mouse_keys_delta],1 +; je .continue +; cmp [right_start_draw_cursor_line],ax +; je .enter +.continue: + imul ebx,[right_folder_block],10 + cmp eax,ebx + jb @f + sub ebx,10 + mov [right_start_draw_cursor_line],bx + jmp .continue_1 +@@: + mov [right_start_draw_cursor_line],ax +.continue_1: + call draw_right_panel +.end: + ret +.enter: + cmp [mouse_keys_delta_1],1 + je .enter_1 + mcall 26,9 + add eax,[mouse_key_delay] + mov [mouse_keys_tick],eax + mov [mouse_keys_delta_1],1 + jmp .continue_1 +.enter_1: + mov [mouse_keys_delta_1],0 + mcall 26,9 + cmp eax,[mouse_keys_tick] + jbe @f + ret +@@: + add esp,4 +; call draw_right_panel + jmp key_28.1 +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/openfile.inc b/programs/fs/kfm/trunk/openfile.inc new file mode 100644 index 0000000000..07b82584a6 --- /dev/null +++ b/programs/fs/kfm/trunk/openfile.inc @@ -0,0 +1,122 @@ +;--------------------------------------------------------------------- +open_file_f4: + cmp [select_panel_counter],0 + jne .right_1 +.left_1: + xor eax,eax + mov ax,[left_start_draw_cursor_line] + xor edx,edx + mov ebx,10 + div ebx + mov esi,[left_start_draw_line] + add esi,eax + imul esi,304 + add esi,[left_folder_data] + add esi,32 + test [esi],byte 0x10 + jz file_no_folder_1 + jmp still +.right_1: + xor eax,eax + mov ax,[right_start_draw_cursor_line] + xor edx,edx + mov ebx,10 + div ebx + mov esi,[right_start_draw_line] + add esi,eax + imul esi,304 + add esi,[right_folder_data] + add esi,32 + test [esi],byte 0x10 + jz file_no_folder_1 + jmp still +;--------------------------------------------------------------------- +file_no_folder_1: + call calculate_file_no_folder_1 +@@: + std + lodsb + cmp esi,edx + je still + cmp al,'.' + jnz @b + call calculate_file_no_folder_2 + call open_file_with_appl_1 + jmp still +;--------------------------------------------------------------------- +calculate_file_no_folder_1: + add esi,40 + mov edx,esi + xor eax,eax +@@: + cld + lodsb + test eax,eax + jnz @b + mov [temp_counter_1],esi + dec esi + dec edx + ret +;--------------------------------------------------------------------- +calculate_file_no_folder_2: + add esi,2 + mov ecx,[temp_counter_1] + sub ecx,esi + dec ecx + mov [extension_size],ecx + inc edx + ret +;--------------------------------------------------------------------- +file_no_folder: + call calculate_file_no_folder_1 +@@: + std + lodsb + cmp esi,edx + je start_file + cmp al,'.' + jnz @b + call calculate_file_no_folder_2 + call open_file_with_appl + cmp eax,1 + je start_file.1 + jmp still +;--------------------------------------------------------------------- +start_file: + inc edx +.1: + cmp [select_panel_counter],0 + jne @f + mov esi,read_folder_name ;read_folder.name + jmp .start +@@: + mov esi,read_folder_1_name ;read_folder_1.name +.start: + mov edi,file_name ;start_file_data.name + xor eax,eax +@@: + cld + lodsb + stosb + test eax,eax + jnz @b + mov [edi-1], byte '/' + mov esi,edx + mov [error_pointer], edx ;start_file_data.name +@@: + cld + lodsb + stosb + test eax,eax + jnz @b + mov [start_file_data.param],eax + call start_appl + cmp eax,0 + jge @f + mov ebx,0 + sub ebx,eax + mov eax,ebx + call start_error_window_thread +@@: + jmp still +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/progrbar.inc b/programs/fs/kfm/trunk/progrbar.inc new file mode 100644 index 0000000000..0f620b8f46 --- /dev/null +++ b/programs/fs/kfm/trunk/progrbar.inc @@ -0,0 +1,170 @@ +;--------------------------------------------------------------------- +progress_bar_delete: + pusha + cmp [max_progress_value],0 + je .end + call calculate_progress_data_4 + sub ecx,30 + call calculate_progress_data_5 + mov cx,60 + call calculate_progress_data_3 + add ecx,35 shl 16 + mov cx,15 + mov si,bx + mov edx,0xff0000 + call calculate_progress_data_6 + shr ecx,16 + mov bx,cx + sub ebx,13 + call clear_text_area_1 + mcall 4, ,0x90ffffff,file_name + cmp [draw_all_progressbar],0 + je .end + sub ebx,13 + mov edx,delete_type + int 0x40 +.end: + popa + mov [draw_all_progressbar],0 + ret +;--------------------------------------------------------------------- +progress_bar_copy: + pusha + call calculate_progress_data_4 + sub ecx,43 + call calculate_progress_data_5 + mov cx,86 + call calculate_progress_data_3 + add ecx,30 shl 16 + mov cx,15 + mov si,bx + pusha + mov edx,0xff00 + call calculate_progress_data_6 + popa + mov ebp,[current_progress_value_1] + call calculate_progress_data_1 + add ecx,30 shl 16 + mov bx,[temp_progress_value] + cmp [move_file_flag],1 + je @f + mov edx,0xff7700 + jmp .continue_1 +@@: + mov edx,0xff0000 +.continue_1: + int 0x40 + call calculate_progress_data_2 + shr ecx,16 + mov bx,cx + sub ebx,11 + call clear_text_area_1 + mcall 4, ,0x80ffffff,start_parameter + sub ebx,30 + call clear_text_area_1 + mcall 4, ,0x80ffffff,file_name + cmp [draw_all_progressbar],0 + je .end + sub ebx,13 + cmp [move_file_flag],1 + je @f + mov edx,copy_type_1 + jmp .continue +@@: + mov edx,move_type_1 +.continue: + + int 0x40 +.end: + popa + mov [draw_all_progressbar],0 + ret +;--------------------------------------------------------------------- +clear_text_area_1: + cmp [draw_all_progressbar],1 + je @f + push ebx + mov ecx,ebx + shl ecx,16 + mov cx,9 + mov eax,[window_width] + sub eax,70 + mov bx,ax + mov eax,13 + mov edx, 0x6060ff + int 0x40 + pop ebx +@@: + ret +;--------------------------------------------------------------------- +calculate_progress_data_1: + pusha + xor eax,eax + mov ax,bx + shl eax,10 + mov ebx,[max_progress_value] + xor edx,edx + div ebx + imul eax,ebp + shr eax,10 + mov [temp_progress_value],eax + popa + ret +;--------------------------------------------------------------------- +calculate_progress_data_2: + cmp [draw_all_progressbar],0 + je @f + push ebx + rol esi,16 + mov si,bx + rol ebx,16 + add bx,si + ror ebx,16 + ror esi,16 + sub si,bx + mov bx,si + mov edx,0xffffff + int 0x40 + pop ebx +@@: + ret +;--------------------------------------------------------------------- +calculate_progress_data_3: + mov bx,ax + mov eax,13 + cmp [draw_all_progressbar],0 + je @f + mov edx, 0x6060ff + int 0x40 +@@: + add ebx,10 shl 16 + sub ebx,20 + ret +;--------------------------------------------------------------------- +calculate_progress_data_4: + mcall 11 + cmp eax,1 + jne .1 + call draw_window + mov [draw_all_progressbar],1 +.1: + mov ecx,[window_high] + mov ebx,30 + shr ecx,1 + ret +;--------------------------------------------------------------------- +calculate_progress_data_5: + shl ecx,16 + shl ebx,16 + mov eax,[window_width] + sub eax,60 + ret +;--------------------------------------------------------------------- +calculate_progress_data_6: + mov ebp,[current_progress_value] + call calculate_progress_data_1 + mov bx,[temp_progress_value] + int 0x40 + call calculate_progress_data_2 + ret +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/resource.inc b/programs/fs/kfm/trunk/resource.inc new file mode 100644 index 0000000000..173a1979ea --- /dev/null +++ b/programs/fs/kfm/trunk/resource.inc @@ -0,0 +1,70 @@ +; Used button number +; +; functional button (temp not use) +; 101 - f1 +; 102 - f2 +; 103 - f3 +; 104 - f4 +; 105 - f5 +; 106 - f6 +; 107 - f7 +; 108 - f8 +; 109 - f9 +; 110 - f10 +; 111 - f11 +; 112 - f12 +; +; left panel read folder device name +; 120 - rd +; 121 - fd +; 122 - hd0 +; 123 - hd1 +; 124 - hd2 +; 125 - hd3 +; 126 - cd0 +; 127 - cd1 +; 128 - cd2 +; 129 - cd3 +; +; right panel read folder device name +; 130 - rd +; 131 - fd +; 132 - hd0 +; 133 - hd1 +; 134 - hd2 +; 135 - hd3 +; 136 - cd0 +; 137 - cd1 +; 138 - cd2 +; 139 - cd3 +; +; select disk menu +; 140 - left +; 141 - right +; +; left sort button +; 142 - Name +; 143 - Type +; 144 - Size +; 145 - Date +; +; right sort button +; 146 - Name +; 147 - Type +; 148 - Size +; 149 - Date +; +; main button panel +; 150 - Exit directory +; 151 - Reload directory +; 152 - Create directory +; 153 - Copy file +; 154 - Move file +; 155 - Cut file +; 156 - Paste file +; 157 - Delete file +; +; confirmation button +; 160 - Yes +; 161 - No +; \ No newline at end of file diff --git a/programs/fs/kfm/trunk/scroll.inc b/programs/fs/kfm/trunk/scroll.inc new file mode 100644 index 0000000000..df9e1500ca --- /dev/null +++ b/programs/fs/kfm/trunk/scroll.inc @@ -0,0 +1,543 @@ +;--------------------------------------------------------------------- +check_scroll_left_event: + pusha + mov eax,[mouse_scroll_data] + test eax,eax + jz .end + test ax,0x8000 + jnz .decr + shr eax,16 + test ax,0x8000 + jnz .decr_1 + mov eax,[left_folder_block] + sub eax,[max_panel_line] + cmp [left_start_draw_line],eax + jae .end + movzx eax,[mouse_scroll_data.vertical] + test eax,eax + jnz @f + movzx eax,[mouse_scroll_data.horizontal] +@@: + add [left_start_draw_line],eax + jmp .draw +.decr: + movzx eax,[mouse_scroll_data.vertical] + jmp @f +.decr_1: + movzx eax,[mouse_scroll_data.horizontal] +@@: + cmp [left_start_draw_line],0 + je .end + mov ebx,0xffff + sub ebx,eax + inc ebx + sub [left_start_draw_line],ebx + cmp [left_start_draw_line],0 + jae .draw + mov [left_start_draw_line],0 +.draw: + call draw_left_panel + mov [scroll_bar_event],1 +.end: + popa + ret +;--------------------------------------------------------------------- +check_scroll_right_event: + pusha + mov eax,[mouse_scroll_data] + test eax,eax + jz .end + test ax,0x8000 + jnz .decr + shr eax,16 + test ax,0x8000 + jnz .decr_1 + mov eax,[right_folder_block] + sub eax,[max_panel_line] + cmp [right_start_draw_line],eax + jae .end + movzx eax,[mouse_scroll_data.vertical] + test eax,eax + jnz @f + movzx eax,[mouse_scroll_data.horizontal] +@@: + add [right_start_draw_line],eax + jmp .draw +.decr: + movzx eax,[mouse_scroll_data.vertical] + jmp @f +.decr_1: + movzx eax,[mouse_scroll_data.horizontal] +@@: + cmp [right_start_draw_line],0 + je .end + mov ebx,0xffff + sub ebx,eax + inc ebx + sub [right_start_draw_line],ebx + cmp [right_start_draw_line],0 + jae .draw + mov [right_start_draw_line],0 +.draw: + call draw_right_panel + mov [scroll_bar_event],1 +.end: + popa + + ret +;--------------------------------------------------------------------- +check_scroll_bar_left_event: + mov [scroll_pointer],1 + cmp [mouse_keys_delta],0 + je @f + cmp [mouse_keys],0 + jz .exit +@@: + sub ecx,15 + cmp bx,cx + jb .exit +@@: + cmp [select_panel_counter],0 + je @f + mov [select_panel_counter],0 + call draw_all_panels_for_scroll_bar +@@: + mov [scroll_bar_event],1 + mov cx,[left_panel_y.start_y] + add cx,15 + cmp ax,cx + ja .scroll + cmp [left_start_draw_line],0 + jne @f + ret +@@: + dec [left_start_draw_line] + jmp .all +.scroll: + add cx,[left_panel_y.size_y] + sub cx,30 + cmp ax,cx + ja .down + mov ebx,16 ;15 + add bx,[left_panel_y.start_y] + sub cx,bx + sub ax,bx + mov ebx,eax + mov eax,[left_folder_block] + call calculate_for_scroll_bar + cmp [left_start_draw_line],eax + je .exit + mov [left_start_draw_line],eax +.all: + call draw_left_panel +.exit: + ret +.down: + mov eax,[left_folder_block] + sub eax,[max_panel_line] + cmp [left_start_draw_line],eax + jb @f + ret +@@: + inc [left_start_draw_line] + jmp .all +;--------------------------------------------------------------------- +draw_all_panels_for_scroll_bar: + push eax + push ebx + call draw_right_panel + call draw_left_panel + pop ebx + pop eax + ret +;--------------------------------------------------------------------- +calculate_for_scroll_bar: + sub eax,[max_panel_line] + inc eax + shl eax,10 + xor edx,edx + div ecx + shl edx,1 + cmp edx,ebx + jb @f + inc eax +@@: + imul eax,ebx + shr eax,10 + ret +;--------------------------------------------------------------------- +check_scroll_bar_right_event: + mov [scroll_pointer],2 + cmp [mouse_keys_delta],0 + je @f + cmp [mouse_keys],0 + jz .exit +@@: + sub ecx,15 + cmp bx,cx + jb .exit +@@: + cmp [select_panel_counter],1 + je @f + mov [select_panel_counter],1 + call draw_all_panels_for_scroll_bar +@@: + mov [scroll_bar_event],1 + mov cx,[right_panel_y.start_y] + add cx,15 + cmp ax,cx + ja .scroll + cmp [right_start_draw_line],0 + jne @f + ret +@@: + dec [right_start_draw_line] + jmp .all +.scroll: + add cx,[right_panel_y.size_y] + sub cx,30 + cmp ax,cx + ja .down + mov ebx,16 ;15 + add bx,[right_panel_y.start_y] + sub cx,bx + sub ax,bx + mov ebx,eax + mov eax,[right_folder_block] + call calculate_for_scroll_bar + cmp [right_start_draw_line],eax + je .exit + mov [right_start_draw_line],eax +.all: + call draw_right_panel +.exit: + ret +.down: + mov eax,[right_folder_block] + sub eax,[max_panel_line] + cmp [right_start_draw_line],eax + jb @f + ret +@@: + inc [right_start_draw_line] + jmp .all +;--------------------------------------------------------------------- +draw_scroll_bar_left: + pusha + mov eax,[left_folder_block] + cmp eax,0 + jne @f + inc eax +@@: + mov ebx,[max_panel_line] + xor edx,edx + div ebx + cmp eax,0 + jne @f + inc eax +@@: + mov ebx,eax + xor eax,eax + mov ax,[left_panel_x.size_x] + sub eax,30 + xor edx,edx + div ebx + shr eax,1 + cmp eax,5 + jae @f + mov eax,5 +@@: + mov [left_scroll_compens],eax + popa + + mov [scroll_pointer_1],1 + pusha + mov bx,[left_panel_x.start_x] + add bx,[left_panel_x.size_x] + sub bx,15 + shl ebx,16 + mov bx,15 + mov ecx,[left_panel_y] + call calculate_for_draw_scroll_bar + push ecx + mov ax,[left_panel_y.size_y] + sub eax,30 ;45 + sub eax,[left_scroll_compens] + sub eax,[left_scroll_compens] + shl eax,10 + push ebx + mov ebx,[left_folder_block] + call calculate_for_draw_scroll_bar_2 + mov ebx,[left_start_draw_line] + imul eax,ebx + pop ebx + call calculate_for_draw_scroll_bar_1 + pop ecx + ror ecx,16 + add cx,[left_panel_y.size_y] + call calculate_for_draw_scroll_bar_3 + popa + ret +;--------------------------------------------------------------------- +draw_scroll_bar_right: + pusha + mov eax,[right_folder_block] + cmp eax,0 + jne @f + inc eax +@@: + mov ebx,[max_panel_line] + xor edx,edx + div ebx + cmp eax,0 + jne @f + inc eax +@@: + mov ebx,eax + xor eax,eax + mov ax,[right_panel_x.size_x] + sub eax,30 + xor edx,edx + div ebx + shr eax,1 + cmp eax,5 + jae @f + mov eax,5 +@@: + mov [right_scroll_compens],eax + popa + mov [scroll_pointer_1],2 + pusha + mov bx,[right_panel_x.start_x] + add bx,[right_panel_x.size_x] + sub bx,15 + shl ebx,16 + mov bx,15 + mov ecx,[right_panel_y] + call calculate_for_draw_scroll_bar + push ecx + mov ax,[right_panel_y.size_y] + sub eax,30 ;45 + sub eax,[right_scroll_compens] + sub eax,[right_scroll_compens] + shl eax,10 + push ebx + mov ebx,[right_folder_block] + call calculate_for_draw_scroll_bar_2 + mov ebx,[right_start_draw_line] + imul eax,ebx + pop ebx + call calculate_for_draw_scroll_bar_1 + pop ecx + ror ecx,16 + add cx,[right_panel_y.size_y] + call calculate_for_draw_scroll_bar_3 + popa + ret +;--------------------------------------------------------------------- +calculate_for_draw_scroll_bar: + mov edx,0xeeeeee + mov eax,13 + pusha + add ebx,1 shl 16 + mov bx,14 + add ecx,16 shl 16 + sub cx,31 + int 0x40 + popa + xor edx,edx + push ebx + mov bx,1 + int 0x40 + push ecx + add ebx,15 shl 16 + int 0x40 + pop ecx + pop ebx + mov [draw_scroll_character],1 + call draw_scroll_bar_srectangle + xor eax,eax + ret +;--------------------------------------------------------------------- +calculate_for_draw_scroll_bar_1: + shr eax,10 + ror ecx,16 + add cx,15 + cmp [scroll_pointer_1],1 + jne .right + add ecx,[left_scroll_compens] + jmp @f +.right: + add ecx,[right_scroll_compens] +@@: + add cx,ax + rol ecx,16 + mov [draw_scroll_character],2 + call draw_scroll_bar_srectangle + ret +;--------------------------------------------------------------------- +calculate_for_draw_scroll_bar_2: + sub ebx,[max_panel_line] + cmp ebx,0 + ja @f + mov ebx,1 +@@: + xor edx,edx + div ebx + shl edx,1 + cmp edx,ebx + jb @f + inc eax +@@: + ret +;--------------------------------------------------------------------- +calculate_for_draw_scroll_bar_3: + sub cx,16 + rol ecx,16 + mov [draw_scroll_character],3 + call draw_scroll_bar_srectangle + ret +;--------------------------------------------------------------------- +;calculate_for_draw_scroll_bar_4: +; push eax +; push ebx +;; shr eax,10 +; mov ebx,eax +; xor eax,eax +; mov ax,[left_panel_y.size_y] +; xor edx,edx +; div ebx +;; mov esi,eax +; pop ebx +; pop eax +; ret +;--------------------------------------------------------------------- +draw_scroll_bar_srectangle: + push ecx + xor edx,edx + mov eax,13 + mov cx,1 + cmp [draw_scroll_character],2 + je .draw_center + int 0x40 + pusha + add ecx,1 shl 16 + add ebx,1 shl 16 + mov cx,14 + mov bx,14 + mov edx,0xbbddff + int 0x40 + xor edx,edx + cmp [draw_scroll_character],1 + jne .draw_down + add ebx,3 shl 16 + mov bx,7 + add ecx,8 shl 16 + mov cx,1 + int 0x40 + sub ecx,1 shl 16 + add ebx,1 shl 16 + mov bx,5 + int 0x40 + sub ecx,1 shl 16 + add ebx,1 shl 16 + mov bx,3 + int 0x40 + sub ecx,1 shl 16 + add ebx,1 shl 16 + mov bx,1 + int 0x40 + jmp .continue +.draw_down: + add ebx,3 shl 16 + mov bx,7 + add ecx,5 shl 16 + mov cx,1 + int 0x40 + add ecx,1 shl 16 + add ebx,1 shl 16 + mov bx,5 + int 0x40 + add ecx,1 shl 16 + add ebx,1 shl 16 + mov bx,3 + int 0x40 + add ecx,1 shl 16 + add ebx,1 shl 16 + mov bx,1 + int 0x40 +.continue: + popa + add ecx,15 shl 16 + int 0x40 + pop ecx + ret + +.draw_center: + pusha + add ecx,1 shl 16 + add ebx,1 shl 16 + push ecx + cmp [scroll_pointer_1],1 + jne .right + ror ecx,16 + sub ecx,[left_scroll_compens] + rol ecx,16 + xor cx,cx + add ecx,[left_scroll_compens] + shl cx,1 + jmp .draw_center_continue +.right: + ror ecx,16 + sub ecx,[right_scroll_compens] + rol ecx,16 + xor cx,cx + add ecx,[right_scroll_compens] + shl cx,1 +.draw_center_continue: + mov bx,14 + mov edx,0xbbddff + int 0x40 + xor edx,edx + mov cx,1 + sub ecx,1 shl 16 + int 0x40 + pop ecx + cmp [scroll_pointer_1],1 + jne .right_1 + cmp [left_scroll_compens],8 + jb .continue_1 + jmp .draw_center_continue_1 +.right_1: + cmp [right_scroll_compens],8 + jb .continue_1 +.draw_center_continue_1: + sub ecx,8 shl 16 + add ebx,2 shl 16 + mov bx,10 + add ecx,4 shl 16 + mov cx,1 + int 0x40 + add ecx,3 shl 16 + sub ebx,1 shl 16 + mov bx,12 + int 0x40 + add ebx,1 shl 16 + mov bx,10 + add ecx,3 shl 16 + int 0x40 +.continue_1: + popa + ror ecx,16 + cmp [scroll_pointer_1],1 + jne @f + add ecx,[left_scroll_compens] + jmp .draw_center_continue_2 +@@: + add ecx,[right_scroll_compens] +.draw_center_continue_2: + rol ecx,16 + int 0x40 + pop ecx + ret +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/sort.inc b/programs/fs/kfm/trunk/sort.inc new file mode 100644 index 0000000000..c715ef0073 --- /dev/null +++ b/programs/fs/kfm/trunk/sort.inc @@ -0,0 +1,836 @@ +left_sort_files: +; mcall 26,9 +; mov [timer_tick],eax + mov eax,[left_folder_data] + add eax,32+40 + cmp [eax],word '..' + jne @f + cmp [eax+2],byte 0 + jne @f + add [left_folder_data],304 + dec [left_folder_block] + mov [exit_to_dir],1 +@@: +; add memory for sorting + mov ecx,[right_folder_data] + sub ecx,[left_folder_data] + mov ebx,[appl_memory] + add ecx,ebx + push ebx + mov [appl_memory],ecx + mcall 64,1 + mov edi,[esp] + mov ecx,[appl_memory] + sub ecx,edi + shr ecx,2 + mov eax,0xffffffff + cld + rep stosd + cmp [left_sort_flag],0 + je left_name_sort + cmp [left_sort_flag],1 + je left_type_sort + jmp left_size_date_sort +.move_sorted_file: +; move sorted file area in folder area + mov esi,[esp] + mov edi,[left_folder_data] + add edi,32 + mov ecx,[right_folder_data] + sub ecx,edi + shr ecx,2 + cld + rep movsd + cmp [exit_to_dir],0 + je @f + sub [left_folder_data],304 + inc [left_folder_block] + mov [exit_to_dir],0 +@@: +; sub memory for sorting + pop ecx + mov [appl_memory],ecx + mcall 64,1 +; mcall 26,9 +; sub eax,[timer_tick] +; mov [timer_tick],eax +; call draw_window + ret +;--------------------------------------------------------------------- +left_name_sort: +; sorting of files + call prepare_data_1 + call left_name_sort_1 + call prepare_data_2 + call left_name_sort_1 +.1: + call prepare_data_4 + jmp left_sort_files.move_sorted_file +left_name_sort_1: + xor ebp,ebp +.copy_folders: + call copy_folders_1 + je .file + test [esi],byte 0x10 + jz .continue + jmp @f +.file: + test [esi],byte 0x10 + jnz .continue +@@: + call prepare_data_3 +.start: + push esi edi + call sort_by_name.start + jae .add_counter +.no_add_counter: + call move_area_for_bdvk + pop edi esi + jmp .end +.add_counter: + inc [sort_counter] + pop edi esi + call add_counter + jae .start +.end: + call move_bdvk +.continue: + inc ebp + cmp ebp,[left_folder_block] + jb .copy_folders + ret +;--------------------------------------------------------------------- +left_type_sort: +; sorting of files + call left_prepare_extension_start_1 + call prepare_data_1 + call left_type_sort_1 + call prepare_data_2 + call left_type_sort_1 + jmp left_name_sort.1 +left_type_sort_1: + xor ebp,ebp +.copy_folders: + call copy_folders_1 + je .file +; test [esi],byte 0x10 + test al,ah + jz .continue + jmp @f +.file: +; test [esi],byte 0x10 + test al,ah + jnz .continue +@@: + call prepare_data_3 +.start: + push esi edi + cmp [dir_or_file],1 + je @f + call prepare_data_5 +@@: + call sort_by_name.start + je .1 + ja .add_counter +.no_add_counter: + call move_area_for_bdvk + pop edi esi + jmp .end +.1: + cmp [dir_or_file],1 + je .add_counter + call sort_by_name + jbe .no_add_counter +.add_counter: + inc [sort_counter] + pop edi esi + call add_counter + jae .start +.end: + call move_bdvk +.continue: + inc ebp + cmp ebp,[left_folder_block] + jb .copy_folders + ret +;--------------------------------------------------------------------- +left_size_date_sort: +; sorting of files + call prepare_data_1 + call left_size_date_sort_1 + call prepare_data_2 + call left_size_date_sort_1 + jmp left_name_sort.1 +left_size_date_sort_1: + xor ebp,ebp +.copy_folders: + call copy_folders_1 + je .file + test [esi],byte 0x10 + jz .continue + jmp @f +.file: + test [esi],byte 0x10 + jnz .continue +@@: + call prepare_data_3 +.start: + push esi edi + mov eax,[left_sort_flag] + cmp eax,2 + je .size_sort + call sort_by_date +; je .1 + jae .add_counter + jmp .no_add_counter +.size_sort: + cmp [dir_or_file],0 + je .file_1 + call sort_by_name.start + jmp @f +.file_1: + call sort_by_size +@@: + jae .add_counter +.no_add_counter: + call move_area_for_bdvk + pop edi esi + jmp .end +;.1: +; call sort_by_name.start +; jbe .no_add_counter +.add_counter: + inc [sort_counter] + pop edi esi + call add_counter + jae .start +.end: + call move_bdvk +.continue: + inc ebp + cmp ebp,[left_folder_block] + jb .copy_folders + ret +;--------------------------------------------------------------------- +left_prepare_extension_start: + xor ebp,ebp + mov esi,[left_folder_data] + add esi,32+40 +.start: + call prepare_extension_start_all + cmp ebp,[left_folder_block] + jb .start + ret +;--------------------------------------------------------------------- +prepare_extension_start_all: + push esi + call search_extension_start + mov eax,esi + pop esi + sub eax,esi + sub ebx,esi + shl eax,16 + mov ax,bx + mov [esi+300-40],eax + mov [esi+299-40],byte 0 + add esi,304 + inc ebp + ret +;--------------------------------------------------------------------- +left_prepare_extension_start_1: + xor ebp,ebp + mov edi,[esp+4] +.start: + xor eax,eax + mov [edi+300],eax + add edi,304 + inc ebp + cmp ebp,[left_folder_block] + jb .start + ret +;--------------------------------------------------------------------- +left_files_name_normalize: + xor ebp,ebp + mov esi,[left_folder_data] + add esi,32+40 +.start: + push esi + mov al,[esi] + call char_toupper + mov [esi],al +@@: + inc esi + mov al,[esi] + test al,al + jz @f + call char_todown + mov [esi],al + jmp @b +@@: + pop esi + add esi,304 + inc ebp + cmp ebp,[left_folder_block] + jb .start + ret +;--------------------------------------------------------------------- +right_files_name_normalize: + xor ebp,ebp + mov esi,[right_folder_data] + add esi,32+40 +.start: + push esi + mov al,[esi] + call char_toupper + mov [esi],al +@@: + inc esi + mov al,[esi] + test al,al + jz @f + call char_todown + mov [esi],al + jmp @b +@@: + pop esi + add esi,304 + inc ebp + cmp ebp,[right_folder_block] + jb .start + ret +;--------------------------------------------------------------------- +right_prepare_extension_start: + xor ebp,ebp + mov esi,[right_folder_data] + add esi,32+40 +.start: + call prepare_extension_start_all + cmp ebp,[right_folder_block] + jb .start + ret +;--------------------------------------------------------------------- +right_prepare_extension_start_1: + xor ebp,ebp + mov edi,[esp+4] +.start: + xor eax,eax + mov [edi+300],eax + add edi,304 + inc ebp + cmp ebp,[right_folder_block] + jb .start + ret +;--------------------------------------------------------------------- +prepare_data_1: + mov [dir_or_file],1 + mov [dir_temp_counter],0 + ret +;--------------------------------------------------------------------- +prepare_data_2: + mov eax,[dir_temp_counter] + mov [dir_temp_counter_1],eax + imul eax,304 + add [esp+4],eax + mov [dir_or_file],0 + ret +;--------------------------------------------------------------------- +prepare_data_3: + mov edi,[esp+4+4] + add esi,40 + add edi,40 + mov [sort_counter],0 + ret +;--------------------------------------------------------------------- +prepare_data_4: + mov eax,[dir_temp_counter_1] + imul eax,304 + sub [esp+4],eax + ret +;--------------------------------------------------------------------- +prepare_data_5: + xor eax,eax + mov ax,[esi+302-40] + add esi,eax + mov ax,[edi+302-40] + add edi,eax + ret +;--------------------------------------------------------------------- +sort_by_name: + mov esi,[esp+8] + mov edi,[esp+4] +.start: + cld + lodsd + mov ebx,[edi] ; bufer + add edi,4 + cmp al,bl + jnz @f + test bl, bl + jz @f + cmp ah,bh + jnz @f + test bh, bh + jz @f + ror eax,16 + ror ebx,16 + cmp al,bl + jnz @f + test bl, bl + jz @f + cmp ah, bh + jnz @f + test bh, bh + jnz .start +@@: + ret +;--------------------------------------------------------------------- +sort_by_name_3: + mov esi,[esp+8] + mov edi,[esp+4] +.start: + cld + lodsd + mov ecx,4 + rep scasb + jz .start + ret +;--------------------------------------------------------------------- +sort_by_name_1: + mov esi,[esp+8] + mov edi,[esp+4] + cmp [edi],byte 255 + je @f +.start: + cld + lodsb + mov ah,[edi] ; bufer + inc edi + cmp al,ah + jnz @f + test ah, ah + jnz .start +@@: + ret +;--------------------------------------------------------------------- +align 4 +sort_by_date: + mov eax,[esi-12] ;+28-40] + cmp eax,[edi-12] ;+28-40] + jnz .end + mov eax,[esi-16] ;+24-40] + cmp eax,[edi-16] ;+24-40] +.end: + ret + +;mov eax,[esi-12] +;cmp eax,[edi-12] +;jz @f +;ret +;@@: +;mov eax,[esi-16] +;cmp eax,[edi-16] +;ret + +;push ecx ; ьюцэю юяєёЄшЄ№, хёыш ecx эх црыъю +;mov eax,[esi-12] +;cmp eax,[edi-12] +;setnz ch +;adc ch,-2 +;mov eax,[esi-16] +;cmp eax,[edi-16] +;setnz cl +;adc cl,-2 +;cmp cx,0xFEFE +;pop ecx +;ret +;--------------------------------------------------------------------- +align 4 +sort_by_size: + mov eax,[esi-4] ;+36-40] + cmp eax,[edi-4] ;+36-40] + jnz .end + mov eax,[esi-8] ;+32-40] + cmp eax,[edi-8] ;+32-40] +.end: + ret + +;mov eax,[esi-4] +;cmp eax,[edi-4] +;jz @f +;ret +;@@: +;mov eax,[esi-8] +;cmp eax,[edi-8] +;ret + +;push ecx ; ьюцэю юяєёЄшЄ№, хёыш ecx эх црыъю +;mov eax,[esi-4] +;cmp eax,[edi-4] +;setnz ch +;adc ch,-2 +;mov eax,[esi-8] +;cmp eax,[edi-8] +;setnz cl +;adc cl,-2 +;cmp cx,0xFEFE +;pop ecx +;ret +;--------------------------------------------------------------------- +add_counter: + add edi,304 + mov eax,[appl_memory] + sub eax,304-40 + cmp eax,edi + ret +;--------------------------------------------------------------------- +copy_folders_1: + mov edi,ebp + call multiple_304 +; imul edi,304 + mov esi,edi + add esi,[left_folder_data] + add esi,32 + mov ah,0x10 + mov al,[esi] + cmp [dir_or_file],0 + ret +;--------------------------------------------------------------------- +copy_folders_2: + mov edi,ebp + call multiple_304 +; imul edi,304 + mov esi,edi + add esi,[right_folder_data] + add esi,32 + cmp [dir_or_file],0 + ret +;--------------------------------------------------------------------- +move_bdvk: + sub esi,40 + mov edi,[sort_counter] + call multiple_304 + add edi,[esp+4+4] + call move_bdvk_1 + inc [dir_temp_counter] + ret +;--------------------------------------------------------------------- +move_bdvk_1: + mov eax,[esi+300] + mov [edi+300],eax + mov ecx,0 + mov [edi+299],cl + mov cx,[esi+300] + add ecx,41 + ror ecx,2 + mov ax,cx + xor cx,cx + rol ecx,2 + mov bx,cx + mov cx,ax + cld + rep movsd + mov cx,bx + rep movsb + ret +;--------------------------------------------------------------------- +multiple_304: + shl edi,4 + mov eax,edi + mov ebx,eax + shl edi,5 + shl eax,3 + sub edi,eax + mov eax,ebx + shl ebx,2 + sub edi,ebx + sub edi,eax + ret +;--------------------------------------------------------------------- +move_area_for_bdvk: + mov eax,[dir_temp_counter] + mov edi,[sort_counter] + test eax,eax + je .end + cmp eax,edi + jbe .end + call multiple_304 +; imul edi,304 + mov ecx,edi + mov edi,[dir_temp_counter] + add edi,2 + call multiple_304 +; imul edi,304 + mov eax,ecx + mov ebx,[esp+12+4] + add edi,ebx + mov edx,[appl_memory] + cmp edi,edx + jbe @f + mov edi,edx +@@: + mov esi,edi + sub esi,304 + mov ecx,edi + sub ecx,ebx + sub ecx,eax + shr ecx,2 + std + rep movsd + +; mov eax,ecx +; mov ebx,304 +; mov edx,0 +; div ebx +; mov ecx,eax +; sub ecx,2 +; mov eax,[appl_memory] +; mov [temp_ecx],edi +; mov [temp_ebx],esi +; mov [temp_eax],eax +; pusha +; call draw_window +; mcall 5,300 +; popa +; sub edi,303 +; sub esi,303 +;@@: +; push ecx esi edi +; call move_bdvk_1 +; pop edi esi ecx +; sub edi,304 +; sub esi,304 +; dec ecx +; jnz @b +.end: + ret +;--------------------------------------------------------------------- +search_extension_start: + mov edx,esi + xor eax,eax +@@: + cld + lodsb + test eax,eax + jnz @b + dec esi + dec edx + push esi +@@: + std + lodsb + cmp esi,edx + je .end + cmp al,'.' + jnz @b + add esi,2 + pop ebx + ret +.end: + pop esi + mov ebx,esi + ret +;--------------------------------------------------------------------- +right_sort_files: + mov eax,[right_folder_data] + add eax,32+40 + cmp [eax],word '..' + jne @f + cmp [eax+2],byte 0 + jne @f + add [right_folder_data],304 + dec [right_folder_block] + mov [exit_to_dir],1 +@@: +; add memory for sorting + mov ecx,[appl_memory] + push ecx + sub ecx,[right_folder_data] + add ecx,[esp] + mov [appl_memory],ecx + mcall 64,1 + mov edi,[esp] + mov ecx,[appl_memory] + sub ecx,edi + shr ecx,2 + mov eax,0xffffffff + cld + rep stosd + cmp [right_sort_flag],0 + je right_name_sort + cmp [right_sort_flag],1 + je right_type_sort + jmp right_size_date_sort +.move_sorted_file: +; move sorted file area in folder area + mov esi,[esp] + mov ecx,esi + mov edi,[right_folder_data] + add edi,32 + sub ecx,edi + shr ecx,2 + cld + rep movsd + cmp [exit_to_dir],0 + je @f + sub [right_folder_data],304 + inc [right_folder_block] + mov [exit_to_dir],0 +@@: +; sub memory for sorting + pop ecx + mov [appl_memory],ecx + mcall 64,1 + ret +;--------------------------------------------------------------------- +right_name_sort: +; sorting of files + call prepare_data_1 + call right_name_sort_1 + call prepare_data_2 + call right_name_sort_1 +.1: + call prepare_data_4 + jmp right_sort_files.move_sorted_file +right_name_sort_1: + xor ebp,ebp +.copy_folders: + call copy_folders_2 + je .file + test [esi],byte 0x10 + jz .continue + jmp @f +.file: + test [esi],byte 0x10 + jnz .continue +@@: + call prepare_data_3 +.start: + push esi edi + call sort_by_name.start + jae .add_counter +.no_add_counter: + call move_area_for_bdvk + pop edi esi + jmp .end +.add_counter: + inc [sort_counter] + pop edi esi + call add_counter + jae .start +.end: + call move_bdvk +.continue: + inc ebp + cmp ebp,[right_folder_block] + jb .copy_folders + ret +;--------------------------------------------------------------------- +right_type_sort: +; sorting of files + call right_prepare_extension_start_1 + call prepare_data_1 + call right_type_sort_1 + call prepare_data_2 + call right_type_sort_1 + jmp right_name_sort.1 +right_type_sort_1: + xor ebp,ebp +.copy_folders: + call copy_folders_2 + je .file + test [esi],byte 0x10 + jz .continue + jmp @f +.file: + test [esi],byte 0x10 + jnz .continue +@@: + call prepare_data_3 +.start: + push esi edi + cmp [dir_or_file],1 + je @f + call prepare_data_5 +@@: + call sort_by_name.start + je .1 + ja .add_counter +.no_add_counter: + call move_area_for_bdvk + pop edi esi + jmp .end +.1: + cmp [dir_or_file],1 + je .add_counter + call sort_by_name + jbe .no_add_counter +.add_counter: + inc [sort_counter] + pop edi esi + call add_counter + jae .start +.end: + call move_bdvk +.continue: + inc ebp + cmp ebp,[right_folder_block] + jb .copy_folders + ret +;--------------------------------------------------------------------- +right_size_date_sort: +; sorting of files + call prepare_data_1 + call right_size_date_sort_1 + call prepare_data_2 + call right_size_date_sort_1 + jmp right_name_sort.1 +right_size_date_sort_1: + xor ebp,ebp +.copy_folders: + call copy_folders_2 + je .file + test [esi],byte 0x10 + jz .continue + jmp @f +.file: + test [esi],byte 0x10 + jnz .continue +@@: + call prepare_data_3 +.start: + push esi edi + cmp [right_sort_flag],2 + je .size_sort + call sort_by_date + je .1 + ja .add_counter + jmp .no_add_counter +.size_sort: + cmp [dir_or_file],0 + je .file_1 + call sort_by_name.start + jmp @f +.file_1: + call sort_by_size +@@: + jae .add_counter +.no_add_counter: + call move_area_for_bdvk + pop edi esi + jmp .end +.1: + call sort_by_name.start + jbe .no_add_counter +.add_counter: + inc [sort_counter] + pop edi esi + call add_counter + jae .start +.end: + call move_bdvk +.continue: + inc ebp + cmp ebp,[right_folder_block] + jb .copy_folders + ret +;--------------------------------------------------------------------- diff --git a/programs/fs/kfm/trunk/text.inc b/programs/fs/kfm/trunk/text.inc new file mode 100644 index 0000000000..14fc8d9ab4 --- /dev/null +++ b/programs/fs/kfm/trunk/text.inc @@ -0,0 +1,203 @@ +header db 'KFM - Kolibri File Manager v0.47b',0 +;--------------------------------------------------------------------- +fbutton_name: + .f1 db '1 Help',0 + .f2 db '2',0 + .f3 db '3 View',0 + .f4 db '4 Edit',0 + .f5 db '5 Copy',0 + .f6 db '6 Move',0 + .f7 db '7 Dir',0 + .f8 db '8 Del',0 + .f9 db '9',0 + .f10 db '10',0 + .f11 db '11',0 + .f12 db '12 Exit',0 +;--------------------------------------------------------------------- +fbutton_name_shift: + .f1 db '1',0 + .f2 db '2',0 + .f3 db '3',0 + .f4 db '4',0 + .f5 db '5',0 + .f6 db '6',0 + .f7 db '7',0 + .f8 db '8',0 + .f9 db '9',0 + .f10 db '10',0 + .f11 db '11',0 + .f12 db '12',0 +;--------------------------------------------------------------------- +fbutton_name_ctrl: + .f1 db '1',0 + .f2 db '2',0 + .f3 db '3 Name',0 + .f4 db '4 Type',0 + .f5 db '5 Size',0 + .f6 db '6 Date',0 + .f7 db '7',0 + .f8 db '8',0 + .f9 db '9',0 + .f10 db '10',0 + .f11 db '11',0 + .f12 db '12',0 +;--------------------------------------------------------------------- +fbutton_name_alt: + .f1 db '1 Left',0 + .f2 db '2 Right',0 + .f3 db '3',0 + .f4 db '4',0 + .f5 db '5',0 + .f6 db '6',0 + .f7 db '7',0 + .f8 db '8',0 + .f9 db '9',0 + .f10 db '10',0 + .f11 db '11',0 + .f12 db '12',0 +;--------------------------------------------------------------------- +;device_present_name: +; .rd db 'rd ',0 +; .fd db 'fd ',0 +; .hd0 db 'hd0',0 +; .hd1 db 'hd1',0 +; .hd2 db 'hd2',0 +; .hd3 db 'hd3',0 +; .cd0 db 'cd0',0 +; .cd1 db 'cd1',0 +; .cd2 db 'cd2',0 +; .cd3 db 'cd3',0 +;--------------------------------------------------------------------- +read_folder_device_name: + .rd db 'rd',0 + .fd db 'fd',0 + .hd0 db 'hd0',0 + .hd1 db 'hd1',0 + .hd2 db 'hd2',0 + .hd3 db 'hd3',0 + .cd0 db 'cd0',0 + .cd1 db 'cd1',0 + .cd2 db 'cd2',0 + .cd3 db 'cd3',0 +;--------------------------------------------------------------------- +select_disk_char: + db '/',0 +;--------------------------------------------------------------------- +truncated_filename_char db '..' +;--------------------------------------------------------------------- +sort_button_name: + .name db 'Name' + .type db 'Type' + .size db 'Size' + .date db 'Date' +;--------------------------------------------------------------------- +type_table: + db ' ' +;--------------------------------------------------------------------- +size_table: + db '1023b ' +;--------------------------------------------------------------------- +date_table: + db ' . . 22:00 ' +;--------------------------------------------------------------------- +year_table: + db ' ' +;--------------------------------------------------------------------- +ini_file_name: + db 'kfm.ini',0 +;--------------------------------------------------------------------- +icons_file_name: + db 'icons.bmp',0 +;--------------------------------------------------------------------- +buttons_file_name: + db 'buttons.bmp',0 +;--------------------------------------------------------------------- +error_type: + db 'File system error',0 +;--------------------------------------------------------------------- +delete_type: + db 'Delete file(s)',0 +;--------------------------------------------------------------------- +copy_type: + db ' Copy files',0 +;--------------------------------------------------------------------- +copy_type_1: + db 'Copy file',0 +;--------------------------------------------------------------------- +move_type: + db ' Move files',0 +;--------------------------------------------------------------------- +move_type_1: + db 'Move file',0 +;--------------------------------------------------------------------- +create_dir: + db 'Create directory',0 +;--------------------------------------------------------------------- +exit_type: + db ' Exit?',0 +;--------------------------------------------------------------------- +type_yes: + db 'Yes',0 +;--------------------------------------------------------------------- +type_no: + db 'No',0 +;--------------------------------------------------------------------- +type_location: + db 'Location:',0 +;--------------------------------------------------------------------- +type_file_name: + db 'File name:',0 +;--------------------------------------------------------------------- +type_dir_name: + db 'Dir. name:',0 +;--------------------------------------------------------------------- +type_files: + db 'Files:',0 +;--------------------------------------------------------------------- +type_dir: + db 'Dir.:',0 +;--------------------------------------------------------------------- +type_size: + db 'Size:',0 +;--------------------------------------------------------------------- +mouse_left_panel: + db 'Left ',0 +mouse_right_panel: + db 'Right',0 +mouse_other_panel: + db 'Other',0 +;--------------------------------------------------------------------- +type_of: + db 'of',0 +;--------------------------------------------------------------------- +help_file_name: + db 'kfm_keys.txt',0 +;--------------------------------------------------------------------- +;initiation file tags +start_line: + db 13,10 +files_associations: + db '<>files_associations',13,10 +files_associations_1: + db '<>files_association1',13,10 +icons_associations: + db '<>icons_associations',13,10 +end_section_tag: + db '<>end',13,10 +;--------------------------------------------------------------------- +;open file parameters +background_tile: + db '\T ' +background_stretch: + db '\S ' +;--------------------------------------------------------------------- +copy_editboxes: +create_editboxes: +edit1 edit_box 150,10,10,0xffffff,0xbbddff,0,0,0,255,create_dir_name,ed_focus+ed_always_focus,0 +copy_editboxes_end: +create_editboxes_end: +;--------------------------------------------------------------------- +;copy_editboxes: +;edit2 edit_box 150,10,10,0xffffff,0,0,0,0,255,create_dir_name,ed_focus,0 +;copy_editboxes_end: +;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/tran_ini.inc b/programs/fs/kfm/trunk/tran_ini.inc new file mode 100644 index 0000000000..2c9d1b1b14 --- /dev/null +++ b/programs/fs/kfm/trunk/tran_ini.inc @@ -0,0 +1,186 @@ +;--------------------------------------------------------------------- +get_icon_number: + mov ebp,[extension_size] ;[icons_end_tag] + mov edx,[icons_end_tag] + mov edi,[ini_file_start] + dec edi +.search_association: + cmp edx,edi + jbe .end + mov esi,[extension_start] + mov ecx,ebp + test ecx,ecx + je @f + sub ecx,2 +@@: + inc edi + mov ebx,edi + cld + rep cmpsb + mov edi,ebx + jne .search_association + mov esi,edi + add esi,ebp + test ebp,ebp + je @f + sub esi,2 +@@: + cmp [esi],byte ' ' + jne .search_association + inc esi + xor ebx,ebx + call .calculate + imul eax,1000 + call .calculate_1 + imul eax,100 + call .calculate_1 + imul eax,10 + call .calculate_1 + add ebx,eax + ret +.end: + mov ebx,2 + ret +;--------------------------------------------------------------------- +.calculate_1: + add ebx,eax +.calculate: + xor eax,eax + cld + lodsb + sub eax,0x30 + ret +;--------------------------------------------------------------------- +open_file_with_appl_1: + mov ebp,files_associations_1 + jmp open_file_with_appl.1 +;--------------------------------------------------------------------- +open_file_with_appl: +; edx - start file name +; esi - start extension + mov ebp,files_associations +.1: + mov [extension_start],esi + call search_star_and_end_tags + cmp ebp,-1 + je .end +.search_association: + cmp [end_tag],edi + jbe .end + mov esi,[extension_start] ;extension_temp_area + mov ecx,[extension_size] + inc edi + cld + push edi + rep cmpsb + pop edi + jne .search_association + push esi + mov esi,edi + add esi,[extension_size] ;4 + cmp [esi],byte ' ' + je @f + pop esi + jmp .search_association +@@: + add esp,4 + inc esi + mov edi,file_name ;start_file_data.name + xor eax,eax +@@: + cld + lodsb + stosb + cmp al,' ' + cmp al,13 + jnz @b + mov [edi-1],byte 0 ;'#' + cmp [use_patch],0 + je @f + mov [use_patch],0 + jmp .continue +@@: + cmp [select_panel_counter],0 + jne @f + mov esi,read_folder_name ;read_folder.name + jmp .start +@@: + mov esi,read_folder_1_name ;read_folder_1.name +.start: + mov edi,start_parameter + cmp [open_param],0 + je .start_1 + mov eax,[open_param] + mov eax,[eax] + cld + stosd +; call draw_window +; mov eax,0 +; ret +.start_1: + xor eax,eax +@@: + cld + lodsb + stosb + test eax,eax + jnz @b + mov [edi-1], byte '/' + mov esi,edx + mov [error_pointer],edx ;start_file_data.name +@@: + cld + lodsb + stosb + test eax,eax + jnz @b +.continue: + mov [start_file_data.param],start_parameter + call start_appl + cmp eax,0 + jge @f + mov ebx,0 + sub ebx,eax + mov eax,ebx + call start_error_window_thread +@@: + mov eax,0 + ret +.end: + mov eax,1 + ret +;--------------------------------------------------------------------- +search_star_and_end_tags: + mov edi,[ini_file_start] + dec edi +.search_tag1: + cmp [left_folder_data],edi + jbe .end + mov esi,ebp + mov ecx,22 + inc edi + cld + push edi + rep cmpsb + pop edi + jne .search_tag1 + dec edi + push edi +.search_end_tag: + cmp [left_folder_data],edi + jbe .end + mov esi,end_section_tag + mov ecx,7 + inc edi + cld + push edi + rep cmpsb + pop edi + jne .search_end_tag + mov [end_tag],edi + pop edi + ret +.end: + mov ebp,-1 + ret +;--------------------------------------------------------------------- \ No newline at end of file