forked from KolibriOS/kolibrios
KFM: use build-in icons
git-svn-id: svn://kolibrios.org@7996 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
7a6c5c33a6
commit
717f2f2b9f
@ -30,7 +30,6 @@ img_files = {
|
|||||||
{"DEVELOP/T_EDIT.INI", PROGS .. "/other/t_edit/t_edit.ini"},
|
{"DEVELOP/T_EDIT.INI", PROGS .. "/other/t_edit/t_edit.ini"},
|
||||||
{"File Managers/ICONS.INI", "common/File Managers/icons.ini"},
|
{"File Managers/ICONS.INI", "common/File Managers/icons.ini"},
|
||||||
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
|
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
|
||||||
{"File Managers/ICONS.BMP", PROGS .. "/fs/kfm/trunk/icons.bmp"},
|
|
||||||
{"File Managers/FNAV/ABOUT.TXT", "common/File Managers/fNav/About.txt"},
|
{"File Managers/FNAV/ABOUT.TXT", "common/File Managers/fNav/About.txt"},
|
||||||
{"File Managers/FNAV/FNAV", "common/File Managers/fNav/fNav.kex"},
|
{"File Managers/FNAV/FNAV", "common/File Managers/fNav/fNav.kex"},
|
||||||
{"File Managers/FNAV/FNAV.EXT", "common/File Managers/fNav/fnav.ext"},
|
{"File Managers/FNAV/FNAV.EXT", "common/File Managers/fNav/fnav.ext"},
|
||||||
|
@ -4,8 +4,8 @@ hscrl_capt dd -1
|
|||||||
body_capt dd -1
|
body_capt dd -1
|
||||||
s_status dd 0
|
s_status dd 0
|
||||||
lineHeight dd LINEH
|
lineHeight dd LINEH
|
||||||
charWidth dd 6
|
charWidth dd 8
|
||||||
scale db 0
|
scale db 0x10
|
||||||
ins_mode db 1
|
ins_mode db 1
|
||||||
|
|
||||||
sz app_fasm ,'/rd/1/develop/fasm',0
|
sz app_fasm ,'/rd/1/develop/fasm',0
|
||||||
|
@ -52,7 +52,7 @@ ASEPC = '-' ; separator character (char)
|
|||||||
ATOPH = 19 ; menu bar height (pixels)
|
ATOPH = 19 ; menu bar height (pixels)
|
||||||
SCRLW = 16 ; scrollbar widht/height (pixels)
|
SCRLW = 16 ; scrollbar widht/height (pixels)
|
||||||
ATABW = 8 ; tab key indent width (chars)
|
ATABW = 8 ; tab key indent width (chars)
|
||||||
LINEH = 10 ; line height (pixels)
|
LINEH = 16+1 ; line height (pixels)
|
||||||
PATHL = 256 ; maximum path length (chars) !!! don't change !!!
|
PATHL = 256 ; maximum path length (chars) !!! don't change !!!
|
||||||
AMINS = 8 ; minimal scroll thumb size (pixels)
|
AMINS = 8 ; minimal scroll thumb size (pixels)
|
||||||
LCHGW = 3 ; changed/saved marker width (pixels)
|
LCHGW = 3 ; changed/saved marker width (pixels)
|
||||||
|
@ -1620,22 +1620,22 @@ endp
|
|||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
proc key.ctrl_plus ;///// ZOOM IN //////////////////////////////
|
proc key.ctrl_plus ;///// ZOOM IN //////////////////////////////
|
||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
cmp [scale],7
|
cmp [scale],0x17
|
||||||
jz @f
|
jz @f
|
||||||
inc [scale]
|
inc [scale]
|
||||||
add [lineHeight],LINEH
|
add [lineHeight], LINEH
|
||||||
add [charWidth],6
|
add [charWidth], 8
|
||||||
jmp draw_editor
|
jmp draw_editor
|
||||||
endp
|
endp
|
||||||
|
|
||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
proc key.ctrl_minus ;///// ZOOM OUT ////////////////////////////
|
proc key.ctrl_minus ;///// ZOOM OUT ////////////////////////////
|
||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
cmp [scale],0
|
cmp [scale],0x10
|
||||||
jz @f
|
jz @f
|
||||||
dec [scale]
|
dec [scale]
|
||||||
sub [lineHeight],LINEH
|
sub [lineHeight], LINEH
|
||||||
sub [charWidth],6
|
sub [charWidth], 8
|
||||||
jmp draw_editor
|
jmp draw_editor
|
||||||
@@:
|
@@:
|
||||||
ret
|
ret
|
||||||
|
@ -1,375 +1,388 @@
|
|||||||
diff16 'tp-mouse.asm',0,$
|
diff16 'tp-mouse.asm',0,$
|
||||||
|
|
||||||
proc check_mouse_in_edit_area
|
proc check_mouse_in_edit_area
|
||||||
mcall 37,1
|
mcall 37,1
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
and ebx,0x0000FFFF
|
and ebx,0x0000FFFF
|
||||||
shr eax,16
|
shr eax,16
|
||||||
mov ecx,[cur_editor.Bounds.Top]
|
mov ecx,[cur_editor.Bounds.Top]
|
||||||
inc ecx
|
inc ecx
|
||||||
pushd [cur_editor.Bounds.Left] ecx [cur_editor.Bounds.Right] ecx
|
pushd [cur_editor.Bounds.Left] ecx [cur_editor.Bounds.Right] ecx
|
||||||
popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0]
|
popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0]
|
||||||
sub [__rc+0x8],SCRLW+6
|
sub [__rc+0x8],SCRLW+6
|
||||||
mov ecx,[cur_editor.Gutter.Width]
|
mov ecx,[cur_editor.Gutter.Width]
|
||||||
add [__rc+0x0],ecx
|
add [__rc+0x0],ecx
|
||||||
mov ecx,[lines.scr]
|
mov ecx,[lines.scr]
|
||||||
imul ecx,[lineHeight]
|
imul ecx,[lineHeight]
|
||||||
dec ecx
|
dec ecx
|
||||||
add [__rc+0xC],ecx
|
add [__rc+0xC],ecx
|
||||||
mov ecx,__rc
|
mov ecx,__rc
|
||||||
call pt_in_rect
|
call pt_in_rect
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
proc get_mouse_event
|
proc get_mouse_event
|
||||||
mcall 37,2
|
mcall 37,2
|
||||||
and al,3
|
and al,3
|
||||||
mov bl,[ecx]
|
mov bl,[ecx]
|
||||||
cmp [ecx],al
|
cmp [ecx],al
|
||||||
mov [ecx],al
|
mov [ecx],al
|
||||||
jne @f
|
jne @f
|
||||||
mcall 37,7
|
mcall 37,7
|
||||||
or eax,eax
|
or eax,eax
|
||||||
jz .mv
|
jz .mv
|
||||||
add [ecx+6],ax
|
add [ecx+6],ax
|
||||||
shr eax,16
|
shr eax,16
|
||||||
add [ecx+4],ax
|
add [ecx+4],ax
|
||||||
mov eax,MEV_WHEEL
|
mov eax,MEV_WHEEL
|
||||||
ret
|
ret
|
||||||
.mv: mov eax,MEV_MOVE
|
.mv: mov eax,MEV_MOVE
|
||||||
ret
|
ret
|
||||||
@@: mov bh,al
|
@@: mov bh,al
|
||||||
and ebx,0x0101
|
and ebx,0x0101
|
||||||
cmp bl,bh
|
cmp bl,bh
|
||||||
je .rb
|
je .rb
|
||||||
test al,1
|
test al,1
|
||||||
jz @f
|
jz @f
|
||||||
mov eax,MEV_LDOWN
|
mov eax,MEV_LDOWN
|
||||||
ret
|
ret
|
||||||
@@: mov eax,MEV_LUP
|
@@: mov eax,MEV_LUP
|
||||||
ret
|
ret
|
||||||
.rb: test al,2
|
.rb: test al,2
|
||||||
jz @f
|
jz @f
|
||||||
mov eax,MEV_RDOWN
|
mov eax,MEV_RDOWN
|
||||||
ret
|
ret
|
||||||
@@: mov eax,MEV_RUP
|
@@: mov eax,MEV_RUP
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
mouse_ev dd mouse.l_down,mouse.l_up,mouse.r_down,mouse.r_up,mouse.wheel,mouse.move
|
mouse_ev dd mouse.l_down,mouse.l_up,mouse.r_down,mouse.r_up,mouse.wheel,mouse.move
|
||||||
|
|
||||||
mouse:
|
mouse:
|
||||||
|
|
||||||
mcall 9,p_info,-1
|
mcall 9,p_info,-1
|
||||||
|
|
||||||
mov eax,[p_info+70] ;status of window
|
mov eax,[p_info+70] ;status of window
|
||||||
test eax,100b
|
test eax,100b
|
||||||
jne still.skip_write
|
jne still.skip_write
|
||||||
|
|
||||||
mov ecx,mst
|
mov ecx,mst
|
||||||
call get_mouse_event
|
call get_mouse_event
|
||||||
cmp [bot_mode],0
|
cmp [bot_mode],0
|
||||||
je @f
|
je @f
|
||||||
mov ah,al
|
mov ah,al
|
||||||
mov al,4
|
mov al,4
|
||||||
call [bot_dlg_handler]
|
call [bot_dlg_handler]
|
||||||
jmp still.skip_write
|
jmp still.skip_write
|
||||||
@@: cmp al,MEV_MOVE
|
@@: cmp al,MEV_MOVE
|
||||||
jne .no_move
|
jne .no_move
|
||||||
cmp [popup_active],1
|
cmp [popup_active],1
|
||||||
je @f
|
je @f
|
||||||
.no_move:
|
.no_move:
|
||||||
mov [s_status],0
|
mov [s_status],0
|
||||||
|
|
||||||
push eax
|
push eax
|
||||||
mcall 9,p_info,-1
|
mcall 9,p_info,-1
|
||||||
cmp ax,[p_info.window_stack_position]
|
cmp ax,[p_info.window_stack_position]
|
||||||
pop eax
|
pop eax
|
||||||
jne still.skip_write
|
jne still.skip_write
|
||||||
@@:
|
@@:
|
||||||
;!!! cmp [just_from_popup],0
|
;!!! cmp [just_from_popup],0
|
||||||
;!!! je @f
|
;!!! je @f
|
||||||
;!!! cmp al,MEV_LUP
|
;!!! cmp al,MEV_LUP
|
||||||
;!!! jne still.skip_write
|
;!!! jne still.skip_write
|
||||||
@@: mov [mev],al
|
@@: mov [mev],al
|
||||||
jmp [mouse_ev+eax*4-4]
|
jmp [mouse_ev+eax*4-4]
|
||||||
|
|
||||||
.wheel:
|
.wheel:
|
||||||
movsx eax,word[mst+4]
|
test [shi], 0x0C ; left or right ctrl key pressed
|
||||||
lea eax,[eax*3]
|
jnz .wheel_ctrl
|
||||||
add [cur_editor.TopLeft.X],eax
|
movsx eax,word[mst+4]
|
||||||
movsx eax,word[mst+6]
|
lea eax,[eax*3]
|
||||||
lea eax,[eax*3]
|
add [cur_editor.TopLeft.X],eax
|
||||||
add [cur_editor.TopLeft.Y],eax
|
movsx eax,word[mst+6]
|
||||||
xor eax,eax
|
lea eax,[eax*3]
|
||||||
mov [mst+4],eax
|
add [cur_editor.TopLeft.Y],eax
|
||||||
call check_bottom_right
|
xor eax,eax
|
||||||
call draw_editor
|
mov [mst+4],eax
|
||||||
jmp still.skip_write
|
call check_bottom_right
|
||||||
|
call draw_editor
|
||||||
|
jmp still.skip_write
|
||||||
|
|
||||||
|
.wheel_ctrl:
|
||||||
|
cmp word[mst+6], 0 ; vertical scroll?
|
||||||
|
je still.skip_write
|
||||||
|
test word[mst+6], 0x8000 ; scroll up or down?
|
||||||
|
jnz .wheel_ctrl_down
|
||||||
|
call key.ctrl_plus ; zoom in
|
||||||
|
jmp still.skip_write
|
||||||
|
.wheel_ctrl_down:
|
||||||
|
call key.ctrl_minus ; zoom out
|
||||||
|
jmp still.skip_write
|
||||||
|
|
||||||
.move:
|
.move:
|
||||||
mcall 37,1
|
mcall 37,1
|
||||||
movsx ebx,ax
|
movsx ebx,ax
|
||||||
sar eax,16
|
sar eax,16
|
||||||
cmp [body_capt],0
|
cmp [body_capt],0
|
||||||
jge .check_body.2
|
jge .check_body.2
|
||||||
cmp [vscrl_capt],0
|
cmp [vscrl_capt],0
|
||||||
jge .check_vscroll.2
|
jge .check_vscroll.2
|
||||||
cmp [hscrl_capt],0
|
cmp [hscrl_capt],0
|
||||||
jge .check_hscroll.2
|
jge .check_hscroll.2
|
||||||
|
|
||||||
cmp [do_not_draw],0
|
cmp [do_not_draw],0
|
||||||
jne still.skip_write
|
jne still.skip_write
|
||||||
mov eax,[mi_cur]
|
mov eax,[mi_cur]
|
||||||
call get_active_menu_item
|
call get_active_menu_item
|
||||||
cmp eax,[mi_cur]
|
cmp eax,[mi_cur]
|
||||||
je still.skip_write
|
je still.skip_write
|
||||||
push [mi_cur]
|
push [mi_cur]
|
||||||
cmp [popup_active],0
|
cmp [popup_active],0
|
||||||
je @f
|
je @f
|
||||||
mov [mi_cur],eax
|
mov [mi_cur],eax
|
||||||
@@: call draw_main_menu
|
@@: call draw_main_menu
|
||||||
pop [mi_cur]
|
pop [mi_cur]
|
||||||
cmp [popup_active],0
|
cmp [popup_active],0
|
||||||
je still.skip_write
|
je still.skip_write
|
||||||
mov ecx,[mi_cur]
|
mov ecx,[mi_cur]
|
||||||
or ecx,ecx
|
or ecx,ecx
|
||||||
js still.skip_write
|
js still.skip_write
|
||||||
mov eax,[main_menu.popups+ecx*4-4]
|
mov eax,[main_menu.popups+ecx*4-4]
|
||||||
mov edx,main_menu
|
mov edx,main_menu
|
||||||
call dword[main_menu.onshow+ecx*4-4]
|
call dword[main_menu.onshow+ecx*4-4]
|
||||||
call setup_main_menu_popup
|
call setup_main_menu_popup
|
||||||
mcall 60,2,[h_popup],POPUP_STACK,4
|
mcall 60,2,[h_popup],POPUP_STACK,4
|
||||||
|
|
||||||
call draw_main_menu
|
call draw_main_menu
|
||||||
|
|
||||||
jmp still.skip_write
|
jmp still.skip_write
|
||||||
|
|
||||||
|
|
||||||
.r_down:
|
.r_down:
|
||||||
@@: cmp [popup_active],0
|
@@: cmp [popup_active],0
|
||||||
je @f
|
je @f
|
||||||
mcall 5,1
|
mcall 5,1
|
||||||
jmp @b
|
jmp @b
|
||||||
@@: cmp [mouse_captured],0
|
@@: cmp [mouse_captured],0
|
||||||
jne still.skip_write
|
jne still.skip_write
|
||||||
call check_mouse_in_edit_area
|
call check_mouse_in_edit_area
|
||||||
jnc still.skip_write
|
jnc still.skip_write
|
||||||
mcall 37,0
|
mcall 37,0
|
||||||
mov [mm.Edit+POPUP.pos],eax
|
mov [mm.Edit+POPUP.pos],eax
|
||||||
@@: mcall 37,2
|
@@: mcall 37,2
|
||||||
cmp eax,ebx
|
cmp eax,ebx
|
||||||
jnz @f
|
jnz @f
|
||||||
mcall 5,1
|
mcall 5,1
|
||||||
jmp @b
|
jmp @b
|
||||||
@@: and [mst],0xFD
|
@@: and [mst],0xFD
|
||||||
call onshow.edit
|
call onshow.edit
|
||||||
mov dword[POPUP_STACK],mm.Edit
|
mov dword[POPUP_STACK],mm.Edit
|
||||||
mcall 51,1,popup_thread_start,POPUP_STACK
|
mcall 51,1,popup_thread_start,POPUP_STACK
|
||||||
mov [h_popup],eax
|
mov [h_popup],eax
|
||||||
jmp still.skip_write
|
jmp still.skip_write
|
||||||
|
|
||||||
.r_up:
|
.r_up:
|
||||||
jmp still.skip_write
|
jmp still.skip_write
|
||||||
|
|
||||||
.l_down:
|
.l_down:
|
||||||
call check_mouse_in_edit_area
|
call check_mouse_in_edit_area
|
||||||
jnc .check_vscroll
|
jnc .check_vscroll
|
||||||
mov [mouse_captured],1
|
mov [mouse_captured],1
|
||||||
mov [body_capt],1
|
mov [body_capt],1
|
||||||
|
|
||||||
call clear_selection
|
call clear_selection
|
||||||
|
|
||||||
.check_body.2:
|
.check_body.2:
|
||||||
sub eax,[cur_editor.Bounds.Left]
|
sub eax,[cur_editor.Bounds.Left]
|
||||||
sub ebx,[cur_editor.Bounds.Top]
|
sub ebx,[cur_editor.Bounds.Top]
|
||||||
sub eax,[cur_editor.Gutter.Width]
|
sub eax,[cur_editor.Gutter.Width]
|
||||||
sub eax,LCHGW
|
sub eax,LCHGW
|
||||||
sub ebx,2
|
sub ebx,2
|
||||||
push eax
|
push eax
|
||||||
mov eax,ebx
|
mov eax,ebx
|
||||||
cdq
|
cdq
|
||||||
mov ecx,[lineHeight]
|
mov ecx,[lineHeight]
|
||||||
idiv ecx
|
idiv ecx
|
||||||
@@: add eax,[cur_editor.TopLeft.Y]
|
@@: add eax,[cur_editor.TopLeft.Y]
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
pop eax
|
pop eax
|
||||||
cdq
|
cdq
|
||||||
mov ecx,[charWidth]
|
mov ecx,[charWidth]
|
||||||
idiv ecx
|
idiv ecx
|
||||||
@@: add eax,[cur_editor.TopLeft.X]
|
@@: add eax,[cur_editor.TopLeft.X]
|
||||||
mov ecx, ebx
|
mov ecx, ebx
|
||||||
call get_line_offset
|
call get_line_offset
|
||||||
cmp eax,[esi]
|
cmp eax,[esi]
|
||||||
jl @f
|
jl @f
|
||||||
mov eax,[esi]
|
mov eax,[esi]
|
||||||
@@: cmp ebx,[cur_editor.Lines.Count]
|
@@: cmp ebx,[cur_editor.Lines.Count]
|
||||||
jl @f
|
jl @f
|
||||||
mov ebx,[cur_editor.Lines.Count]
|
mov ebx,[cur_editor.Lines.Count]
|
||||||
dec ebx
|
dec ebx
|
||||||
@@:
|
@@:
|
||||||
cmp [cur_editor.Caret.X],eax
|
cmp [cur_editor.Caret.X],eax
|
||||||
jne .change_cur_pos
|
jne .change_cur_pos
|
||||||
cmp [cur_editor.Caret.Y],ebx
|
cmp [cur_editor.Caret.Y],ebx
|
||||||
jne .change_cur_pos
|
jne .change_cur_pos
|
||||||
call editor_check_for_changes
|
call editor_check_for_changes
|
||||||
jmp still.skip_write
|
jmp still.skip_write
|
||||||
|
|
||||||
.change_cur_pos:
|
.change_cur_pos:
|
||||||
mov [cur_editor.Caret.X],eax
|
mov [cur_editor.Caret.X],eax
|
||||||
mov [cur_editor.Caret.Y],ebx
|
mov [cur_editor.Caret.Y],ebx
|
||||||
call editor_check_for_changes
|
call editor_check_for_changes
|
||||||
jmp still
|
jmp still
|
||||||
|
|
||||||
.check_vscroll:
|
.check_vscroll:
|
||||||
mov ecx,[cur_editor.Bounds.Right]
|
mov ecx,[cur_editor.Bounds.Right]
|
||||||
sub ecx,SCRLW-1
|
sub ecx,SCRLW-1
|
||||||
pushd ecx [cur_editor.Bounds.Top] ecx [cur_editor.Bounds.Bottom]
|
pushd ecx [cur_editor.Bounds.Top] ecx [cur_editor.Bounds.Bottom]
|
||||||
popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0]
|
popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0]
|
||||||
add [__rc+0x8],SCRLW-2
|
add [__rc+0x8],SCRLW-2
|
||||||
add [__rc+0x4],SCRLW-1
|
add [__rc+0x4],SCRLW-1
|
||||||
sub [__rc+0xC],SCRLW*2+1
|
sub [__rc+0xC],SCRLW*2+1
|
||||||
mov ecx,__rc
|
mov ecx,__rc
|
||||||
call pt_in_rect
|
call pt_in_rect
|
||||||
jnc .check_hscroll
|
jnc .check_hscroll
|
||||||
|
|
||||||
.check_vscroll.2:
|
.check_vscroll.2:
|
||||||
sub ebx,[cur_editor.Bounds.Top]
|
sub ebx,[cur_editor.Bounds.Top]
|
||||||
sub ebx,SCRLW
|
sub ebx,SCRLW
|
||||||
cmp [vscrl_capt],0
|
cmp [vscrl_capt],0
|
||||||
jge .vcaptured
|
jge .vcaptured
|
||||||
mov eax,[cur_editor.VScroll.Top]
|
mov eax,[cur_editor.VScroll.Top]
|
||||||
cmp ebx,eax
|
cmp ebx,eax
|
||||||
jb .center_vcapture
|
jb .center_vcapture
|
||||||
add eax,[cur_editor.VScroll.Size]
|
add eax,[cur_editor.VScroll.Size]
|
||||||
cmp ebx,eax
|
cmp ebx,eax
|
||||||
jae .center_vcapture
|
jae .center_vcapture
|
||||||
mov eax,ebx
|
mov eax,ebx
|
||||||
sub eax,[cur_editor.VScroll.Top]
|
sub eax,[cur_editor.VScroll.Top]
|
||||||
dec eax
|
dec eax
|
||||||
mov [vscrl_capt],eax
|
mov [vscrl_capt],eax
|
||||||
dec ebx
|
dec ebx
|
||||||
jmp .vcaptured
|
jmp .vcaptured
|
||||||
.center_vcapture:
|
.center_vcapture:
|
||||||
mov eax,[cur_editor.VScroll.Size]
|
mov eax,[cur_editor.VScroll.Size]
|
||||||
shr eax,1
|
shr eax,1
|
||||||
mov [vscrl_capt],eax
|
mov [vscrl_capt],eax
|
||||||
.vcaptured:
|
.vcaptured:
|
||||||
sub ebx,[vscrl_capt]
|
sub ebx,[vscrl_capt]
|
||||||
jns @f
|
jns @f
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
@@: mov [mouse_captured],1
|
@@: mov [mouse_captured],1
|
||||||
mov eax,[cur_editor.Bounds.Bottom]
|
mov eax,[cur_editor.Bounds.Bottom]
|
||||||
sub eax,[cur_editor.Bounds.Top]
|
sub eax,[cur_editor.Bounds.Top]
|
||||||
sub eax,[cur_editor.VScroll.Size]
|
sub eax,[cur_editor.VScroll.Size]
|
||||||
sub eax,SCRLW*3
|
sub eax,SCRLW*3
|
||||||
cmp eax,ebx
|
cmp eax,ebx
|
||||||
jge @f
|
jge @f
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
@@:
|
@@:
|
||||||
mov [cur_editor.VScroll.Top],ebx
|
mov [cur_editor.VScroll.Top],ebx
|
||||||
mov eax,[cur_editor.Lines.Count]
|
mov eax,[cur_editor.Lines.Count]
|
||||||
sub eax,[lines.scr]
|
sub eax,[lines.scr]
|
||||||
imul ebx
|
imul ebx
|
||||||
mov ebx,[cur_editor.Bounds.Bottom]
|
mov ebx,[cur_editor.Bounds.Bottom]
|
||||||
sub ebx,[cur_editor.Bounds.Top]
|
sub ebx,[cur_editor.Bounds.Top]
|
||||||
sub ebx,SCRLW*3
|
sub ebx,SCRLW*3
|
||||||
sub ebx,[cur_editor.VScroll.Size]
|
sub ebx,[cur_editor.VScroll.Size]
|
||||||
idiv ebx
|
idiv ebx
|
||||||
cmp eax,[cur_editor.TopLeft.Y]
|
cmp eax,[cur_editor.TopLeft.Y]
|
||||||
je still.skip_write
|
je still.skip_write
|
||||||
mov [cur_editor.TopLeft.Y],eax
|
mov [cur_editor.TopLeft.Y],eax
|
||||||
call check_bottom_right
|
call check_bottom_right
|
||||||
call draw_editor
|
call draw_editor
|
||||||
jmp still.skip_write
|
jmp still.skip_write
|
||||||
|
|
||||||
.check_hscroll:
|
.check_hscroll:
|
||||||
pushd [cur_editor.Bounds.Left] [cur_editor.Bounds.Bottom] [cur_editor.Bounds.Right] [cur_editor.Bounds.Bottom]
|
pushd [cur_editor.Bounds.Left] [cur_editor.Bounds.Bottom] [cur_editor.Bounds.Right] [cur_editor.Bounds.Bottom]
|
||||||
popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0]
|
popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0]
|
||||||
add [__rc+0x8],-SCRLW*2-1
|
add [__rc+0x8],-SCRLW*2-1
|
||||||
add [__rc+0x4],-SCRLW+1
|
add [__rc+0x4],-SCRLW+1
|
||||||
add [__rc+0xC],-1
|
add [__rc+0xC],-1
|
||||||
add [__rc+0x0],SCRLW+1
|
add [__rc+0x0],SCRLW+1
|
||||||
mov ecx,__rc
|
mov ecx,__rc
|
||||||
call pt_in_rect
|
call pt_in_rect
|
||||||
jnc .check_main_menu
|
jnc .check_main_menu
|
||||||
|
|
||||||
.check_hscroll.2:
|
.check_hscroll.2:
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
sub ebx,SCRLW+1
|
sub ebx,SCRLW+1
|
||||||
sub ebx,[cur_editor.Bounds.Left]
|
sub ebx,[cur_editor.Bounds.Left]
|
||||||
cmp [hscrl_capt],0
|
cmp [hscrl_capt],0
|
||||||
jge .hcaptured
|
jge .hcaptured
|
||||||
mov eax,[cur_editor.HScroll.Top]
|
mov eax,[cur_editor.HScroll.Top]
|
||||||
cmp ebx,eax
|
cmp ebx,eax
|
||||||
jl .center_hcapture
|
jl .center_hcapture
|
||||||
add eax,[cur_editor.HScroll.Size]
|
add eax,[cur_editor.HScroll.Size]
|
||||||
cmp ebx,eax
|
cmp ebx,eax
|
||||||
jge .center_hcapture
|
jge .center_hcapture
|
||||||
mov eax,ebx
|
mov eax,ebx
|
||||||
sub eax,[cur_editor.HScroll.Top]
|
sub eax,[cur_editor.HScroll.Top]
|
||||||
dec eax
|
dec eax
|
||||||
mov [hscrl_capt],eax
|
mov [hscrl_capt],eax
|
||||||
dec ebx
|
dec ebx
|
||||||
jmp .hcaptured
|
jmp .hcaptured
|
||||||
.center_hcapture:
|
.center_hcapture:
|
||||||
mov eax,[cur_editor.HScroll.Size]
|
mov eax,[cur_editor.HScroll.Size]
|
||||||
shr eax,1
|
shr eax,1
|
||||||
mov [hscrl_capt],eax
|
mov [hscrl_capt],eax
|
||||||
.hcaptured:
|
.hcaptured:
|
||||||
sub ebx,[hscrl_capt]
|
sub ebx,[hscrl_capt]
|
||||||
jns @f
|
jns @f
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
@@: mov [mouse_captured],1
|
@@: mov [mouse_captured],1
|
||||||
mov eax,[cur_editor.Bounds.Right]
|
mov eax,[cur_editor.Bounds.Right]
|
||||||
sub eax,[cur_editor.HScroll.Size]
|
sub eax,[cur_editor.HScroll.Size]
|
||||||
sub eax,SCRLW*3+1
|
sub eax,SCRLW*3+1
|
||||||
cmp eax,ebx
|
cmp eax,ebx
|
||||||
jge @f
|
jge @f
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
@@:
|
@@:
|
||||||
mov [cur_editor.HScroll.Top],ebx
|
mov [cur_editor.HScroll.Top],ebx
|
||||||
mov eax,[cur_editor.Columns.Count]
|
mov eax,[cur_editor.Columns.Count]
|
||||||
sub eax,[columns.scr]
|
sub eax,[columns.scr]
|
||||||
imul ebx
|
imul ebx
|
||||||
mov ebx,[cur_editor.Bounds.Right]
|
mov ebx,[cur_editor.Bounds.Right]
|
||||||
sub ebx,SCRLW*3+1
|
sub ebx,SCRLW*3+1
|
||||||
sub ebx,[cur_editor.HScroll.Size]
|
sub ebx,[cur_editor.HScroll.Size]
|
||||||
idiv ebx
|
idiv ebx
|
||||||
cmp eax,[cur_editor.TopLeft.X]
|
cmp eax,[cur_editor.TopLeft.X]
|
||||||
je still.skip_write
|
je still.skip_write
|
||||||
mov [cur_editor.TopLeft.X],eax
|
mov [cur_editor.TopLeft.X],eax
|
||||||
call check_bottom_right
|
call check_bottom_right
|
||||||
call draw_editor
|
call draw_editor
|
||||||
jmp still.skip_write
|
jmp still.skip_write
|
||||||
|
|
||||||
.check_main_menu:
|
.check_main_menu:
|
||||||
cmp [do_not_draw],0
|
cmp [do_not_draw],0
|
||||||
jne .capture_off
|
jne .capture_off
|
||||||
|
|
||||||
@@: mcall 37,2
|
@@: mcall 37,2
|
||||||
test eax,0x01
|
test eax,0x01
|
||||||
jz @f
|
jz @f
|
||||||
mcall 5,1
|
mcall 5,1
|
||||||
jmp @b
|
jmp @b
|
||||||
@@: and [mst],0xFE
|
@@: and [mst],0xFE
|
||||||
|
|
||||||
cmp [mi_cur],0
|
cmp [mi_cur],0
|
||||||
jle .capture_off
|
jle .capture_off
|
||||||
mov ecx,[mi_cur]
|
mov ecx,[mi_cur]
|
||||||
mov eax,[main_menu.popups+ecx*4-4]
|
mov eax,[main_menu.popups+ecx*4-4]
|
||||||
mov edx,main_menu
|
mov edx,main_menu
|
||||||
call dword[main_menu.onshow+ecx*4-4]
|
call dword[main_menu.onshow+ecx*4-4]
|
||||||
call setup_main_menu_popup
|
call setup_main_menu_popup
|
||||||
mcall 51,1,popup_thread_start,POPUP_STACK
|
mcall 51,1,popup_thread_start,POPUP_STACK
|
||||||
mov [h_popup],eax
|
mov [h_popup],eax
|
||||||
|
|
||||||
.l_up:
|
.l_up:
|
||||||
.capture_off:
|
.capture_off:
|
||||||
or eax,-1
|
or eax,-1
|
||||||
mov [vscrl_capt],eax
|
mov [vscrl_capt],eax
|
||||||
mov [hscrl_capt],eax
|
mov [hscrl_capt],eax
|
||||||
mov [body_capt],eax
|
mov [body_capt],eax
|
||||||
mov [mouse_captured],0
|
mov [mouse_captured],0
|
||||||
;!!! mov [just_from_popup],0
|
;!!! mov [just_from_popup],0
|
||||||
jmp still.skip_write
|
jmp still.skip_write
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
@echo lang fix en >lang.inc
|
@echo lang fix en >lang.inc
|
||||||
@fasm -m 16384 kfm.asm kfm
|
@fasm -m 16384 kfm.asm kfm
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@kpack kfm
|
|
||||||
@pause
|
@pause
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 6.3 KiB |
@ -273,4 +273,4 @@ sysopen:
|
|||||||
db '/sys/@open',0
|
db '/sys/@open',0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
buttons_file_data file 'images/buttons.raw'
|
buttons_file_data file 'images/buttons.raw'
|
||||||
;icons_file_data file 'icons.bmp'
|
icons_file_data file 'images/icons.raw'
|
@ -224,11 +224,11 @@ draw_icon:
|
|||||||
|
|
||||||
call get_icon_number
|
call get_icon_number
|
||||||
imul ebx,270
|
imul ebx,270
|
||||||
add ebx,mem
|
add ebx,icons_file_data
|
||||||
jmp .draw
|
jmp .draw
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
.draw_dir_pic:
|
.draw_dir_pic:
|
||||||
mov ebx,mem
|
mov ebx,icons_file_data
|
||||||
cmp [edx],word '..'
|
cmp [edx],word '..'
|
||||||
jne .draw
|
jne .draw
|
||||||
|
|
||||||
|
@ -7,8 +7,6 @@ read_folder_1_error:
|
|||||||
initiation_error:
|
initiation_error:
|
||||||
mov [error_pointer],ini_file_name
|
mov [error_pointer],ini_file_name
|
||||||
jmp error_window
|
jmp error_window
|
||||||
icon_error:
|
|
||||||
mov [error_pointer],icons_file_name
|
|
||||||
error_window:
|
error_window:
|
||||||
mov [file_system_error],eax
|
mov [file_system_error],eax
|
||||||
.red:
|
.red:
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
exit_apl:
|
|
||||||
mov [confirmation_type],exit_type
|
|
||||||
call confirmation_action
|
|
||||||
cmp [work_confirmation_yes],1
|
|
||||||
jne red
|
|
||||||
mcall -1
|
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
BIN
programs/fs/kfm/trunk/images/icons.raw
Normal file
BIN
programs/fs/kfm/trunk/images/icons.raw
Normal file
Binary file not shown.
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
@ -68,7 +68,6 @@ START:
|
|||||||
mov ax,[select_disk_char]
|
mov ax,[select_disk_char]
|
||||||
mov [read_folder_name],ax
|
mov [read_folder_name],ax
|
||||||
mov [read_folder_1_name],ax
|
mov [read_folder_1_name],ax
|
||||||
call load_icon_and_convert_to_img
|
|
||||||
call load_initiation_file
|
call load_initiation_file
|
||||||
call add_memory_for_folders
|
call add_memory_for_folders
|
||||||
call device_detect_f70
|
call device_detect_f70
|
||||||
@ -245,18 +244,6 @@ prepare_load_data_3:
|
|||||||
mov [read_file.size],eax
|
mov [read_file.size],eax
|
||||||
ret
|
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_initiation_file:
|
load_initiation_file:
|
||||||
mov ebx,ini_file_name
|
mov ebx,ini_file_name
|
||||||
call prepare_load_data
|
call prepare_load_data
|
||||||
@ -349,6 +336,13 @@ sub_application_memory:
|
|||||||
mcall 64,1
|
mcall 64,1
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
exit_apl:
|
||||||
|
mov [confirmation_type],exit_type
|
||||||
|
call confirmation_action
|
||||||
|
cmp [work_confirmation_yes],1
|
||||||
|
jne red
|
||||||
|
mcall -1
|
||||||
|
;---------------------------------------------------------------------
|
||||||
include 'key.inc'
|
include 'key.inc'
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
include 'markfile.inc'
|
include 'markfile.inc'
|
||||||
@ -379,8 +373,6 @@ include 'err_wind.inc'
|
|||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
include 'detect.inc'
|
include 'detect.inc'
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
include 'conv_bmp.inc'
|
|
||||||
;---------------------------------------------------------------------
|
|
||||||
include 'tran_ini.inc'
|
include 'tran_ini.inc'
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
include 'help.inc'
|
include 'help.inc'
|
||||||
@ -389,8 +381,6 @@ include 'convchar.inc'
|
|||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
include 'sort.inc'
|
include 'sort.inc'
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
include 'exit.inc'
|
|
||||||
;---------------------------------------------------------------------
|
|
||||||
include 'progrbar.inc'
|
include 'progrbar.inc'
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
include 'scroll.inc'
|
include 'scroll.inc'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
header_text db 'Kolibri File Manager v0.48',0
|
header_text db 'Kolibri File Manager v0.48b',0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
fbutton_name:
|
fbutton_name:
|
||||||
.f1 db '1 Help',0
|
.f1 db '1 Help',0
|
||||||
@ -82,9 +82,6 @@ year_table:
|
|||||||
ini_file_name:
|
ini_file_name:
|
||||||
db 'kfm.ini',0
|
db 'kfm.ini',0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
icons_file_name:
|
|
||||||
db 'icons.bmp',0
|
|
||||||
;---------------------------------------------------------------------
|
|
||||||
error_type:
|
error_type:
|
||||||
db 'File system error',0
|
db 'File system error',0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user