Subversion Repositories Kolibri OS

Rev

Rev 4308 | Rev 5637 | 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
4308 IgorA 123
	mov eax,[sc.work_button_text]
124
	mov [PathShow_data_1.font_color],eax
125
	mov eax,[sc.work_button]
126
	mov [PathShow_data_1.background_color],eax
1467 IgorA 127
 
2632 IgorA 128
; init toolbar file
4128 IgorA 129
	load_image_file 'te_icon.png', bmp_icon,TOOLBAR_ICONS_SIZE*2 ;умножение на 2 для серых кнопок
130
	mov eax,[bmp_icon]
131
	add eax,TOOLBAR_ICONS_SIZE
132
	stdcall img_to_gray, [bmp_icon],eax,(TOOLBAR_ICONS_SIZE)/3
1338 IgorA 133
;---------------------------------------------------------------------
2632 IgorA 134
; читаем файл с курсорами и линиями
135
	load_image_file 'tl_sys_16.png', icon_tl_sys,54+3*256*13
136
	mov eax,dword[icon_tl_sys]
137
	mov dword[tree1.data_img_sys],eax
1338 IgorA 138
;---------------------------------------------------------------------
2632 IgorA 139
; читаем файл с иконками узлов
140
	load_image_file 'tl_nod_16.png', icon_tl_sys,54+3*256*2
141
	mov eax,dword[icon_tl_sys]
142
	mov dword[tree1.data_img],eax
1338 IgorA 143
;------------------------------------------------------------------------------
1449 IgorA 144
  copy_path fn_syntax_dir,sys_path,file_name,0x0 ;берем путь к папке с файлами синтаксиса
1338 IgorA 145
  mov eax,70
146
  mov ebx,tree_file_struct
147
  int 0x40
148
 
149
cmp ebx,-1
150
je .end_dir_init
151
 
152
  mov eax,dir_mem
153
  add eax,32+4+1+3+4*6+8
154
mov ecx,ebx
155
@@:
1449 IgorA 156
  cmp byte[eax],'.' ;фильтруем файлы с именами '.' и '..'
1338 IgorA 157
  je .filter
1456 IgorA 158
    ;0x10000 ;1*2^16 - где 1 номер иконки с книгой
159
    stdcall dword[tl_node_add], eax,0x10000, tree1
1338 IgorA 160
 
1456 IgorA 161
    stdcall dword[tl_cur_next], tree1
1338 IgorA 162
  .filter:
163
  add eax,304
164
  loop @b
2102 IgorA 165
  stdcall dword[tl_cur_beg],tree1 ;ставим курсор на начало списка
1338 IgorA 166
.end_dir_init:
167
 
2817 IgorA 168
;--- load ini file ---
2855 IgorA 169
	copy_path ini_name,sys_path,file_name,0
2817 IgorA 170
	;window startup pozition
171
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_l,ini_def_window_l
172
	mov word[wnd_s_pos+2],ax
173
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_w,ini_def_window_w
174
	mov word[wnd_s_pos],ax
175
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_t,ini_def_window_t
176
	mov word[wnd_s_pos+6],ax
177
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_h,ini_def_window_h
178
	mov word[wnd_s_pos+4],ax
179
	;scrool type
180
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_scroll_type,ini_def_scroll_type
181
	mov [wScr.type],eax
182
	mov [hScr.type],eax
183
	mov [ws_dir_lbox.type],eax
3244 IgorA 184
    mov [w_scr_t3.type],eax
2817 IgorA 185
	;symbol size
186
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_symbol_w,ini_def_symbol_w
187
	mov dword[tedit0.rec.width],eax
188
	stdcall dword[ini_get_int],file_name,ini_sec_window,key_symbol_h,ini_def_symbol_h
189
	mov dword[tedit0.rec.height],eax
190
	lea eax,[eax+eax*2]
191
	mov dword[tedit0.rec.top],eax
2855 IgorA 192
	;файловые расширения
193
	xor edx,edx
194
	mov ebx,synt_auto_open
195
	@@:
196
		;берем имя файла
197
		stdcall dword[ini_get_str],file_name,ini_sec_options,key_synt_file,ebx,32,ini_def_synt_f
198
		cmp byte[ebx],0
199
		je @f
200
		inc byte[key_synt_file.numb]
201
		add ebx,32
202
		;берем расширения
203
		stdcall dword[ini_get_str],file_name,ini_sec_options,key_synt_ext,ebx,32,ini_def_synt_f
204
		inc byte[key_synt_ext.numb]
205
		add ebx,32
206
		inc edx
207
		cmp edx,max_synt_auto_open
208
		jl @b
209
	@@:
2817 IgorA 210
 
1338 IgorA 211
;--- load color option file ---
1457 IgorA 212
	mov ebx,dword[fn_col_option]
2708 IgorA 213
	call open_unpac_synt_file
1338 IgorA 214
 
215
;--- get cmd line ---
2708 IgorA 216
	cmp byte[openfile_path+3],0 ;openfile_path
217
	je @f ;if file names exist
218
		mov esi,openfile_path
219
		call strlen ;eax=strlen
220
		call but_no_msg_OpenFile
221
	@@:
1338 IgorA 222
 
2817 IgorA 223
 
224
 
1456 IgorA 225
align 4
1338 IgorA 226
red_win:
1467 IgorA 227
  call draw_window
228
 
229
align 4
230
still:
2125 IgorA 231
	mcall 10
4991 IgorA 232
	cmp dword[exit_code],1
233
	je button.exit
1467 IgorA 234
 
2125 IgorA 235
	cmp al,1 ;изменилось положение окна
236
	jz red_win
237
	cmp al,2
238
	jz key
239
	cmp al,3
240
	jz button
241
	cmp al,6 ;мышь
242
	jne @f
243
		jmp mouse
244
	@@:
245
	jmp still
1467 IgorA 246
 
247
align 4
248
draw_window:
2125 IgorA 249
	mcall 12,1
1338 IgorA 250
 
2125 IgorA 251
	mov edx,[sc.work]
252
	or  edx,0x73000000
253
	mov edi,hed
2817 IgorA 254
	mcall 0,dword[wnd_s_pos],dword[wnd_s_pos+4]
1338 IgorA 255
 
2125 IgorA 256
	mcall 9,procinfo,-1
257
	mov edi,tedit0 ;значение edi нужно для EvSize и ted_wnd_t
258
	call EvSize
1449 IgorA 259
 
2125 IgorA 260
	mov eax,13 ;верхний прямоугольник, для очистки верхней панели
261
	xor ebx,ebx
262
	mov ecx,ted_wnd_t
263
	mov bx,word[procinfo.client_box.width]
264
	inc bx
265
	int 0x40
1338 IgorA 266
 
1467 IgorA 267
	mov eax,4
268
	mov ebx,185*65536+9
269
	mov ecx,[sc.work_text]
270
	or  ecx,0x80000000
271
	mov edx,txtFile
272
	int 0x40
273
 
4308 IgorA 274
	stdcall [PathShow_draw], dword PathShow_data_1
275
	stdcall [menu_bar_draw], dword menu_data_1
1338 IgorA 276
 
4308 IgorA 277
	call draw_but_toolbar
1338 IgorA 278
 
4308 IgorA 279
	stdcall [ted_draw], tedit0
1338 IgorA 280
 
4308 IgorA 281
	mcall 12,2
282
	ret
1338 IgorA 283
 
1456 IgorA 284
align 4
1338 IgorA 285
mouse:
2125 IgorA 286
	stdcall [ted_mouse], tedit0
1338 IgorA 287
 
2125 IgorA 288
	cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel
289
	jne @f
290
		stdcall [edit_box_mouse], dword edit2
291
	@@:
292
	cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX ;if not panel
293
	jne .menu_bar_1 ;@f
294
	stdcall [tl_mouse], tree1
1338 IgorA 295
;-----------------------------------------------
296
.menu_bar_1:
2125 IgorA 297
	mov [menu_data_1.get_mouse_flag],1
1338 IgorA 298
; mouse event for Menu 1
2125 IgorA 299
	stdcall [menu_bar_mouse],dword menu_data_1
300
	cmp dword[menu_data_1.click],1
301
	jne .mnu_1
302
	cmp dword[menu_data_1.cursor_out],4
303
	je button.exit
304
	cmp dword[menu_data_1.cursor_out],3
305
	jne @f
4308 IgorA 306
		call ted_but_save_file
2125 IgorA 307
	@@:
308
	cmp dword[menu_data_1.cursor_out],2
309
	jne @f
310
		call ted_but_open_file
311
	@@:
312
	cmp dword[menu_data_1.cursor_out],1
313
	jne @f
314
		call ted_but_new_file
315
	@@:
1338 IgorA 316
.mnu_1:
2125 IgorA 317
	jmp still
1338 IgorA 318
;---------------------------------------------------------------------
319
 
1456 IgorA 320
;output:
321
; ah = symbol
322
align 4
323
proc KeyConvertToASCII, table:dword
324
  push ebx
325
  mov ebx,dword[table] ;convert scan to ascii
1338 IgorA 326
  ror ax,8
327
  xor ah,ah
328
  add bx,ax
329
  mov ah,byte[ebx]
1456 IgorA 330
  pop ebx
1338 IgorA 331
  ret
1456 IgorA 332
endp
1338 IgorA 333
 
1456 IgorA 334
align 4
1338 IgorA 335
key:
1456 IgorA 336
  mcall 66,3 ;66.3 получить состояние управляющих клавиш
1457 IgorA 337
  xor esi,esi
1338 IgorA 338
  mov ecx,1
339
  test al,0x03 ;[Shift]
340
  jz @f
1456 IgorA 341
    mov cl,2
1457 IgorA 342
    or esi,KM_SHIFT
1338 IgorA 343
  @@:
344
  test al,0x0c ;[Ctrl]
345
  jz @f
1457 IgorA 346
    or esi,KM_CTRL
1338 IgorA 347
  @@:
348
  test al,0x30 ;[Alt]
349
  jz @f
1456 IgorA 350
    mov cl,3
1457 IgorA 351
    or esi,KM_ALT
1338 IgorA 352
  @@:
353
  test al,0x80 ;[NumLock]
354
  jz @f
1457 IgorA 355
    or esi,KM_NUMLOCK
1338 IgorA 356
  @@:
1457 IgorA 357
 
1456 IgorA 358
  mcall 26,2,,conv_tabl ;26.2 получить раскладку клавиатуры
359
  mcall 2 ;получаем код нажатой клавиши
1458 IgorA 360
  stdcall [tl_key], tree1
1338 IgorA 361
 
362
  test word [edit2.flags],10b;ed_focus ; если не в фокусе, выходим
363
  je @f
364
    cmp ah,0x80 ;if key up
365
    ja still
366
    cmp ah,42 ;[Shift] (left)
367
    je still
368
    cmp ah,54 ;[Shift] (right)
369
    je still
370
    cmp ah,56 ;[Alt]
371
    je still
372
    cmp ah,29 ;[Ctrl]
373
    je still
374
    cmp ah,69 ;[Pause Break]
375
    je still
376
 
1456 IgorA 377
    stdcall KeyConvertToASCII, dword conv_tabl
1449 IgorA 378
    stdcall [edit_box_key], dword edit2
1338 IgorA 379
    jmp still
380
  @@:
381
 
1457 IgorA 382
  stdcall [ted_key], tedit0, conv_tabl,esi
1338 IgorA 383
  jmp still
384
 
1457 IgorA 385
align 4
1338 IgorA 386
button:
1449 IgorA 387
;  cmp [menu_active],1 ;если нажали меню, то сначала реакция на меню
1338 IgorA 388
;  jne @f ;mouse.menu_bar_1
389
;    mov [menu_active],0
390
;    jmp still
391
;  @@:
392
 
1449 IgorA 393
  mcall 17 ;получить код нажатой кнопки
1338 IgorA 394
  cmp ah,3
395
  jne @f
1457 IgorA 396
    call ted_but_new_file
1338 IgorA 397
  @@:
398
  cmp ah,4
399
  jne @f
1457 IgorA 400
    call ted_but_open_file
1338 IgorA 401
  @@:
402
  cmp ah,5
403
  jne @f
4308 IgorA 404
    call ted_but_save_file
1338 IgorA 405
  @@:
406
  cmp ah,6
1456 IgorA 407
  jne @f
1457 IgorA 408
    stdcall [ted_but_select_word], tedit0
1456 IgorA 409
  @@:
1338 IgorA 410
  cmp ah,7
1456 IgorA 411
  jne @f
1457 IgorA 412
    stdcall [ted_but_cut], tedit0
1456 IgorA 413
  @@:
1338 IgorA 414
  cmp ah,8
415
  jne @f
1457 IgorA 416
    stdcall [ted_but_copy], tedit0
1338 IgorA 417
  @@:
418
  cmp ah,9
1456 IgorA 419
  jne @f
1457 IgorA 420
    stdcall [ted_but_paste], tedit0
1456 IgorA 421
  @@:
1338 IgorA 422
  cmp ah,10
1449 IgorA 423
  jne @f
1457 IgorA 424
    call ted_but_find
1449 IgorA 425
  @@:
1338 IgorA 426
  cmp ah,11
1456 IgorA 427
  jne @f
428
    call but_replace
429
  @@:
1338 IgorA 430
  cmp ah,12
1456 IgorA 431
  jne @f
432
    call but_find_key_w
433
  @@:
1338 IgorA 434
  cmp ah,13
1456 IgorA 435
  jne @f
1457 IgorA 436
    stdcall [ted_but_sumb_upper], tedit0
1456 IgorA 437
  @@:
1338 IgorA 438
  cmp ah,14
1456 IgorA 439
  jne @f
1457 IgorA 440
    stdcall [ted_but_sumb_lover], tedit0
1456 IgorA 441
  @@:
1338 IgorA 442
  cmp ah,15
1456 IgorA 443
  jne @f
1457 IgorA 444
    stdcall [ted_but_reverse], tedit0
1456 IgorA 445
  @@:
1338 IgorA 446
  cmp ah,16
1456 IgorA 447
  jne @f
1457 IgorA 448
    stdcall [ted_but_undo], tedit0
1456 IgorA 449
  @@:
1338 IgorA 450
  cmp ah,17
1456 IgorA 451
  jne @f
1457 IgorA 452
    stdcall [ted_but_redo], tedit0
1456 IgorA 453
  @@:
1338 IgorA 454
  cmp ah,18
1456 IgorA 455
  jne @f
456
    stdcall but_sumb_invis, tedit0
457
  @@:
1338 IgorA 458
  cmp ah,19
1456 IgorA 459
  jne @f
460
    stdcall but_k_words_show, tedit0
461
  @@:
1338 IgorA 462
  cmp ah,20
1449 IgorA 463
  jne @f
464
    stdcall but_synt_show, tedit0
465
  @@:
4308 IgorA 466
  cmp ah,21
467
  jne @f
468
    stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866
469
  @@:
470
  cmp ah,22
471
  jne @f
472
    stdcall [ted_but_convert_by_table],tedit0,tbl_866_1251
473
  @@:
1338 IgorA 474
 
475
  cmp ah,200
476
  jne @f
1456 IgorA 477
    stdcall ted_but_open_syntax, tedit0
1338 IgorA 478
  @@:
479
  cmp ah,201
480
  jne @f
1457 IgorA 481
    stdcall [ted_but_find_next], tedit0
1338 IgorA 482
  @@:
483
 
484
  cmp ah,1
485
  jne still
486
.exit:
4991 IgorA 487
	cmp dword[exit_code],1
488
	je @f
2708 IgorA 489
	stdcall [ted_can_save], tedit0
490
	cmp al,1
491
	jne @f
4991 IgorA 492
		stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
493
		stdcall [mb_setfunctions],msgbox_2E_funct
2708 IgorA 494
		jmp still
495
	@@:
496
	stdcall mem.Free,[bmp_icon]
497
	cmp dword[unpac_mem],0
498
	je @f
499
		stdcall mem.Free,[unpac_mem]
500
	@@:
501
 
502
	stdcall [ted_delete], tedit0
503
	stdcall dword[tl_data_clear], tree1
504
	mcall -1 ;выход из программы
1456 IgorA 505
 
4308 IgorA 506
PathShow_data_1:
507
.type			dd 0	;+0
508
.start_y		dw 9	;+4
509
.start_x		dw 222	;+6
4991 IgorA 510
.font_size_x		dw 6	;+8     ; 6 - for font 0, 8 - for font 1
4308 IgorA 511
.area_size_x		dw 200	;+10
4991 IgorA 512
.font_number		dd 0	;+12    ; 0 - monospace, 1 - variable
4308 IgorA 513
.background_flag	dd 1	;+16
514
.font_color		dd 0x0	;+20
515
.background_color	dd 0xffffff	;+24
516
.text_pointer		dd openfile_path	;+28
517
.work_area_pointer	dd text_work_area	;+32
518
.temp_text_length	dd 0	;+36
1338 IgorA 519
 
1457 IgorA 520
edit2 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0
1338 IgorA 521
 
2708 IgorA 522
unpac_mem dd 0
1338 IgorA 523
 
1343 IgorA 524
if lang eq ru
2632 IgorA 525
  head_f_i:
526
  head_f_l db 'Системная ошибка',0
1592 IgorA 527
  err_message_found_lib0 db 'Не найдена библиотека ',39,'box_lib.obj',39,0
528
  err_message_import0 db 'Ошибка при импорте библиотеки ',39,'box_lib.obj',39,0
529
  err_message_found_lib1 db 'Не найдена библиотека ',39,'msgbox.obj',39,0
530
  err_message_import1 db 'Ошибка при импорте библиотеки ',39,'msgbox.obj',39,0
531
  err_message_found_lib2 db 'Не найдена библиотека ',39,'proc_lib.obj',39,0
532
  err_message_import2 db 'Ошибка при импорте библиотеки ',39,'proc_lib.obj',39,0
2632 IgorA 533
  err_message_found_lib_3 db 'Не найдена библиотека ',39,'libimg.obj',39,0
534
  err_message_import_3 db 'Ошибка при импорте библиотеки ',39,'libimg.obj',39,0
2817 IgorA 535
  err_message_found_lib_4 db 'Не найдена библиотека ',39,'libini.obj',39,0
536
  err_message_import_4 db 'Ошибка при импорте библиотеки ',39,'libini.obj',39,0
1343 IgorA 537
else
2632 IgorA 538
  head_f_i:
539
  head_f_l db 'System error',0
1592 IgorA 540
  err_message_found_lib0 db 'Sorry I cannot found library ',39,'box_lib.obj',39,0
541
  err_message_import0 db 'Error on load import library ',39,'box_lib.obj',39,0
542
  err_message_found_lib1 db 'Sorry I cannot found library ',39,'msgbox.obj',39,0
543
  err_message_import1 db 'Error on load import library ',39,'msgbox.obj',39,0
544
  err_message_found_lib2 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,0
545
  err_message_import2 db 'Error on load import library ',39,'proc_lib.obj',39,0
2632 IgorA 546
  err_message_found_lib_3 db 'Sorry I cannot found library ',39,'libimg.obj',39,0
547
  err_message_import_3 db 'Error on load import library ',39,'libimg.obj',39,0
2817 IgorA 548
  err_message_found_lib_4 db 'Sorry I cannot found library ',39,'libini.obj',39,0
549
  err_message_import_4 db 'Error on load import library ',39,'libini.obj',39,0
1343 IgorA 550
end if
1338 IgorA 551
 
552
;library structures
553
l_libs_start:
2632 IgorA 554
	lib0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
555
		err_message_found_lib0, head_f_l, import_box_lib,err_message_import0, head_f_i
556
	lib1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
557
		err_message_found_lib1, head_f_l, import_msgbox_lib, err_message_import1, head_f_i
558
	lib2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\
559
		err_message_found_lib2, head_f_l, import_proclib, err_message_import2, head_f_i
560
	lib3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\
561
		err_message_found_lib_3, head_f_l, import_libimg, err_message_import_3, head_f_i
2817 IgorA 562
	lib4 l_libs lib_name_4, sys_path, file_name, system_dir_4,\
563
		err_message_found_lib_4, head_f_l, import_libini, err_message_import_4, head_f_i
1338 IgorA 564
load_lib_end:
565
 
2708 IgorA 566
IncludeIGlobals
1338 IgorA 567
i_end:
2855 IgorA 568
	dir_mem rb 32+304*count_of_dir_list_files
569
	wnd_s_pos: ;место для настроек стартовой позиции окна
570
		rq 1
571
	last_open_synt_file rb 32 ;имя последнего подключенного файла синтаксиса
572
	buf rb BUF_SIZE ;буфер для копирования и вставки
573
	buf_find rb 302 ;буфер для поиска текста
2708 IgorA 574
IncludeUGlobals
1467 IgorA 575
	align 16
576
	procinfo process_information
1705 IgorA 577
		rb 1024
1467 IgorA 578
	thread:
1705 IgorA 579
	rb 1024
3244 IgorA 580
    thread_coords:
581
	rb 1024
1338 IgorA 582
stacktop:
4308 IgorA 583
	sys_path: ;путь откуда запустился исполняемый файл
1705 IgorA 584
		rb 4096
4308 IgorA 585
	file_name: ;параметры запуска
1705 IgorA 586
		rb 4096
4308 IgorA 587
	syntax_path: ;имя подключаемого файла синтаксиса
1705 IgorA 588
		rb 4096
589
	plugin_path:
590
		rb 4096
4308 IgorA 591
	openfile_path: ;полный путь к файлу с которым идет работа
1705 IgorA 592
		rb 4096
4308 IgorA 593
	text_work_area: ;путь к файлу, который показывается в окне
594
		rb 4096
595
	filename_area: ;имя файла для диалога открытия/закрытия
1705 IgorA 596
		rb 256
597
	file_info:
598
		rb 40
1338 IgorA 599
mem: