14,11 → 14,9 |
TOOLBAR_ICONS_SIZE equ 1200*20 |
|
include '../../proc32.inc' |
;include '../../config.inc' |
include '../../macros.inc' |
include '../../dll.inc' |
include '../../KOSfuncs.inc' |
include '../../develop/libraries/box_lib/load_lib.mac' |
include '../../load_img.inc' |
include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
include '../../system/skincfg/trunk/kglobals.inc' |
include '../../system/skincfg/trunk/unpacker.inc' |
33,50 → 31,6 |
|
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
|
|
; ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥¨© á ¨á¯®«ì§®¢ ¨¥¬ ¡¨¡«¨®â¥ª¨ libimg.obj |
;¤«ï ¨á¯®«ì§®¢ ¨ï ¬ ªà®á ã¦ë ¯¥à¥¬¥ë¥: |
; - run_file_70 FileInfoBlock |
; - image_data dd 0 |
macro load_image_file path,buf,size |
{ |
;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬ |
if path eqtype '' ;¯à®¢¥à塞 § ¤ «¨ áâப®© ¯ à ¬¥âà path |
jmp @f |
local .path_str |
.path_str db path ;ä®à¬¨à㥬 «®ª «ìãî ¯¥à¥¬¥ãî |
db 0 |
@@: |
;32 - áâ ¤ àâë© ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥ ¡ëâì ¡ãä¥à á á¨áâ¥¬ë¬ ¯ã⥬ |
copy_path .path_str,[32],file_name,0 |
else |
copy_path path,[32],file_name,0 ;ä®à¬¨à㥬 ¯®«ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ® ¢ ®¤®© ¯ ¯ª¥ á ¯à®£à ¬¬®© |
end if |
|
stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥¨ï |
mov [buf],eax |
|
mov [run_file_70.Function], SSF_READ_FILE |
mov [run_file_70.Position], 0 |
mov [run_file_70.Flags], 0 |
mov [run_file_70.Count], dword size |
m2m [run_file_70.Buffer], eax |
mov byte[run_file_70+20], 0 |
mov [run_file_70.FileName], file_name |
mcall SF_FILE,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥¨ï |
cmp ebx,0xffffffff |
je @f |
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_decode], dword[buf],ebx,0 |
mov dword[image_data],eax |
;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥¨¥ ª ä®à¬ âã rgb |
stdcall dword[img_to_rgb2], dword[image_data],dword[buf] |
;㤠«ï¥¬ ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_destroy], dword[image_data] |
@@: |
} |
|
image_data dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì. ¤«ï 㦥 ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï |
icon_tl_sys dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª |
|
align 4 |
190,18 → 144,18 |
stdcall [ksubmenu_add], [main_menu], eax |
|
; init toolbar file |
load_image_file 'te_icon.png', bmp_icon,TOOLBAR_ICONS_SIZE*2 ;㬮¦¥¨¥ 2 ¤«ï á¥àëå ª®¯®ª |
load_image_file 'te_icon.png', bmp_icon,,,6 ;6 ¤«ï á¥àëå ª®¯®ª |
mov eax,[bmp_icon] |
add eax,TOOLBAR_ICONS_SIZE |
stdcall img_to_gray, [bmp_icon],eax,(TOOLBAR_ICONS_SIZE)/3 |
;--------------------------------------------------------------------- |
; ç¨â ¥¬ ä ©« á ªãàá®à ¬¨ ¨ «¨¨ï¬¨ |
load_image_file 'tl_sys_16.png', icon_tl_sys,54+3*256*13 |
load_image_file 'tl_sys_16.png', icon_tl_sys |
mov eax,dword[icon_tl_sys] |
mov dword[tree1.data_img_sys],eax |
;--------------------------------------------------------------------- |
; ç¨â ¥¬ ä ©« á ¨ª®ª ¬¨ 㧫®¢ |
load_image_file 'tl_nod_16.png', icon_tl_sys,54+3*256*2 |
load_image_file 'tl_nod_16.png', icon_tl_sys |
mov eax,dword[icon_tl_sys] |
mov dword[tree1.data_img],eax |
;------------------------------------------------------------------------------ |
282,11 → 236,11 |
|
|
|
align 4 |
align 16 |
red_win: |
call draw_window |
|
align 4 |
align 16 |
still: |
mcall SF_WAIT_EVENT |
cmp dword[exit_code],1 |
304,7 → 258,7 |
@@: |
jmp still |
|
align 4 |
align 16 |
draw_window: |
mcall SF_REDRAW,SSF_BEGIN_DRAW |
|
326,25 → 280,39 |
mcall SF_REDRAW,SSF_END_DRAW |
ret |
|
align 4 |
align 16 |
mouse: |
stdcall [kmainmenu_dispatch_cursorevent], [main_menu] |
|
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION |
cmp word[tedit0.wnd.top],ax |
jg .no_edit |
shr eax,16 |
cmp word[tedit0.wnd.left],ax |
jg .no_edit |
mcall SF_MOUSE_GET,SSF_BUTTON_EXT |
bt eax,24 ;¤¢®©®© 饫çñª «¥¢®© ª®¯ª®© |
jnc @f |
stdcall [ted_but_select_word], tedit0 |
jmp still |
@@: |
stdcall [ted_mouse], tedit0 |
.no_edit: |
|
cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel |
jne @f |
stdcall [edit_box_mouse], dword edit2 |
stdcall [edit_box_mouse], edit2 |
@@: |
cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX ;if not panel |
jne .mouse_end |
jne @f |
stdcall [tl_mouse], tree1 |
.mouse_end: |
@@: |
jmp still |
;--------------------------------------------------------------------- |
|
;output: |
; ah = symbol |
align 4 |
align 16 |
proc KeyConvertToASCII uses ebx, table:dword |
mov ebx,dword[table] ;convert scan to ascii |
ror ax,8 |
354,7 → 322,7 |
ret |
endp |
|
align 4 |
align 16 |
key: |
mcall SF_KEYBOARD,SSF_GET_CONTROL_KEYS ;66.3 ¯®«ãç¨âì á®áâ®ï¨¥ ã¯à ¢«ïîé¨å ª« ¢¨è |
xor esi,esi |
405,98 → 373,119 |
stdcall [ted_key], tedit0, conv_tabl,esi |
jmp still |
|
align 4 |
align 16 |
button: |
|
mcall SF_GET_BUTTON |
cmp ah,3 |
jne @f |
call ted_but_new_file |
jmp still |
@@: |
cmp ah,4 |
jne @f |
call ted_but_open_file |
jmp still |
@@: |
cmp ah,5 |
jne @f |
call ted_but_save_file |
jmp still |
@@: |
cmp ah,6 |
jne @f |
stdcall [ted_but_select_word], tedit0 |
jmp still |
@@: |
cmp ah,7 |
jne @f |
stdcall [ted_but_cut], tedit0 |
jmp still |
@@: |
cmp ah,8 |
jne @f |
stdcall [ted_but_copy], tedit0 |
jmp still |
@@: |
cmp ah,9 |
jne @f |
stdcall [ted_but_paste], tedit0 |
jmp still |
@@: |
cmp ah,10 |
jne @f |
call ted_but_find |
jmp still |
@@: |
cmp ah,11 |
jne @f |
call but_replace |
jmp still |
@@: |
cmp ah,12 |
jne @f |
call but_find_key_w |
jmp still |
@@: |
cmp ah,13 |
jne @f |
stdcall [ted_but_sumb_upper], tedit0 |
jmp still |
@@: |
cmp ah,14 |
jne @f |
stdcall [ted_but_sumb_lover], tedit0 |
jmp still |
@@: |
cmp ah,15 |
jne @f |
stdcall [ted_but_reverse], tedit0 |
jmp still |
@@: |
cmp ah,16 |
jne @f |
stdcall [ted_but_undo], tedit0 |
jmp still |
@@: |
cmp ah,17 |
jne @f |
stdcall [ted_but_redo], tedit0 |
jmp still |
@@: |
cmp ah,18 |
jne @f |
stdcall but_sumb_invis, tedit0 |
jmp still |
@@: |
cmp ah,19 |
jne @f |
stdcall but_k_words_show, tedit0 |
jmp still |
@@: |
cmp ah,20 |
jne @f |
stdcall but_synt_show, tedit0 |
jmp still |
@@: |
cmp ah,21 |
jne @f |
stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866 |
jmp still |
@@: |
cmp ah,22 |
jne @f |
stdcall [ted_but_convert_by_table],tedit0,tbl_866_1251 |
jmp still |
@@: |
|
cmp ah,200 |
jne @f |
stdcall ted_but_open_syntax, tedit0 |
jmp still |
@@: |
cmp ah,201 |
jne @f |
stdcall [ted_but_find_next], tedit0 |
jmp still |
@@: |
|
cmp ah,1 |