2013-11-28 11:35:07 +01:00
|
|
|
|
;<3B><><EFBFBD><E0AEAC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>୮<EFBFBD><E0ADAE><EFBFBD> <20>ᥬ, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD>/ᮢ<>⮬/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ...
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
|
|
|
|
use32
|
2017-05-26 12:20:10 +02:00
|
|
|
|
org 0
|
2010-04-15 17:50:49 +02:00
|
|
|
|
db 'MENUET01' ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20>ᯮ<EFBFBD><E1AFAE>塞<EFBFBD><EFA5AC><EFBFBD> 䠩<><E4A0A9> <20>ᥣ<EFBFBD><E1A5A3> 8 <20><><EFBFBD><EFBFBD>
|
2016-02-19 17:00:48 +01:00
|
|
|
|
dd 1, start, i_end, mem, stacktop, file_name, sys_path
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
|
|
|
|
MAX_COLOR_WORD_LEN equ 40
|
2016-02-19 17:00:48 +01:00
|
|
|
|
maxChars equ 100002 ;(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>㬥<EFBFBD><E3ACA5><EFBFBD> + 2)
|
2012-06-22 13:36:29 +02:00
|
|
|
|
BUF_SIZE equ 4096 ;buffer for copy|paste
|
2010-04-29 20:27:40 +02:00
|
|
|
|
maxSyntaxFileSize equ 410000
|
2019-01-11 11:59:40 +01:00
|
|
|
|
TOOLBAR_ICONS_SIZE equ 1200*21
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2010-04-15 17:50:49 +02:00
|
|
|
|
include '../../proc32.inc'
|
2009-12-29 00:19:20 +01:00
|
|
|
|
include '../../macros.inc'
|
2016-01-20 19:34:38 +01:00
|
|
|
|
include '../../KOSfuncs.inc'
|
2016-02-16 21:19:26 +01:00
|
|
|
|
include '../../load_img.inc'
|
2020-11-26 23:02:39 +01:00
|
|
|
|
include '../../load_lib.mac'
|
2010-04-15 17:50:49 +02:00
|
|
|
|
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
2016-02-08 13:52:20 +01:00
|
|
|
|
include '../../system/skincfg/trunk/kglobals.inc'
|
|
|
|
|
include '../../system/skincfg/trunk/unpacker.inc'
|
2009-12-30 20:07:50 +01:00
|
|
|
|
include 'lang.inc'
|
2010-05-27 16:46:37 +02:00
|
|
|
|
|
2009-12-29 00:19:20 +01:00
|
|
|
|
include 't_data.inc'
|
2019-01-11 11:59:40 +01:00
|
|
|
|
include 't_button.inc'
|
2015-08-04 11:52:06 +02:00
|
|
|
|
include 't_menu.inc'
|
2009-12-29 00:19:20 +01:00
|
|
|
|
include 'strlen.inc'
|
|
|
|
|
include 't_draw.inc' ;draw main window functions
|
2013-02-14 22:09:13 +01:00
|
|
|
|
include 'wnd_k_words.inc'
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2020-11-26 23:02:39 +01:00
|
|
|
|
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
2012-04-19 16:29:46 +02:00
|
|
|
|
|
2016-02-19 17:00:48 +01:00
|
|
|
|
align 4
|
2012-04-19 16:29:46 +02:00
|
|
|
|
icon_tl_sys dd 0 ;㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20>࠭<EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2016-02-19 17:00:48 +01:00
|
|
|
|
run_file_70 FileInfoBlock
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2009-12-29 00:19:20 +01:00
|
|
|
|
start:
|
2016-02-07 17:59:31 +01:00
|
|
|
|
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2016-01-20 19:34:38 +01:00
|
|
|
|
mcall SF_SYS_MISC,SSF_HEAP_INIT
|
2013-11-28 11:35:07 +01:00
|
|
|
|
or eax,eax
|
2019-01-15 13:24:51 +01:00
|
|
|
|
jnz @f
|
|
|
|
|
call ted_Exit
|
|
|
|
|
@@:
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2016-01-20 19:34:38 +01:00
|
|
|
|
mcall SF_KEYBOARD,SSF_SET_INPUT_MODE,1 ;scan code
|
|
|
|
|
mcall SF_SET_EVENTS_MASK,0xC0000027
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2013-11-28 11:35:07 +01:00
|
|
|
|
mov esi,file_name
|
2019-01-23 23:08:19 +01:00
|
|
|
|
stdcall str_len,esi
|
2013-11-28 11:35:07 +01:00
|
|
|
|
mov ecx,eax
|
|
|
|
|
mov edi,openfile_path
|
|
|
|
|
cld
|
|
|
|
|
rep movsb ;<3B><><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD> 䠩<><E4A0A9> <20> <20><><EFBFBD><EFBFBD><EFBFBD> openfile_path
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
load_libraries l_libs_start,load_lib_end
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2011-08-22 17:58:27 +02:00
|
|
|
|
;<3B><EFBFBD>ઠ <20><> <>쪮 㤠筮 <20><><EFBFBD>㧨<EFBFBD><E3A7A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD>
|
2013-11-28 11:35:07 +01:00
|
|
|
|
mov ebp,lib0
|
|
|
|
|
.test_lib_open:
|
2010-04-22 21:39:39 +02:00
|
|
|
|
cmp dword [ebp+ll_struc_size-4],0
|
|
|
|
|
jz @f
|
2016-01-20 19:34:38 +01:00
|
|
|
|
mcall SF_TERMINATE_PROCESS ;exit not correct
|
2010-04-22 21:39:39 +02:00
|
|
|
|
@@:
|
2013-11-28 11:35:07 +01:00
|
|
|
|
add ebp,ll_struc_size
|
|
|
|
|
cmp ebp,load_lib_end
|
|
|
|
|
jl .test_lib_open
|
2011-08-22 17:58:27 +02:00
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
2010-08-25 11:12:42 +02:00
|
|
|
|
stdcall [ted_init], tedit0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [tl_data_init], tree1
|
2019-01-21 12:39:35 +01:00
|
|
|
|
option_boxes_set_sys_color sc,opt_grlist1
|
2019-02-05 22:02:30 +01:00
|
|
|
|
init_checkboxes2 check_boxes,check_boxes_end
|
|
|
|
|
check_boxes_set_sys_color2 check_boxes,check_boxes_end,sc
|
2010-05-27 16:46:37 +02:00
|
|
|
|
|
|
|
|
|
; OpenDialog initialisation
|
2010-08-25 11:12:42 +02:00
|
|
|
|
stdcall [OpenDialog_Init],OpenDialog_data
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
; kmenu initialisation
|
|
|
|
|
call tedit_menu_init
|
|
|
|
|
|
2012-04-19 16:29:46 +02:00
|
|
|
|
; init toolbar file
|
2017-05-26 12:20:10 +02:00
|
|
|
|
include_image_file 'te_icon.png', bmp_icon,,,6 ;6 <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2013-10-29 13:48:21 +01:00
|
|
|
|
mov eax,[bmp_icon]
|
|
|
|
|
add eax,TOOLBAR_ICONS_SIZE
|
|
|
|
|
stdcall img_to_gray, [bmp_icon],eax,(TOOLBAR_ICONS_SIZE)/3
|
2009-12-29 00:19:20 +01:00
|
|
|
|
;---------------------------------------------------------------------
|
2017-05-26 12:20:10 +02:00
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD>塞 䠩<> <20> <20><><EFBFBD><EFBFBD><EFBFBD>ࠬ<EFBFBD> <20> <20><><EFBFBD><EFBFBD>ﬨ
|
|
|
|
|
include_image_file '..\..\media\log_el\trunk\tl_sys_16.png', icon_tl_sys
|
2012-04-19 16:29:46 +02:00
|
|
|
|
mov eax,dword[icon_tl_sys]
|
|
|
|
|
mov dword[tree1.data_img_sys],eax
|
2017-05-26 12:20:10 +02:00
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD>塞 䠩<> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㧫<><E3A7AB>
|
|
|
|
|
include_image_file 'tl_nod_16.png', icon_tl_sys
|
2012-04-19 16:29:46 +02:00
|
|
|
|
mov eax,dword[icon_tl_sys]
|
|
|
|
|
mov dword[tree1.data_img],eax
|
2009-12-29 00:19:20 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2015-11-11 00:11:17 +01:00
|
|
|
|
copy_path fn_syntax_dir,sys_path,file_name,0 ;<3B><>६ <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9><EFBFBD><EFBFBD> ᨭ⠪<E1A8AD><E2A0AA><EFBFBD><EFBFBD>
|
2021-06-14 16:52:00 +02:00
|
|
|
|
xor eax,eax
|
|
|
|
|
mov ecx,4096
|
|
|
|
|
mov edi,file_name
|
|
|
|
|
repnz scasb
|
|
|
|
|
mov byte[edi-2],al ;㡨ࠥ<E3A1A8> '/' <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> (<28>㦭<EFBFBD> <20><><EFBFBD> <20>⥭<EFBFBD><E2A5AD> <20> CD)
|
2016-01-20 19:34:38 +01:00
|
|
|
|
mcall SF_FILE,tree_file_struct
|
2015-11-11 00:11:17 +01:00
|
|
|
|
|
2021-06-14 16:52:00 +02:00
|
|
|
|
or ebx,ebx
|
|
|
|
|
jz .end_dir_init
|
2019-01-23 23:08:19 +01:00
|
|
|
|
mov eax,dir_mem+32+40
|
2015-11-11 00:11:17 +01:00
|
|
|
|
mov ecx,ebx
|
|
|
|
|
@@:
|
|
|
|
|
cmp byte[eax],'.' ;䨫<><E4A8AB><EFBFBD>㥬 䠩<><E4A0A9> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.' <20> '..'
|
|
|
|
|
je .filter
|
|
|
|
|
;0x10000 ;1*2^16 - <20><><EFBFBD> 1 <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [tl_node_add], tree1,0x10000,eax
|
|
|
|
|
stdcall [tl_cur_next], tree1
|
2015-11-11 00:11:17 +01:00
|
|
|
|
.filter:
|
|
|
|
|
add eax,304
|
|
|
|
|
loop @b
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [tl_cur_beg],tree1 ;<3B>⠢<EFBFBD><E2A0A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>砫<EFBFBD> ᯨ᪠
|
2018-10-30 14:03:22 +01:00
|
|
|
|
or dword[tree1.style], tl_cursor_pos_limited ;<3B><>࠭<EFBFBD>稢<EFBFBD><E7A8A2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD> ᯨ᪠
|
2015-11-11 00:11:17 +01:00
|
|
|
|
.end_dir_init:
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2012-06-22 13:36:29 +02:00
|
|
|
|
;--- load ini file ---
|
2012-07-10 13:05:50 +02:00
|
|
|
|
copy_path ini_name,sys_path,file_name,0
|
2012-06-22 13:36:29 +02:00
|
|
|
|
;window startup pozition
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [ini_get_int],file_name,ini_sec_window,key_window_l,ini_def_window_l
|
2012-06-22 13:36:29 +02:00
|
|
|
|
mov word[wnd_s_pos+2],ax
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [ini_get_int],file_name,ini_sec_window,key_window_w,ini_def_window_w
|
2012-06-22 13:36:29 +02:00
|
|
|
|
mov word[wnd_s_pos],ax
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [ini_get_int],file_name,ini_sec_window,key_window_t,ini_def_window_t
|
2012-06-22 13:36:29 +02:00
|
|
|
|
mov word[wnd_s_pos+6],ax
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [ini_get_int],file_name,ini_sec_window,key_window_h,ini_def_window_h
|
2012-06-22 13:36:29 +02:00
|
|
|
|
mov word[wnd_s_pos+4],ax
|
|
|
|
|
;scrool type
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [ini_get_int],file_name,ini_sec_window,key_scroll_type,ini_def_scroll_type
|
2012-06-22 13:36:29 +02:00
|
|
|
|
mov [wScr.type],eax
|
|
|
|
|
mov [hScr.type],eax
|
|
|
|
|
mov [ws_dir_lbox.type],eax
|
2013-02-14 22:09:13 +01:00
|
|
|
|
mov [w_scr_t3.type],eax
|
2012-06-22 13:36:29 +02:00
|
|
|
|
;symbol size
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [ini_get_int],file_name,ini_sec_window,key_symbol_w,ini_def_symbol_w
|
2012-06-22 13:36:29 +02:00
|
|
|
|
mov dword[tedit0.rec.width],eax
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [ini_get_int],file_name,ini_sec_window,key_symbol_h,ini_def_symbol_h
|
2012-06-22 13:36:29 +02:00
|
|
|
|
mov dword[tedit0.rec.height],eax
|
2016-02-19 17:00:48 +01:00
|
|
|
|
;lea eax,[eax+eax*2]
|
|
|
|
|
;mov dword[tedit0.rec.top],eax
|
|
|
|
|
;font size
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [ini_get_int],file_name,ini_sec_window,key_font_s,ini_def_font_s
|
2016-02-19 17:00:48 +01:00
|
|
|
|
shl eax,24
|
|
|
|
|
mov dword[tedit0.font_size],eax
|
2018-10-19 21:27:02 +02:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2020-11-26 23:02:39 +01:00
|
|
|
|
ini_panel key_but_new, ID_BUT_NEW
|
2019-01-11 11:59:40 +01:00
|
|
|
|
ini_panel key_but_open, ID_BUT_OPEN
|
|
|
|
|
ini_panel key_but_save, ID_BUT_SAVE
|
|
|
|
|
ini_panel key_but_save_as,ID_BUT_SAVE_AS
|
|
|
|
|
ini_panel key_but_select, ID_BUT_SELECT
|
2020-11-26 23:02:39 +01:00
|
|
|
|
ini_panel key_but_cut, ID_BUT_CUT
|
2019-01-11 11:59:40 +01:00
|
|
|
|
ini_panel key_but_copy, ID_BUT_COPY
|
|
|
|
|
ini_panel key_but_paste, ID_BUT_PASTE
|
|
|
|
|
ini_panel key_but_find, ID_BUT_FIND
|
|
|
|
|
ini_panel key_but_replace,ID_BUT_REPLACE
|
|
|
|
|
ini_panel key_but_key_words,ID_BUT_KEY_WORDS
|
|
|
|
|
ini_panel key_but_upper, ID_BUT_UPPER
|
|
|
|
|
ini_panel key_but_lower, ID_BUT_LOWER
|
|
|
|
|
ini_panel key_but_reverse,ID_BUT_REVERSE
|
|
|
|
|
ini_panel key_but_undo, ID_BUT_UNDO
|
|
|
|
|
ini_panel key_but_redo, ID_BUT_REDO
|
|
|
|
|
ini_panel key_but_invisible,ID_BUT_INVISIBLE
|
|
|
|
|
ini_panel key_but_syntax_list,ID_BUT_SYNTAX_LIST
|
|
|
|
|
ini_panel key_but_syntax_mode,ID_BUT_SYNTAX_MODE
|
|
|
|
|
ini_panel key_but_convert_1251_866,ID_BUT_CONVERT_1251_866
|
|
|
|
|
ini_panel key_but_convert_866_1251,ID_BUT_CONVERT_866_1251
|
2012-07-10 13:05:50 +02:00
|
|
|
|
;䠩<><E4A0A9><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>७<EFBFBD><E0A5AD>
|
|
|
|
|
xor edx,edx
|
|
|
|
|
mov ebx,synt_auto_open
|
|
|
|
|
@@:
|
|
|
|
|
;<3B><>६ <20><><EFBFBD> 䠩<><E4A0A9>
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [ini_get_str],file_name,ini_sec_options,key_synt_file,ebx,32,ini_def_synt_f
|
2012-07-10 13:05:50 +02:00
|
|
|
|
cmp byte[ebx],0
|
|
|
|
|
je @f
|
|
|
|
|
inc byte[key_synt_file.numb]
|
|
|
|
|
add ebx,32
|
|
|
|
|
;<3B><>६ <20><><EFBFBD><EFBFBD><EFBFBD>७<EFBFBD><E0A5AD>
|
2018-10-19 21:27:02 +02:00
|
|
|
|
stdcall [ini_get_str],file_name,ini_sec_options,key_synt_ext,ebx,32,ini_def_synt_f
|
2012-07-10 13:05:50 +02:00
|
|
|
|
inc byte[key_synt_ext.numb]
|
|
|
|
|
add ebx,32
|
|
|
|
|
inc edx
|
|
|
|
|
cmp edx,max_synt_auto_open
|
|
|
|
|
jl @b
|
|
|
|
|
@@:
|
2012-06-22 13:36:29 +02:00
|
|
|
|
|
2009-12-29 00:19:20 +01:00
|
|
|
|
;--- load color option file ---
|
2016-01-20 19:34:38 +01:00
|
|
|
|
stdcall open_unpac_synt_file,[fn_col_option]
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
|
|
|
|
;--- get cmd line ---
|
2012-05-31 23:54:13 +02:00
|
|
|
|
cmp byte[openfile_path+3],0 ;openfile_path
|
|
|
|
|
je @f ;if file names exist
|
|
|
|
|
mov esi,openfile_path
|
2016-01-20 19:34:38 +01:00
|
|
|
|
stdcall auto_open_syntax,esi
|
2012-05-31 23:54:13 +02:00
|
|
|
|
call but_no_msg_OpenFile
|
|
|
|
|
@@:
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2012-06-22 13:36:29 +02:00
|
|
|
|
|
|
|
|
|
|
2016-02-16 21:19:26 +01:00
|
|
|
|
align 16
|
2009-12-29 00:19:20 +01:00
|
|
|
|
red_win:
|
2015-11-11 00:11:17 +01:00
|
|
|
|
call draw_window
|
2010-05-27 16:46:37 +02:00
|
|
|
|
|
2016-02-16 21:19:26 +01:00
|
|
|
|
align 16
|
2010-05-27 16:46:37 +02:00
|
|
|
|
still:
|
2016-01-20 19:34:38 +01:00
|
|
|
|
mcall SF_WAIT_EVENT
|
2014-07-02 18:45:48 +02:00
|
|
|
|
cmp dword[exit_code],1
|
2019-01-15 13:24:51 +01:00
|
|
|
|
jne @f
|
|
|
|
|
call ted_Exit
|
|
|
|
|
jmp still
|
|
|
|
|
@@:
|
2011-08-26 16:09:59 +02:00
|
|
|
|
|
|
|
|
|
cmp al,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
jz red_win
|
|
|
|
|
cmp al,2
|
|
|
|
|
jz key
|
|
|
|
|
cmp al,3
|
|
|
|
|
jz button
|
|
|
|
|
cmp al,6 ;<3B><><EFBFBD><EFBFBD>
|
|
|
|
|
jne @f
|
2019-01-15 13:24:51 +01:00
|
|
|
|
call mouse
|
2011-08-26 16:09:59 +02:00
|
|
|
|
@@:
|
|
|
|
|
jmp still
|
2010-05-27 16:46:37 +02:00
|
|
|
|
|
2016-02-16 21:19:26 +01:00
|
|
|
|
align 16
|
2009-12-29 00:19:20 +01:00
|
|
|
|
mouse:
|
2015-08-02 16:54:03 +02:00
|
|
|
|
stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
|
2016-02-16 21:19:26 +01:00
|
|
|
|
|
|
|
|
|
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 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 饫<><E9A5AB><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jnc @f
|
|
|
|
|
stdcall [ted_but_select_word], tedit0
|
2019-01-15 13:24:51 +01:00
|
|
|
|
ret
|
2016-02-16 21:19:26 +01:00
|
|
|
|
@@:
|
|
|
|
|
stdcall [ted_mouse], tedit0
|
|
|
|
|
.no_edit:
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2019-01-21 12:39:35 +01:00
|
|
|
|
;<3B><EFBFBD>ઠ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cmp byte[tedit0.panel_id],TED_PANEL_FIND
|
2011-08-26 16:09:59 +02:00
|
|
|
|
jne @f
|
2019-01-29 21:02:48 +01:00
|
|
|
|
stdcall [edit_box_mouse], edit_find
|
2019-01-21 12:39:35 +01:00
|
|
|
|
stdcall [option_box_mouse], opt_grlist1
|
2019-02-05 22:02:30 +01:00
|
|
|
|
stdcall [check_box_mouse], ch1
|
2011-08-26 16:09:59 +02:00
|
|
|
|
@@:
|
2019-01-21 12:39:35 +01:00
|
|
|
|
cmp byte[tedit0.panel_id],TED_PANEL_REPLACE
|
|
|
|
|
jne @f
|
2019-01-29 21:02:48 +01:00
|
|
|
|
stdcall [edit_box_mouse], edit_find
|
|
|
|
|
stdcall [edit_box_mouse], edit_replace
|
2019-01-21 12:39:35 +01:00
|
|
|
|
stdcall [option_box_mouse], opt_grlist1
|
|
|
|
|
@@:
|
|
|
|
|
cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX
|
2016-02-16 21:19:26 +01:00
|
|
|
|
jne @f
|
|
|
|
|
stdcall [tl_mouse], tree1
|
|
|
|
|
@@:
|
2019-01-29 21:02:48 +01:00
|
|
|
|
cmp byte[tedit0.panel_id],TED_PANEL_GOTO
|
|
|
|
|
jne @f
|
|
|
|
|
stdcall [edit_box_mouse], edit_goto
|
|
|
|
|
@@:
|
2019-01-15 13:24:51 +01:00
|
|
|
|
ret
|
2009-12-29 00:19:20 +01:00
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
;output:
|
|
|
|
|
; ah = symbol
|
2016-02-16 21:19:26 +01:00
|
|
|
|
align 16
|
2015-11-11 00:11:17 +01:00
|
|
|
|
proc KeyConvertToASCII uses ebx, table:dword
|
|
|
|
|
mov ebx,dword[table] ;convert scan to ascii
|
2019-01-29 21:02:48 +01:00
|
|
|
|
shr ax,8
|
2015-11-11 00:11:17 +01:00
|
|
|
|
add bx,ax
|
|
|
|
|
mov ah,byte[ebx]
|
|
|
|
|
ret
|
2010-04-22 21:39:39 +02:00
|
|
|
|
endp
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2016-02-16 21:19:26 +01:00
|
|
|
|
align 16
|
2009-12-29 00:19:20 +01:00
|
|
|
|
key:
|
2016-02-16 21:19:26 +01:00
|
|
|
|
mcall SF_KEYBOARD,SSF_GET_CONTROL_KEYS ;66.3 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ﭨ<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
xor esi,esi
|
|
|
|
|
mov ecx,1
|
2019-01-29 21:02:48 +01:00
|
|
|
|
test al,3 ;[Shift]
|
2016-02-16 21:19:26 +01:00
|
|
|
|
jz @f
|
|
|
|
|
mov cl,2
|
|
|
|
|
or esi,KM_SHIFT
|
|
|
|
|
@@:
|
|
|
|
|
test al,0x0c ;[Ctrl]
|
|
|
|
|
jz @f
|
|
|
|
|
or esi,KM_CTRL
|
|
|
|
|
@@:
|
|
|
|
|
test al,0x30 ;[Alt]
|
|
|
|
|
jz @f
|
|
|
|
|
mov cl,3
|
|
|
|
|
or esi,KM_ALT
|
|
|
|
|
@@:
|
|
|
|
|
test al,0x80 ;[NumLock]
|
|
|
|
|
jz @f
|
|
|
|
|
or esi,KM_NUMLOCK
|
|
|
|
|
@@:
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2016-02-16 21:19:26 +01:00
|
|
|
|
mcall SF_SYSTEM_GET,SSF_KEYBOARD_LAYOUT,,conv_tabl ;26.2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>᪫<EFBFBD><E1AAAB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mcall SF_GET_KEY
|
|
|
|
|
stdcall [tl_key], tree1
|
|
|
|
|
|
2019-01-29 21:02:48 +01:00
|
|
|
|
test word[edit_replace.flags],ed_focus ;<3B> <20><> <20> 䮪<><E4AEAA><EFBFBD>, <20><>室<EFBFBD><E5AEA4>
|
|
|
|
|
je @f
|
|
|
|
|
cmp ah,0x80 ;if key up
|
|
|
|
|
ja still
|
|
|
|
|
cmp ah,42 ;[Shift] (left)
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,54 ;[Shift] (right)
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,56 ;[Alt]
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,29 ;[Ctrl]
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,69 ;[Pause Break]
|
|
|
|
|
je still
|
|
|
|
|
|
|
|
|
|
stdcall KeyConvertToASCII, conv_tabl
|
|
|
|
|
stdcall [edit_box_key], edit_replace
|
|
|
|
|
jmp still
|
|
|
|
|
@@:
|
|
|
|
|
test word[edit_find.flags],ed_focus ;<3B> <20><> <20> 䮪<><E4AEAA><EFBFBD>, <20><>室<EFBFBD><E5AEA4>
|
2019-01-21 12:39:35 +01:00
|
|
|
|
je @f
|
|
|
|
|
cmp ah,0x80 ;if key up
|
|
|
|
|
ja still
|
|
|
|
|
cmp ah,42 ;[Shift] (left)
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,54 ;[Shift] (right)
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,56 ;[Alt]
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,29 ;[Ctrl]
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,69 ;[Pause Break]
|
|
|
|
|
je still
|
|
|
|
|
|
|
|
|
|
stdcall KeyConvertToASCII, conv_tabl
|
2019-01-29 21:02:48 +01:00
|
|
|
|
stdcall [edit_box_key], edit_find
|
2019-01-21 12:39:35 +01:00
|
|
|
|
jmp still
|
|
|
|
|
@@:
|
2019-01-29 21:02:48 +01:00
|
|
|
|
test word[edit_goto.flags],ed_focus ;<3B> <20><> <20> 䮪<><E4AEAA><EFBFBD>, <20><>室<EFBFBD><E5AEA4>
|
2016-02-16 21:19:26 +01:00
|
|
|
|
je @f
|
|
|
|
|
cmp ah,0x80 ;if key up
|
|
|
|
|
ja still
|
|
|
|
|
cmp ah,42 ;[Shift] (left)
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,54 ;[Shift] (right)
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,56 ;[Alt]
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,29 ;[Ctrl]
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,69 ;[Pause Break]
|
|
|
|
|
je still
|
|
|
|
|
|
2019-01-08 17:22:08 +01:00
|
|
|
|
stdcall KeyConvertToASCII, conv_tabl
|
2019-01-29 21:02:48 +01:00
|
|
|
|
stdcall [edit_box_key], edit_goto
|
2016-02-16 21:19:26 +01:00
|
|
|
|
jmp still
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
stdcall [ted_key], tedit0, conv_tabl,esi
|
|
|
|
|
jmp still
|
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
align 4
|
2019-01-29 21:02:48 +01:00
|
|
|
|
edit_replace edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_replace, mouse_dd, 0
|
|
|
|
|
edit_find edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0
|
|
|
|
|
edit_goto edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 10, buf_goto, mouse_dd, 0
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2012-05-31 23:54:13 +02:00
|
|
|
|
unpac_mem dd 0
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
|
|
|
|
;library structures
|
|
|
|
|
l_libs_start:
|
2020-11-26 23:02:39 +01:00
|
|
|
|
lib0 l_libs lib_name_0, file_name, system_dir_0, import_box_lib
|
|
|
|
|
lib1 l_libs lib_name_1, file_name, system_dir_1, import_msgbox_lib
|
|
|
|
|
lib2 l_libs lib_name_2, file_name, system_dir_2, import_proclib
|
|
|
|
|
lib3 l_libs lib_name_3, file_name, system_dir_3, import_libimg
|
|
|
|
|
lib4 l_libs lib_name_4, file_name, system_dir_4, import_libini
|
|
|
|
|
lib5 l_libs lib_name_5, file_name, system_dir_5, import_libkmenu
|
2009-12-29 00:19:20 +01:00
|
|
|
|
load_lib_end:
|
|
|
|
|
|
2012-05-31 23:54:13 +02:00
|
|
|
|
IncludeIGlobals
|
2015-08-02 01:45:41 +02:00
|
|
|
|
hed db 'TextEdit '
|
2009-12-29 00:19:20 +01:00
|
|
|
|
i_end:
|
2015-08-02 01:45:41 +02:00
|
|
|
|
openfile_path: ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ࠡ<><E0A0A1><EFBFBD>
|
|
|
|
|
rb 4096
|
2012-07-10 13:05:50 +02:00
|
|
|
|
dir_mem rb 32+304*count_of_dir_list_files
|
|
|
|
|
wnd_s_pos: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>⮢<EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD>樨 <20><><EFBFBD><EFBFBD>
|
|
|
|
|
rq 1
|
|
|
|
|
last_open_synt_file rb 32 ;<3B><><EFBFBD> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><E7A5AD><EFBFBD><EFBFBD> 䠩<><E4A0A9> ᨭ⠪<E1A8AD><E2A0AA><EFBFBD><EFBFBD>
|
|
|
|
|
buf rb BUF_SIZE ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD> <20> <20><>⠢<EFBFBD><E2A0A2>
|
|
|
|
|
buf_find rb 302 ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>᪠ ⥪<><E2A5AA><EFBFBD>
|
2019-01-21 12:39:35 +01:00
|
|
|
|
buf_replace rb 302 ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<><E2A5AA><EFBFBD>
|
2019-01-29 21:02:48 +01:00
|
|
|
|
buf_goto rb 12 ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>室<EFBFBD> <20><> <20><>ப<EFBFBD>
|
2015-12-01 13:51:32 +01:00
|
|
|
|
sc system_colors
|
2012-05-31 23:54:13 +02:00
|
|
|
|
IncludeUGlobals
|
2010-05-27 16:46:37 +02:00
|
|
|
|
align 16
|
|
|
|
|
procinfo process_information
|
|
|
|
|
rb 1024
|
2010-11-17 00:25:56 +01:00
|
|
|
|
thread:
|
2016-02-19 17:00:48 +01:00
|
|
|
|
rb 4096
|
|
|
|
|
align 16
|
2013-02-14 22:09:13 +01:00
|
|
|
|
thread_coords:
|
2015-09-16 12:24:35 +02:00
|
|
|
|
rb 4096
|
2016-02-19 17:00:48 +01:00
|
|
|
|
align 16
|
2009-12-29 00:19:20 +01:00
|
|
|
|
stacktop:
|
2013-11-28 11:35:07 +01:00
|
|
|
|
sys_path: ;<3B><><EFBFBD><EFBFBD> <20><><EFBFBD>㤠 <20><><EFBFBD><EFBFBD><EFBFBD>⨫<EFBFBD><E2A8AB> <20>ᯮ<EFBFBD><E1AFAE>塞<EFBFBD><EFA5AC> 䠩<>
|
2010-11-17 00:25:56 +01:00
|
|
|
|
rb 4096
|
2013-11-28 11:35:07 +01:00
|
|
|
|
file_name: ;<3B><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>᪠
|
2010-11-17 00:25:56 +01:00
|
|
|
|
rb 4096
|
2013-11-28 11:35:07 +01:00
|
|
|
|
syntax_path: ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>砥<EFBFBD><E7A0A5><EFBFBD><EFBFBD> 䠩<><E4A0A9> ᨭ⠪<E1A8AD><E2A0AA><EFBFBD><EFBFBD>
|
2010-11-17 00:25:56 +01:00
|
|
|
|
rb 4096
|
|
|
|
|
plugin_path:
|
|
|
|
|
rb 4096
|
2013-11-28 11:35:07 +01:00
|
|
|
|
text_work_area: ;<3B><><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>
|
2010-11-17 00:25:56 +01:00
|
|
|
|
rb 4096
|
2013-11-28 11:35:07 +01:00
|
|
|
|
filename_area: ;<3B><><EFBFBD> 䠩<><E4A0A9> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-11-17 00:25:56 +01:00
|
|
|
|
rb 256
|
|
|
|
|
file_info:
|
|
|
|
|
rb 40
|
2009-12-29 00:19:20 +01:00
|
|
|
|
mem:
|