Subversion Repositories Kolibri OS

Rev

Rev 5643 | Rev 5671 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4308 IgorA 1
;Огромная благодарность всем, кто помогал: кодом/советом/дизайном ...
1338 IgorA 2
 
3
use32
4
  org 0x0
1449 IgorA 5
  db 'MENUET01' ;идентиф. исполняемого файла всегда 8 байт
1338 IgorA 6
  dd 0x01
7
  dd start
1449 IgorA 8
  dd i_end ; размер приложения
1338 IgorA 9
  dd mem
10
  dd stacktop
1449 IgorA 11
  dd file_name ; command line
1338 IgorA 12
  dd sys_path
13
 
14
MAX_COLOR_WORD_LEN equ 40
15
maxChars equ 100002 ;(...+2)
2817 IgorA 16
BUF_SIZE equ 4096 ;buffer for copy|paste
1457 IgorA 17
maxSyntaxFileSize equ 410000
4308 IgorA 18
TOOLBAR_ICONS_SIZE equ 1200*20
1338 IgorA 19
 
1449 IgorA 20
include '../../proc32.inc'
2708 IgorA 21
;include '../../config.inc'
1338 IgorA 22
include '../../macros.inc'
3014 dunkaist 23
include '../../dll.inc'
1390 IgorA 24
include '../../develop/libraries/box_lib/load_lib.mac'
1449 IgorA 25
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
2708 IgorA 26
include '../../system/desktop/trunk/kglobals.inc'
27
include '../../system/desktop/trunk/unpacker.inc'
1343 IgorA 28
include 'lang.inc'
1467 IgorA 29
 
1338 IgorA 30
include 't_data.inc'
31
include 'strlen.inc'
32
include 't_draw.inc' ;draw main window functions
1457 IgorA 33
include 't_button.inc' ;text work functions
3244 IgorA 34
include 'wnd_k_words.inc'
1338 IgorA 35
 
2632 IgorA 36
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
1338 IgorA 37
 
2632 IgorA 38
 
39
;Макрос для загрузки изображений с использованием библиотеки libimg.obj
40
;для использования макроса нужны переменные:
41
; - run_file_70 FileInfoBlock
42
; - image_data dd 0
43
macro load_image_file path,buf,size
44
{
45
	;path - может быть переменной или строковым параметром
46
	if path eqtype '' ;проверяем задан ли строкой параметр path
47
		jmp @f
48
			local .path_str
49
			.path_str db path ;формируем локальную переменную
50
			db 0
51
		@@:
52
		;32 - стандартный адрес по которому должен быть буфер с системным путем
53
		copy_path .path_str,[32],file_name,0x0
54
	else
55
		copy_path path,[32],file_name,0x0 ;формируем полный путь к файлу изображения, подразумеваем что он в одной папке с программой
56
	end if
57
 
58
	stdcall mem.Alloc, dword size ;выделяем память для изображения
59
	mov [buf],eax
60
 
61
	mov eax,70 ;70-я функция работа с файлами
62
	mov [run_file_70.Function], 0
63
	mov [run_file_70.Position], 0
64
	mov [run_file_70.Flags], 0
65
	mov [run_file_70.Count], dword size
66
	m2m [run_file_70.Buffer], [buf]
67
	mov byte[run_file_70+20], 0
68
	mov [run_file_70.FileName], file_name
69
	mov ebx,run_file_70
70
	int 0x40 ;загружаем файл изображения
71
	cmp ebx,0xffffffff
72
	je @f
73
		;определяем вид изображения и переводим его во временный буфер image_data
74
		stdcall dword[img_decode], dword[buf],ebx,0
75
		mov dword[image_data],eax
76
		;преобразуем изображение к формату rgb
77
		stdcall dword[img_to_rgb2], dword[image_data],dword[buf]
78
		;удаляем временный буфер image_data
79
		stdcall dword[img_destroy], dword[image_data]
80
	@@:
81
}
82
 
83
image_data dd 0 ;указатель на временную память. для нужен преобразования изображения
84
icon_tl_sys dd 0 ;указатель на память для хранения системных иконок
85
 
1456 IgorA 86
align 4
1338 IgorA 87
start:
4308 IgorA 88
	mcall 48,3,sc,sizeof.system_colors
1338 IgorA 89
 
4308 IgorA 90
	mcall 68,11
91
	or eax,eax
92
	jz button.exit
1338 IgorA 93
 
4308 IgorA 94
	mcall 66,1,1 ;scan code
95
	mcall 40,0xC0000027
1338 IgorA 96
 
4308 IgorA 97
	mov esi,file_name
98
	call strlen
99
	mov ecx,eax
100
	mov edi,openfile_path
101
	cld
102
	rep movsb ;копируем имя файла в буфер openfile_path
1338 IgorA 103
 
1456 IgorA 104
load_libraries l_libs_start,load_lib_end
1338 IgorA 105
 
2102 IgorA 106
;проверка на сколько удачно загузились библиотеки
4308 IgorA 107
mov	ebp,lib0
108
.test_lib_open:
1456 IgorA 109
	cmp	dword [ebp+ll_struc_size-4],0
110
	jz	@f
111
	mcall -1 ;exit not correct
112
@@:
4308 IgorA 113
	add ebp,ll_struc_size
114
	cmp ebp,load_lib_end
115
	jl .test_lib_open
1338 IgorA 116
 
1456 IgorA 117
;---------------------------------------------------------------------
1592 IgorA 118
	stdcall [ted_init], tedit0
119
	stdcall dword[tl_data_init], tree1
1338 IgorA 120
 
1467 IgorA 121
; OpenDialog initialisation
1592 IgorA 122
	stdcall [OpenDialog_Init],OpenDialog_data
1467 IgorA 123
 
5649 leency 124
; kmenu initialisation
125
	stdcall [kmenu_init], sc
126
 
127
	stdcall [ksubmenu_new]
128
	mov [main_menu], eax
129
 
130
	stdcall [ksubmenu_new]
131
	mov [main_menu_file], eax
132
 
133
	stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_File_New, 3
134
	stdcall [ksubmenu_add], [main_menu_file], eax
135
	stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_File_Open, 4
136
	stdcall [ksubmenu_add], [main_menu_file], eax
137
	stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_File_Save, 5
138
	stdcall [ksubmenu_add], [main_menu_file], eax
139
	stdcall [kmenuitem_new], KMENUITEM_SEPARATOR, 0, 0
140
	stdcall [ksubmenu_add], [main_menu_file], eax
141
	stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_File_Exit, 199
142
	stdcall [ksubmenu_add], [main_menu_file], eax
143
 
144
	stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_main_menu_File, [main_menu_file]
145
	stdcall [ksubmenu_add], [main_menu], eax
146
 
2632 IgorA 147
; init toolbar file
4128 IgorA 148
	load_image_file 'te_icon.png', bmp_icon,TOOLBAR_ICONS_SIZE*2 ;умножение на 2 для серых кнопок
149
	mov eax,[bmp_icon]
150
	add eax,TOOLBAR_ICONS_SIZE
151
	stdcall img_to_gray, [bmp_icon],eax,(TOOLBAR_ICONS_SIZE)/3
1338 IgorA 152
;---------------------------------------------------------------------
2632 IgorA 153
; читаем файл с курсорами и линиями
154
	load_image_file 'tl_sys_16.png', icon_tl_sys,54+3*256*13
155
	mov eax,dword[icon_tl_sys]
156
	mov dword[tree1.data_img_sys],eax
1338 IgorA 157
;---------------------------------------------------------------------
2632 IgorA 158
; читаем файл с иконками узлов
159
	load_image_file 'tl_nod_16.png', icon_tl_sys,54+3*256*2
160
	mov eax,dword[icon_tl_sys]
161
	mov dword[tree1.data_img],eax
1338 IgorA 162
;------------------------------------------------------------------------------
1449 IgorA 163
  copy_path fn_syntax_dir,sys_path,file_name,0x0 ;берем путь к папке с файлами синтаксиса
1338 IgorA 164
  mov eax,70
165
  mov ebx,tree_file_struct
166
  int 0x40
167
 
168
cmp ebx,-1
169
je .end_dir_init
170
 
171
  mov eax,dir_mem
172
  add eax,32+4+1+3+4*6+8
173
mov ecx,ebx
174
@@:
1449 IgorA 175
  cmp byte[eax],'.' ;фильтруем файлы с именами '.' и '..'
1338 IgorA 176
  je .filter
1456 IgorA 177
    ;0x10000 ;1*2^16 - где 1 номер иконки с книгой
178
    stdcall dword[tl_node_add], eax,0x10000, tree1
1338 IgorA 179
 
1456 IgorA 180
    stdcall dword[tl_cur_next], tree1
1338 IgorA 181
  .filter:
182
  add eax,304
183
  loop @b
2102 IgorA 184
  stdcall dword[tl_cur_beg],tree1 ;ставим курсор на начало списка
1338 IgorA 185
.end_dir_init:
186
 
2817 IgorA 187
;--- load ini file ---
2855 IgorA 188
	copy_path ini_name,sys_path,file_name,0
2817 IgorA 189
	;window startup pozition
190
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_l,ini_def_window_l
191
	mov word[wnd_s_pos+2],ax
192
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_w,ini_def_window_w
193
	mov word[wnd_s_pos],ax
194
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_t,ini_def_window_t
195
	mov word[wnd_s_pos+6],ax
196
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_h,ini_def_window_h
197
	mov word[wnd_s_pos+4],ax
198
	;scrool type
199
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_scroll_type,ini_def_scroll_type
200
	mov [wScr.type],eax
201
	mov [hScr.type],eax
202
	mov [ws_dir_lbox.type],eax
3244 IgorA 203
    mov [w_scr_t3.type],eax
2817 IgorA 204
	;symbol size
205
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_symbol_w,ini_def_symbol_w
206
	mov dword[tedit0.rec.width],eax
207
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_symbol_h,ini_def_symbol_h
208
	mov dword[tedit0.rec.height],eax
209
	lea eax,[eax+eax*2]
210
	mov dword[tedit0.rec.top],eax
2855 IgorA 211
	;файловые расширения
212
	xor edx,edx
213
	mov ebx,synt_auto_open
214
	@@:
215
		;берем имя файла
216
		stdcall dword[ini_get_str],file_name,ini_sec_options,key_synt_file,ebx,32,ini_def_synt_f
217
		cmp byte[ebx],0
218
		je @f
219
		inc byte[key_synt_file.numb]
220
		add ebx,32
221
		;берем расширения
222
		stdcall dword[ini_get_str],file_name,ini_sec_options,key_synt_ext,ebx,32,ini_def_synt_f
223
		inc byte[key_synt_ext.numb]
224
		add ebx,32
225
		inc edx
226
		cmp edx,max_synt_auto_open
227
		jl @b
228
	@@:
2817 IgorA 229
 
1338 IgorA 230
;--- load color option file ---
1457 IgorA 231
	mov ebx,dword[fn_col_option]
2708 IgorA 232
	call open_unpac_synt_file
1338 IgorA 233
 
234
;--- get cmd line ---
2708 IgorA 235
	cmp byte[openfile_path+3],0 ;openfile_path
236
	je @f ;if file names exist
237
		mov esi,openfile_path
238
		call strlen ;eax=strlen
239
		call but_no_msg_OpenFile
240
	@@:
1338 IgorA 241
 
2817 IgorA 242
 
243
 
1456 IgorA 244
align 4
1338 IgorA 245
red_win:
1467 IgorA 246
  call draw_window
247
 
248
align 4
249
still:
2125 IgorA 250
	mcall 10
4991 IgorA 251
	cmp dword[exit_code],1
252
	je button.exit
1467 IgorA 253
 
2125 IgorA 254
	cmp al,1 ;изменилось положение окна
255
	jz red_win
256
	cmp al,2
257
	jz key
258
	cmp al,3
259
	jz button
260
	cmp al,6 ;мышь
261
	jne @f
262
		jmp mouse
263
	@@:
264
	jmp still
1467 IgorA 265
 
266
align 4
267
draw_window:
2125 IgorA 268
	mcall 12,1
1338 IgorA 269
 
2125 IgorA 270
	mov edx,[sc.work]
271
	or  edx,0x73000000
272
	mov edi,hed
2817 IgorA 273
	mcall 0,dword[wnd_s_pos],dword[wnd_s_pos+4]
1338 IgorA 274
 
2125 IgorA 275
	mcall 9,procinfo,-1
276
	mov edi,tedit0 ;значение edi нужно для EvSize и ted_wnd_t
277
	call EvSize
1449 IgorA 278
 
2125 IgorA 279
	mov eax,13 ;верхний прямоугольник, для очистки верхней панели
280
	xor ebx,ebx
281
	mov ecx,ted_wnd_t
282
	mov bx,word[procinfo.client_box.width]
283
	inc bx
284
	int 0x40
1338 IgorA 285
 
4308 IgorA 286
	call draw_but_toolbar
5649 leency 287
 
288
	stdcall [kmainmenu_draw], [main_menu]
1338 IgorA 289
 
4308 IgorA 290
	stdcall [ted_draw], tedit0
1338 IgorA 291
 
4308 IgorA 292
	mcall 12,2
293
	ret
1338 IgorA 294
 
1456 IgorA 295
align 4
1338 IgorA 296
mouse:
5649 leency 297
	stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
2125 IgorA 298
	stdcall [ted_mouse], tedit0
1338 IgorA 299
 
2125 IgorA 300
	cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel
301
	jne @f
302
		stdcall [edit_box_mouse], dword edit2
303
	@@:
304
	cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX ;if not panel
5649 leency 305
	jne .mouse_end
2125 IgorA 306
	stdcall [tl_mouse], tree1
5649 leency 307
.mouse_end:
2125 IgorA 308
	jmp still
1338 IgorA 309
;---------------------------------------------------------------------
310
 
1456 IgorA 311
;output:
312
; ah = symbol
313
align 4
314
proc KeyConvertToASCII, table:dword
315
  push ebx
316
  mov ebx,dword[table] ;convert scan to ascii
1338 IgorA 317
  ror ax,8
318
  xor ah,ah
319
  add bx,ax
320
  mov ah,byte[ebx]
1456 IgorA 321
  pop ebx
1338 IgorA 322
  ret
1456 IgorA 323
endp
1338 IgorA 324
 
1456 IgorA 325
align 4
1338 IgorA 326
key:
1456 IgorA 327
  mcall 66,3 ;66.3 получить состояние управляющих клавиш
1457 IgorA 328
  xor esi,esi
1338 IgorA 329
  mov ecx,1
330
  test al,0x03 ;[Shift]
331
  jz @f
1456 IgorA 332
    mov cl,2
1457 IgorA 333
    or esi,KM_SHIFT
1338 IgorA 334
  @@:
335
  test al,0x0c ;[Ctrl]
336
  jz @f
1457 IgorA 337
    or esi,KM_CTRL
1338 IgorA 338
  @@:
339
  test al,0x30 ;[Alt]
340
  jz @f
1456 IgorA 341
    mov cl,3
1457 IgorA 342
    or esi,KM_ALT
1338 IgorA 343
  @@:
344
  test al,0x80 ;[NumLock]
345
  jz @f
1457 IgorA 346
    or esi,KM_NUMLOCK
1338 IgorA 347
  @@:
1457 IgorA 348
 
1456 IgorA 349
  mcall 26,2,,conv_tabl ;26.2 получить раскладку клавиатуры
350
  mcall 2 ;получаем код нажатой клавиши
1458 IgorA 351
  stdcall [tl_key], tree1
1338 IgorA 352
 
353
  test word [edit2.flags],10b;ed_focus ; если не в фокусе, выходим
354
  je @f
355
    cmp ah,0x80 ;if key up
356
    ja still
357
    cmp ah,42 ;[Shift] (left)
358
    je still
359
    cmp ah,54 ;[Shift] (right)
360
    je still
361
    cmp ah,56 ;[Alt]
362
    je still
363
    cmp ah,29 ;[Ctrl]
364
    je still
365
    cmp ah,69 ;[Pause Break]
366
    je still
367
 
1456 IgorA 368
    stdcall KeyConvertToASCII, dword conv_tabl
1449 IgorA 369
    stdcall [edit_box_key], dword edit2
1338 IgorA 370
    jmp still
371
  @@:
372
 
1457 IgorA 373
  stdcall [ted_key], tedit0, conv_tabl,esi
1338 IgorA 374
  jmp still
375
 
1457 IgorA 376
align 4
1338 IgorA 377
button:
378
 
1449 IgorA 379
  mcall 17 ;получить код нажатой кнопки
1338 IgorA 380
  cmp ah,3
381
  jne @f
1457 IgorA 382
    call ted_but_new_file
1338 IgorA 383
  @@:
384
  cmp ah,4
385
  jne @f
1457 IgorA 386
    call ted_but_open_file
1338 IgorA 387
  @@:
388
  cmp ah,5
389
  jne @f
4308 IgorA 390
    call ted_but_save_file
1338 IgorA 391
  @@:
392
  cmp ah,6
1456 IgorA 393
  jne @f
1457 IgorA 394
    stdcall [ted_but_select_word], tedit0
1456 IgorA 395
  @@:
1338 IgorA 396
  cmp ah,7
1456 IgorA 397
  jne @f
1457 IgorA 398
    stdcall [ted_but_cut], tedit0
1456 IgorA 399
  @@:
1338 IgorA 400
  cmp ah,8
401
  jne @f
1457 IgorA 402
    stdcall [ted_but_copy], tedit0
1338 IgorA 403
  @@:
404
  cmp ah,9
1456 IgorA 405
  jne @f
1457 IgorA 406
    stdcall [ted_but_paste], tedit0
1456 IgorA 407
  @@:
1338 IgorA 408
  cmp ah,10
1449 IgorA 409
  jne @f
1457 IgorA 410
    call ted_but_find
1449 IgorA 411
  @@:
1338 IgorA 412
  cmp ah,11
1456 IgorA 413
  jne @f
414
    call but_replace
415
  @@:
1338 IgorA 416
  cmp ah,12
1456 IgorA 417
  jne @f
418
    call but_find_key_w
419
  @@:
1338 IgorA 420
  cmp ah,13
1456 IgorA 421
  jne @f
1457 IgorA 422
    stdcall [ted_but_sumb_upper], tedit0
1456 IgorA 423
  @@:
1338 IgorA 424
  cmp ah,14
1456 IgorA 425
  jne @f
1457 IgorA 426
    stdcall [ted_but_sumb_lover], tedit0
1456 IgorA 427
  @@:
1338 IgorA 428
  cmp ah,15
1456 IgorA 429
  jne @f
1457 IgorA 430
    stdcall [ted_but_reverse], tedit0
1456 IgorA 431
  @@:
1338 IgorA 432
  cmp ah,16
1456 IgorA 433
  jne @f
1457 IgorA 434
    stdcall [ted_but_undo], tedit0
1456 IgorA 435
  @@:
1338 IgorA 436
  cmp ah,17
1456 IgorA 437
  jne @f
1457 IgorA 438
    stdcall [ted_but_redo], tedit0
1456 IgorA 439
  @@:
1338 IgorA 440
  cmp ah,18
1456 IgorA 441
  jne @f
442
    stdcall but_sumb_invis, tedit0
443
  @@:
1338 IgorA 444
  cmp ah,19
1456 IgorA 445
  jne @f
446
    stdcall but_k_words_show, tedit0
447
  @@:
1338 IgorA 448
  cmp ah,20
1449 IgorA 449
  jne @f
450
    stdcall but_synt_show, tedit0
451
  @@:
4308 IgorA 452
  cmp ah,21
453
  jne @f
454
    stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866
455
  @@:
456
  cmp ah,22
457
  jne @f
458
    stdcall [ted_but_convert_by_table],tedit0,tbl_866_1251
459
  @@:
1338 IgorA 460
 
461
  cmp ah,200
462
  jne @f
1456 IgorA 463
    stdcall ted_but_open_syntax, tedit0
1338 IgorA 464
  @@:
465
  cmp ah,201
466
  jne @f
1457 IgorA 467
    stdcall [ted_but_find_next], tedit0
1338 IgorA 468
  @@:
469
 
470
  cmp ah,1
5649 leency 471
  je .exit
472
 
473
  cmp ah,199
474
  je .exit
475
 
476
  jmp still
1338 IgorA 477
.exit:
4991 IgorA 478
	cmp dword[exit_code],1
479
	je @f
2708 IgorA 480
	stdcall [ted_can_save], tedit0
481
	cmp al,1
482
	jne @f
4991 IgorA 483
		stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
484
		stdcall [mb_setfunctions],msgbox_2E_funct
2708 IgorA 485
		jmp still
486
	@@:
487
	stdcall mem.Free,[bmp_icon]
488
	cmp dword[unpac_mem],0
489
	je @f
490
		stdcall mem.Free,[unpac_mem]
491
	@@:
492
 
493
	stdcall [ted_delete], tedit0
494
	stdcall dword[tl_data_clear], tree1
495
	mcall -1 ;выход из программы
1456 IgorA 496
 
1457 IgorA 497
edit2 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0
1338 IgorA 498
 
2708 IgorA 499
unpac_mem dd 0
1338 IgorA 500
 
1343 IgorA 501
if lang eq ru
2632 IgorA 502
  head_f_i:
503
  head_f_l db 'Системная ошибка',0
1592 IgorA 504
  err_message_found_lib0 db 'Не найдена библиотека ',39,'box_lib.obj',39,0
505
  err_message_import0 db 'Ошибка при импорте библиотеки ',39,'box_lib.obj',39,0
506
  err_message_found_lib1 db 'Не найдена библиотека ',39,'msgbox.obj',39,0
507
  err_message_import1 db 'Ошибка при импорте библиотеки ',39,'msgbox.obj',39,0
508
  err_message_found_lib2 db 'Не найдена библиотека ',39,'proc_lib.obj',39,0
509
  err_message_import2 db 'Ошибка при импорте библиотеки ',39,'proc_lib.obj',39,0
2632 IgorA 510
  err_message_found_lib_3 db 'Не найдена библиотека ',39,'libimg.obj',39,0
511
  err_message_import_3 db 'Ошибка при импорте библиотеки ',39,'libimg.obj',39,0
2817 IgorA 512
  err_message_found_lib_4 db 'Не найдена библиотека ',39,'libini.obj',39,0
513
  err_message_import_4 db 'Ошибка при импорте библиотеки ',39,'libini.obj',39,0
5649 leency 514
  err_message_found_lib_5 db 'Не найдена библиотека ',39,'libkmenu.obj',39,0
515
  err_message_import_5 db 'Ошибка при импорте библиотеки ',39,'libkmenu.obj',39,0
1343 IgorA 516
else
2632 IgorA 517
  head_f_i:
518
  head_f_l db 'System error',0
1592 IgorA 519
  err_message_found_lib0 db 'Sorry I cannot found library ',39,'box_lib.obj',39,0
520
  err_message_import0 db 'Error on load import library ',39,'box_lib.obj',39,0
521
  err_message_found_lib1 db 'Sorry I cannot found library ',39,'msgbox.obj',39,0
522
  err_message_import1 db 'Error on load import library ',39,'msgbox.obj',39,0
523
  err_message_found_lib2 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,0
524
  err_message_import2 db 'Error on load import library ',39,'proc_lib.obj',39,0
2632 IgorA 525
  err_message_found_lib_3 db 'Sorry I cannot found library ',39,'libimg.obj',39,0
526
  err_message_import_3 db 'Error on load import library ',39,'libimg.obj',39,0
2817 IgorA 527
  err_message_found_lib_4 db 'Sorry I cannot found library ',39,'libini.obj',39,0
528
  err_message_import_4 db 'Error on load import library ',39,'libini.obj',39,0
5649 leency 529
  err_message_found_lib_5 db 'Sorry I cannot found library ',39,'libkmenu.obj',39,0
530
  err_message_import_5 db 'Error on load import library ',39,'libkmenu.obj',39,0
1343 IgorA 531
end if
1338 IgorA 532
 
533
;library structures
534
l_libs_start:
2632 IgorA 535
	lib0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
536
		err_message_found_lib0, head_f_l, import_box_lib,err_message_import0, head_f_i
537
	lib1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
538
		err_message_found_lib1, head_f_l, import_msgbox_lib, err_message_import1, head_f_i
539
	lib2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\
540
		err_message_found_lib2, head_f_l, import_proclib, err_message_import2, head_f_i
541
	lib3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\
542
		err_message_found_lib_3, head_f_l, import_libimg, err_message_import_3, head_f_i
2817 IgorA 543
	lib4 l_libs lib_name_4, sys_path, file_name, system_dir_4,\
544
		err_message_found_lib_4, head_f_l, import_libini, err_message_import_4, head_f_i
5649 leency 545
	lib5 l_libs lib_name_5, sys_path, file_name, system_dir_5,\
546
		err_message_found_lib_5, head_f_l, import_libkmenu, err_message_import_5, head_f_i
1338 IgorA 547
load_lib_end:
548
 
2708 IgorA 549
IncludeIGlobals
5643 leency 550
hed db 'TextEdit '
1338 IgorA 551
i_end:
5643 leency 552
	openfile_path: ;полный путь к файлу с которым идет работа
553
		rb 4096
2855 IgorA 554
	dir_mem rb 32+304*count_of_dir_list_files
555
	wnd_s_pos: ;место для настроек стартовой позиции окна
556
		rq 1
557
	last_open_synt_file rb 32 ;имя последнего подключенного файла синтаксиса
558
	buf rb BUF_SIZE ;буфер для копирования и вставки
559
	buf_find rb 302 ;буфер для поиска текста
2708 IgorA 560
IncludeUGlobals
1467 IgorA 561
	align 16
562
	procinfo process_information
1705 IgorA 563
		rb 1024
1467 IgorA 564
	thread:
1705 IgorA 565
	rb 1024
3244 IgorA 566
    thread_coords:
567
	rb 1024
1338 IgorA 568
stacktop:
4308 IgorA 569
	sys_path: ;путь откуда запустился исполняемый файл
1705 IgorA 570
		rb 4096
4308 IgorA 571
	file_name: ;параметры запуска
1705 IgorA 572
		rb 4096
4308 IgorA 573
	syntax_path: ;имя подключаемого файла синтаксиса
1705 IgorA 574
		rb 4096
575
	plugin_path:
576
		rb 4096
4308 IgorA 577
	text_work_area: ;путь к файлу, который показывается в окне
578
		rb 4096
579
	filename_area: ;имя файла для диалога открытия/закрытия
1705 IgorA 580
		rb 256
581
	file_info:
582
		rb 40
1338 IgorA 583
mem: