Subversion Repositories Kolibri OS

Rev

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

Rev 5643 Rev 5649
Line 119... Line 119...
119
	stdcall dword[tl_data_init], tree1
119
	stdcall dword[tl_data_init], tree1
Line 120... Line 120...
120
 
120
 
121
; OpenDialog initialisation
121
; OpenDialog initialisation
Line -... Line 122...
-
 
122
	stdcall [OpenDialog_Init],OpenDialog_data
-
 
123
 
-
 
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]
122
	stdcall [OpenDialog_Init],OpenDialog_data
145
	stdcall [ksubmenu_add], [main_menu], eax
123
 
146
 
124
; init toolbar file
147
; init toolbar file
125
	load_image_file 'te_icon.png', bmp_icon,TOOLBAR_ICONS_SIZE*2 ;㬭®¦¥­¨¥ ­  2 ¤«ï á¥àëå ª­®¯®ª
148
	load_image_file 'te_icon.png', bmp_icon,TOOLBAR_ICONS_SIZE*2 ;㬭®¦¥­¨¥ ­  2 ¤«ï á¥àëå ª­®¯®ª
126
	mov eax,[bmp_icon]
149
	mov eax,[bmp_icon]
Line 258... Line 281...
258
	mov ecx,ted_wnd_t
281
	mov ecx,ted_wnd_t
259
	mov bx,word[procinfo.client_box.width]
282
	mov bx,word[procinfo.client_box.width]
260
	inc bx
283
	inc bx
261
	int 0x40
284
	int 0x40
Line 262... Line -...
262
 
-
 
263
	; mov eax,4
-
 
264
	; mov ebx,185*65536+9
-
 
265
	; mov ecx,[sc.work_text]
-
 
266
	; or  ecx,0x80000000
-
 
267
	; mov edx,txtFile
-
 
268
	; int 0x40
-
 
269
 
285
 
Line -... Line 286...
-
 
286
	call draw_but_toolbar
-
 
287
	
270
	call draw_but_toolbar
288
	stdcall [kmainmenu_draw], [main_menu]
Line 271... Line 289...
271
 
289
 
272
	stdcall [ted_draw], tedit0
290
	stdcall [ted_draw], tedit0
Line 273... Line 291...
273
 
291
 
274
	mcall 12,2
292
	mcall 12,2
-
 
293
	ret
275
	ret
294
 
Line 276... Line 295...
276
 
295
align 4
277
align 4
296
mouse:
278
mouse:
297
	stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
279
	stdcall [ted_mouse], tedit0
298
	stdcall [ted_mouse], tedit0
280
 
299
 
281
	cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel
300
	cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel
282
	jne @f
301
	jne @f
283
		stdcall [edit_box_mouse], dword edit2
-
 
284
	@@:
-
 
285
	cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX ;if not panel
-
 
286
	jne @f ;.menu_bar_1
-
 
287
	stdcall [tl_mouse], tree1
-
 
288
;-----------------------------------------------
-
 
289
.menu_bar_1:
-
 
290
	mov [menu_data_1.get_mouse_flag],1
-
 
291
; mouse event for Menu 1
-
 
292
	stdcall [menu_bar_mouse],dword menu_data_1
-
 
293
	cmp dword[menu_data_1.click],1
-
 
294
	jne .mnu_1
-
 
295
	cmp dword[menu_data_1.cursor_out],4
-
 
296
	je button.exit	
-
 
297
	cmp dword[menu_data_1.cursor_out],3
-
 
298
	jne @f
-
 
299
		call ted_but_save_file
-
 
300
	@@:
-
 
301
	cmp dword[menu_data_1.cursor_out],2
-
 
302
	jne @f
-
 
303
		call ted_but_open_file
-
 
304
	@@:
302
		stdcall [edit_box_mouse], dword edit2
305
	cmp dword[menu_data_1.cursor_out],1
303
	@@:
306
	jne @f
304
	cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX ;if not panel
Line 307... Line 305...
307
		call ted_but_new_file
305
	jne .mouse_end
308
	@@:
306
	stdcall [tl_mouse], tree1
Line 375... Line 373...
375
  stdcall [ted_key], tedit0, conv_tabl,esi
373
  stdcall [ted_key], tedit0, conv_tabl,esi
376
  jmp still
374
  jmp still
Line 377... Line 375...
377
 
375
 
378
align 4
376
align 4
379
button:
-
 
380
;  cmp [menu_active],1 ;¥á«¨ ­ ¦ «¨ ¬¥­î, â® á­ ç «  ॠªæ¨ï ­  ¬¥­î
-
 
381
;  jne @f ;mouse.menu_bar_1
-
 
382
;    mov [menu_active],0
-
 
383
;    jmp still
-
 
Line 384... Line 377...
384
;  @@:
377
button:
385
 
378
 
386
  mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
379
  mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
387
  cmp ah,3
380
  cmp ah,3
Line 473... Line 466...
473
  jne @f
466
  jne @f
474
    stdcall [ted_but_find_next], tedit0
467
    stdcall [ted_but_find_next], tedit0
475
  @@:
468
  @@:
Line 476... Line 469...
476
 
469
 
-
 
470
  cmp ah,1
-
 
471
  je .exit
-
 
472
 
-
 
473
  cmp ah,199
-
 
474
  je .exit
477
  cmp ah,1
475
  
478
  jne still
476
  jmp still
479
.exit:
477
.exit:
480
	cmp dword[exit_code],1
478
	cmp dword[exit_code],1
481
	je @f
479
	je @f
482
	stdcall [ted_can_save], tedit0
480
	stdcall [ted_can_save], tedit0
Line 511... Line 509...
511
  err_message_import2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
509
  err_message_import2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
512
  err_message_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
510
  err_message_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
513
  err_message_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
511
  err_message_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
514
  err_message_found_lib_4 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libini.obj',39,0
512
  err_message_found_lib_4 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libini.obj',39,0
515
  err_message_import_4 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libini.obj',39,0
513
  err_message_import_4 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libini.obj',39,0
-
 
514
  err_message_found_lib_5 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libkmenu.obj',39,0
-
 
515
  err_message_import_5 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libkmenu.obj',39,0
516
else
516
else
517
  head_f_i:
517
  head_f_i:
518
  head_f_l db 'System error',0
518
  head_f_l db 'System error',0
519
  err_message_found_lib0 db 'Sorry I cannot found library ',39,'box_lib.obj',39,0
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
520
  err_message_import0 db 'Error on load import library ',39,'box_lib.obj',39,0
Line 524... Line 524...
524
  err_message_import2 db 'Error on load import library ',39,'proc_lib.obj',39,0
524
  err_message_import2 db 'Error on load import library ',39,'proc_lib.obj',39,0
525
  err_message_found_lib_3 db 'Sorry I cannot found library ',39,'libimg.obj',39,0
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
526
  err_message_import_3 db 'Error on load import library ',39,'libimg.obj',39,0
527
  err_message_found_lib_4 db 'Sorry I cannot found library ',39,'libini.obj',39,0
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
528
  err_message_import_4 db 'Error on load import library ',39,'libini.obj',39,0
-
 
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
529
end if
531
end if
Line 530... Line 532...
530
 
532
 
531
;library structures
533
;library structures
532
l_libs_start:
534
l_libs_start:
Line 538... Line 540...
538
		err_message_found_lib2, head_f_l, import_proclib, err_message_import2, head_f_i
540
		err_message_found_lib2, head_f_l, import_proclib, err_message_import2, head_f_i
539
	lib3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\
541
	lib3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\
540
		err_message_found_lib_3, head_f_l, import_libimg, err_message_import_3, head_f_i
542
		err_message_found_lib_3, head_f_l, import_libimg, err_message_import_3, head_f_i
541
	lib4 l_libs lib_name_4, sys_path, file_name, system_dir_4,\
543
	lib4 l_libs lib_name_4, sys_path, file_name, system_dir_4,\
542
		err_message_found_lib_4, head_f_l, import_libini, err_message_import_4, head_f_i
544
		err_message_found_lib_4, head_f_l, import_libini, err_message_import_4, head_f_i
-
 
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
543
load_lib_end:
547
load_lib_end:
Line 544... Line 548...
544
 
548
 
545
IncludeIGlobals
549
IncludeIGlobals
546
hed db 'TextEdit '
550
hed db 'TextEdit '