Subversion Repositories Kolibri OS

Rev

Rev 4128 | Rev 4991 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4128 Rev 4308
Line 1... Line 1...
1
;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, Heavyiron
1
;Ž£à®¬­ ï ¡« £®¤ à­®áâì ¢á¥¬, ªâ® ¯®¬®£ «: ª®¤®¬/ᮢ¥â®¬/¤¨§ ©­®¬ ...
2
;¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬,   â ª¦¥
-
 
3
;’¥¯«®¢ã €«¥ªá¥î ( www.lrz.land.ru)
-
 
4
 
-
 
Line 5... Line 2...
5
 
2
 
6
use32
3
use32
7
  org 0x0
4
  org 0x0
8
  db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
5
  db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
Line 16... Line 13...
16
 
13
 
17
MAX_COLOR_WORD_LEN equ 40
14
MAX_COLOR_WORD_LEN equ 40
18
maxChars equ 100002 ;(...+2)
15
maxChars equ 100002 ;(...+2)
19
BUF_SIZE equ 4096 ;buffer for copy|paste
16
BUF_SIZE equ 4096 ;buffer for copy|paste
20
maxSyntaxFileSize equ 410000
17
maxSyntaxFileSize equ 410000
Line 21... Line 18...
21
TOOLBAR_ICONS_SIZE equ 1200*18
18
TOOLBAR_ICONS_SIZE equ 1200*20
22
 
19
 
23
include '../../proc32.inc'
20
include '../../proc32.inc'
24
;include '../../config.inc'
21
;include '../../config.inc'
Line 100... Line 97...
100
  mov esi,file_name
97
	mov esi,file_name
101
  call strlen
98
	call strlen
102
  mov ecx,eax
99
	mov ecx,eax
103
  mov edi,openfile_path
100
	mov edi,openfile_path
104
  cld
101
	cld
105
  rep movsb ;ª®¯¨à㥬 ¨¬ï ä ©«  ¢ ¡ãä¥à edit1
102
	rep movsb ;ª®¯¨à㥬 ¨¬ï ä ©«  ¢ ¡ãä¥à openfile_path
Line 106... Line 103...
106
 
103
 
Line 107... Line 104...
107
load_libraries l_libs_start,load_lib_end
104
load_libraries l_libs_start,load_lib_end
108
 
105
 
-
 
106
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨
109
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨
107
mov	ebp,lib0
110
	mov	ebp,lib0
108
.test_lib_open:
111
	cmp	dword [ebp+ll_struc_size-4],0
109
	cmp	dword [ebp+ll_struc_size-4],0
112
	jz	@f
110
	jz	@f
113
	mcall -1 ;exit not correct
-
 
114
@@:
111
	mcall -1 ;exit not correct
115
	mov	ebp,lib1 ;
-
 
116
	cmp	dword [ebp+ll_struc_size-4],0
-
 
117
	jz	@f
-
 
118
	mcall -1 ;exit not correct
-
 
119
@@:
112
@@:
120
 
-
 
121
	cmp dword[version_text_edit],3
-
 
122
	jge @f
113
	add ebp,ll_struc_size
123
		stdcall [mb_create],msgbox_10,thread
-
 
Line 124... Line 114...
124
		mcall -1
114
	cmp ebp,load_lib_end
125
	@@:
115
	jl .test_lib_open
126
 
116
 
Line 127... Line 117...
127
;---------------------------------------------------------------------
117
;---------------------------------------------------------------------
128
	stdcall [ted_init], tedit0
118
	stdcall [ted_init], tedit0
-
 
119
	stdcall dword[tl_data_init], tree1
-
 
120
 
-
 
121
; OpenDialog initialisation
-
 
122
	stdcall [OpenDialog_Init],OpenDialog_data
Line 129... Line 123...
129
	stdcall dword[tl_data_init], tree1
123
	mov eax,[sc.work_button_text]
130
 
124
	mov [PathShow_data_1.font_color],eax
131
; OpenDialog initialisation
125
	mov eax,[sc.work_button]
132
	stdcall [OpenDialog_Init],OpenDialog_data
126
	mov [PathShow_data_1.background_color],eax
Line 221... Line 215...
221
;--- get cmd line ---
215
;--- get cmd line ---
222
	cmp byte[openfile_path+3],0 ;openfile_path
216
	cmp byte[openfile_path+3],0 ;openfile_path
223
	je @f ;if file names exist
217
	je @f ;if file names exist
224
		mov esi,openfile_path
218
		mov esi,openfile_path
225
		call strlen ;eax=strlen
219
		call strlen ;eax=strlen
226
		mov [edit1.size],eax
-
 
227
		call but_no_msg_OpenFile
220
		call but_no_msg_OpenFile
228
	@@:
221
	@@:
Line 274... Line 267...
274
	mov ecx,[sc.work_text]
267
	mov ecx,[sc.work_text]
275
	or  ecx,0x80000000
268
	or  ecx,0x80000000
276
	mov edx,txtFile
269
	mov edx,txtFile
277
	int 0x40
270
	int 0x40
Line 278... Line 271...
278
 
271
 
279
  stdcall [edit_box_draw], dword edit1
272
	stdcall [PathShow_draw], dword PathShow_data_1
Line 280... Line 273...
280
  stdcall [menu_bar_draw], dword menu_data_1
273
	stdcall [menu_bar_draw], dword menu_data_1
Line 281... Line 274...
281
 
274
 
Line 286... Line 279...
286
  mcall 12,2
279
	mcall 12,2
287
  ret
280
	ret
Line 288... Line 281...
288
 
281
 
289
align 4
282
align 4
290
mouse:
-
 
291
	stdcall [edit_box_mouse], dword edit1
-
 
292
 
-
 
293
	test word [edit1.flags],10b ;ed_focus ;¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
-
 
294
	jne still
-
 
295
 
283
mouse:
Line 296... Line 284...
296
	stdcall [ted_mouse], tedit0
284
	stdcall [ted_mouse], tedit0
297
 
285
 
298
	cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel
286
	cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel
Line 311... Line 299...
311
	jne .mnu_1
299
	jne .mnu_1
312
	cmp dword[menu_data_1.cursor_out],4
300
	cmp dword[menu_data_1.cursor_out],4
313
	je button.exit	
301
	je button.exit	
314
	cmp dword[menu_data_1.cursor_out],3
302
	cmp dword[menu_data_1.cursor_out],3
315
	jne @f
303
	jne @f
316
		stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text]
304
		call ted_but_save_file
317
	@@:
305
	@@:
318
	cmp dword[menu_data_1.cursor_out],2
306
	cmp dword[menu_data_1.cursor_out],2
319
	jne @f
307
	jne @f
320
		call ted_but_open_file
308
		call ted_but_open_file
321
	@@:
309
	@@:
Line 367... Line 355...
367
 
355
 
368
  mcall 26,2,,conv_tabl ;26.2 ¯®«ãç¨âì à áª« ¤ªã ª« ¢¨ âãàë
356
  mcall 26,2,,conv_tabl ;26.2 ¯®«ãç¨âì à áª« ¤ªã ª« ¢¨ âãàë
369
  mcall 2 ;¯®«ãç ¥¬ ª®¤ ­ ¦ â®© ª« ¢¨è¨
357
  mcall 2 ;¯®«ãç ¥¬ ª®¤ ­ ¦ â®© ª« ¢¨è¨
Line 370... Line -...
370
  stdcall [tl_key], tree1
-
 
371
 
-
 
372
  test word [edit1.flags],10b;ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
-
 
373
  je @f
-
 
374
    cmp ah,0x80 ;if key up
-
 
375
    ja still
-
 
376
    cmp ah,42 ;[Shift] (left)
-
 
377
    je still
-
 
378
    cmp ah,54 ;[Shift] (right)
-
 
379
    je still
-
 
380
    cmp ah,56 ;[Alt]
-
 
381
    je still
-
 
382
    cmp ah,29 ;[Ctrl]
-
 
383
    je still
-
 
384
    cmp ah,69 ;[Pause Break]
-
 
385
    je still
-
 
386
 
-
 
387
    stdcall KeyConvertToASCII, dword conv_tabl
-
 
388
    stdcall [edit_box_key], dword edit1
-
 
389
    jmp still
-
 
390
  @@:
358
  stdcall [tl_key], tree1
391
 
359
 
392
  test word [edit2.flags],10b;ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
360
  test word [edit2.flags],10b;ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
393
  je @f
361
  je @f
394
    cmp ah,0x80 ;if key up
362
    cmp ah,0x80 ;if key up
Line 429... Line 397...
429
  jne @f
397
  jne @f
430
    call ted_but_open_file
398
    call ted_but_open_file
431
  @@:
399
  @@:
432
  cmp ah,5
400
  cmp ah,5
433
  jne @f
401
  jne @f
434
    stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text]
402
    call ted_but_save_file
435
  @@:
403
  @@:
436
  cmp ah,6
404
  cmp ah,6
437
  jne @f
405
  jne @f
438
    stdcall [ted_but_select_word], tedit0
406
    stdcall [ted_but_select_word], tedit0
439
  @@:
407
  @@:
Line 491... Line 459...
491
  @@:
459
  @@:
492
  cmp ah,20
460
  cmp ah,20
493
  jne @f
461
  jne @f
494
    stdcall but_synt_show, tedit0
462
    stdcall but_synt_show, tedit0
495
  @@:
463
  @@:
-
 
464
  cmp ah,21
-
 
465
  jne @f
-
 
466
    stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866
-
 
467
  @@:
-
 
468
  cmp ah,22
-
 
469
  jne @f
-
 
470
    stdcall [ted_but_convert_by_table],tedit0,tbl_866_1251
-
 
471
  @@:
Line 496... Line 472...
496
 
472
 
497
  cmp ah,200
473
  cmp ah,200
498
  jne @f
474
  jne @f
499
    stdcall ted_but_open_syntax, tedit0
475
    stdcall ted_but_open_syntax, tedit0
Line 520... Line 496...
520
 
496
 
521
	stdcall [ted_delete], tedit0
497
	stdcall [ted_delete], tedit0
522
	stdcall dword[tl_data_clear], tree1
498
	stdcall dword[tl_data_clear], tree1
Line -... Line 499...
-
 
499
	mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
-
 
500
 
-
 
501
PathShow_data_1:
-
 
502
.type			dd 0	;+0
-
 
503
.start_y		dw 9	;+4
-
 
504
.start_x		dw 222	;+6
-
 
505
.font_size_x		dw 6	;+8	; 6 - for font 0, 8 - for font 1
-
 
506
.area_size_x		dw 200	;+10
-
 
507
.font_number		dd 0	;+12	; 0 - monospace, 1 - variable
-
 
508
.background_flag	dd 1	;+16
-
 
509
.font_color		dd 0x0	;+20
-
 
510
.background_color	dd 0xffffff	;+24
-
 
511
.text_pointer		dd openfile_path	;+28
Line 523... Line -...
523
	mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
-
 
524
 
512
.work_area_pointer	dd text_work_area	;+32
Line 525... Line 513...
525
 
513
.temp_text_length	dd 0	;+36
Line 526... Line 514...
526
edit1 edit_box 250, 220, 5, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 4090, openfile_path, mouse_dd, 0
514
 
Line 585... Line 573...
585
	thread:
573
	thread:
586
	rb 1024
574
	rb 1024
587
    thread_coords:
575
    thread_coords:
588
	rb 1024
576
	rb 1024
589
stacktop:
577
stacktop:
590
	sys_path:
578
	sys_path: ;¯ãâì ®âªã¤  § ¯ãá⨫áï ¨á¯®«­ï¥¬ë© ä ©«
591
		rb 4096
579
		rb 4096
592
	file_name:
580
	file_name: ;¯ à ¬¥âàë § ¯ã᪠
593
		rb 4096
581
		rb 4096
594
	file_name_rez:
582
	syntax_path: ;¨¬ï ¯®¤ª«îç ¥¬®£® ä ©«  ᨭ⠪á¨á 
595
		rb 4096
583
		rb 4096
596
	plugin_path:
584
	plugin_path:
597
		rb 4096
585
		rb 4096
-
 
586
	openfile_path: ;¯®«­ë© ¯ãâì ª ä ©«ã á ª®â®àë¬ ¨¤¥â à ¡®â 
598
	openfile_path:
587
		rb 4096
-
 
588
	text_work_area: ;¯ãâì ª ä ©«ã, ª®â®àë© ¯®ª §ë¢ ¥âáï ¢ ®ª­¥
599
		rb 4096
589
		rb 4096
600
	filename_area:
590
	filename_area: ;¨¬ï ä ©«  ¤«ï ¤¨ «®£  ®âªàëâ¨ï/§ ªàëâ¨ï
601
		rb 256
591
		rb 256
602
	file_info:
592
	file_info:
603
		rb 40
593
		rb 40
604
mem:
594
mem: