kol_f_edit - update program

git-svn-id: svn://kolibrios.org@3465 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2013-04-11 10:00:08 +00:00
parent 089531e644
commit 4d700e6239
3 changed files with 72 additions and 26 deletions

View File

@ -12,6 +12,4 @@ if not exist bin\font6x9.bmp @copy ..\..\fs\kfar\trunk\font6x9.bmp bin\font6x9.b
if not exist bin\asm.syn @copy ..\..\other\t_edit\info\asm.syn bin\asm.syn
copy *.ced bin\*.ced
@fasm.exe -m 16384 ..\libraries\buf2d\trunk\buf2d.asm bin\buf2d.obj
@kpack bin\buf2d.obj
pause

View File

@ -90,7 +90,7 @@ proc insert_text_label_data, obj:dword, col:dword
push eax edx
mov eax,[obj]
stdcall insert_text, txt_txt
mov edx,fp_icon
mov edx,file_name
stdcall get_obj_id_str, eax,edx ;edx = 'n'
stdcall str_cat, edx,txt_db ;edx = 'n db '
stdcall insert_text, edx
@ -470,7 +470,7 @@ proc get_code_auto_data_el
insert_br
stdcall insert_text, txt_txt
mov edx,fp_icon
mov edx,file_name
stdcall get_obj_id_str, ebx,edx
stdcall insert_text, edx
@ -564,7 +564,7 @@ proc get_code_auto_data_el_cbox
stdcall insert_text, txt_br
stdcall insert_text, txt_txt
mov edx,fp_icon
mov edx,file_name
stdcall get_obj_id_str, ebx,edx
stdcall insert_text, edx
stdcall insert_text, txt_coma
@ -615,7 +615,7 @@ proc get_code_auto_data_libs_param
stdcall insert_text, txt_sys_dir
;object code
mov edx,fp_icon
mov edx,file_name
stdcall get_obj_id_str, ebx,edx
stdcall insert_text,edx
stdcall insert_text,txt_db
@ -683,7 +683,7 @@ proc get_code_auto_data_libs_struc
stdcall insert_text, txt_lib
;object code
mov edx,fp_icon
mov edx,file_name
stdcall get_obj_id_str, ebx,edx
stdcall insert_text,edx
insert_sp
@ -856,7 +856,7 @@ proc get_code_auto_data_dop
;ä®à¬¨à㥬 ⥪áâ®¢ë¥ ¤ ­­ë¥ ¤«ï editbox-®¢
stdcall insert_text, txt_txt
mov edx,fp_icon
mov edx,file_name
stdcall get_obj_id_str, ebx,edx
stdcall insert_text,edx
@ -875,7 +875,7 @@ proc get_code_auto_data_dop
stdcall insert_text, txt_met_end
stdcall insert_text, txt_rb
stdcall insert_text, txt_txt
mov edx,fp_icon
mov edx,file_name
stdcall get_obj_id_str, ebx,edx
stdcall insert_text,edx
@ -1293,7 +1293,7 @@ proc get_code_draw_obj
insert_reg txt_edx
insert_coma
stdcall insert_text, txt_txt
mov edx,fp_icon
mov edx,file_name
stdcall get_obj_id_str, ebx,edx
stdcall insert_text,edx
insert_nl

View File

@ -19,7 +19,7 @@ include 'obj_codes.inc'
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load
hed db 'kol_f_edit 10.03.11',0
hed db 'kol_f_edit 11.04.13',0
sizeof.TreeList equ 20 ;need for element 'tree_list'
@ -64,9 +64,19 @@ BIT_MOD_BUT_NFON equ 0 ;
BIT_MOD_BUT_NBORD equ 1 ;á⨫ì Button ­¥ à¨á®¢ âì £à ­¨æã
BIT_MOD_IMPORT_FUNCT_COMMENT equ 0 ;ª®¬¥­â¨à®¢ âì äã­ªæ¨î
macro load_image_file path,buf,size ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨©
{
copy_path path,sys_path,fp_icon,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
macro load_image_file path,buf,size { ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨©
;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥­­®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬
if path eqtype '' ;¯à®¢¥à塞 § ¤ ­ «¨ áâப®© ¯ à ¬¥âà path
jmp @f
local .path_str
.path_str db path ;ä®à¬¨à㥬 «®ª «ì­ãî ¯¥à¥¬¥­­ãî
db 0
@@:
;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
copy_path .path_str,[32],file_name,0x0
else
copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
end if
stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
mov [buf],eax
@ -78,7 +88,7 @@ macro load_image_file path,buf,size ;
mov [run_file_70.Count], dword size
m2m [run_file_70.Buffer], [buf]
mov byte[run_file_70+20], 0
mov [run_file_70.FileName], fp_icon
mov [run_file_70.FileName], file_name
mov ebx,run_file_70
int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
cmp ebx,0xffffffff
@ -135,14 +145,12 @@ IMAGE_FILE_SKIN1_SIZE equ 3*(SKIN_W1+3)*SKIN_H+54
IMAGE_FILE_SKIN2_SIZE equ 3*(SKIN_W2+3)*SKIN_H+54
IMAGE_FILE_SKIN3_SIZE equ 3*(SKIN_W3+3)*SKIN_H+54
fn_font_s1 db 'font6x9.bmp',0
IMAGE_FILE_FONT1_SIZE equ 96*144*3 ;à §¬¥à ä ©«  á 1-¬ á¨á⥬­ë¬ èà¨ä⮬
fn_icon db 'icon.bmp',0
count_main_icons equ 35 ;ç¨á«® ¨ª®­®ª ¢ ä ©«¥ icon.bmp
bmp_icon rb 0x300*count_main_icons
fn_icon_tl_sys db 'tl_sys_16.png',0
TREE_ICON_SYS16_BMP_SIZE equ 256*3*11+54 ;à §¬¥à bmp ä ©«  á á¨á⥬­ë¬¨ ¨ª®­ª ¬¨
icon_tl_sys dd 0 ;㪠§ â¥¥«ì ­  ¯ ¬ïâì ¤«ï åà ­¥­¨ï á¨á⥬­ëå ¨ª®­®ª
icon_font_s1 dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì ¤«ï § £à㧪¨ èà¨äâ 
@ -206,7 +214,7 @@ start:
stdcall dword[tl_data_init], tree1
stdcall dword[tl_data_init], tree2
copy_path fn_icon,sys_path,fp_icon,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
copy_path fn_icon,sys_path,file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
mov eax,70 ;load icon file
mov [run_file_70.Function], 0
mov [run_file_70.Position], 54
@ -214,7 +222,7 @@ start:
mov [run_file_70.Count], 0x300*count_main_icons
mov [run_file_70.Buffer], bmp_icon
mov [run_file_70.rezerv], 0
mov [run_file_70.FileName], fp_icon
mov [run_file_70.FileName], file_name
mov ebx,run_file_70
int 0x40
@ -227,7 +235,7 @@ start:
@@:
;á¨á⥬­ë¥ ¨ª®­ª¨ 16*16 ¤«ï tree_list
load_image_file fn_icon_tl_sys, icon_tl_sys,TREE_ICON_SYS16_BMP_SIZE
load_image_file 'tl_sys_16.png', icon_tl_sys,TREE_ICON_SYS16_BMP_SIZE
;¥á«¨ ¨§®¡à ¦¥­¨¥ ­¥ ®âªàë«®áì, â® ¢ icon_tl_sys ¡ã¤ãâ
;­¥ ¨­¨æ¨ «¨§¨à®¢ ­­ë¥ ¤ ­­ë¥, ­® ®è¨¡ª¨ ­¥ ¡ã¤¥â, â. ª. ¡ãä¥à ­ã¦­®£® à §¬¥à 
mov eax,dword[icon_tl_sys]
@ -248,7 +256,7 @@ start:
stdcall mem.Free,[icon_font_s1] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
;ᨬ¢®«ë 1-£® á¨á⥬­®£® èà¨äâ 
load_image_file fn_font_s1, icon_font_s1,IMAGE_FILE_FONT1_SIZE
load_image_file 'font6x9.bmp', icon_font_s1,IMAGE_FILE_FONT1_SIZE
stdcall [buf2d_create_f_img], buf_font,[icon_font_s1] ;ᮧ¤ ¥¬ ¡ãä¥à
stdcall mem.Free,[icon_font_s1] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
stdcall [buf2d_conv_24_to_8], buf_font,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8 ¡¨â
@ -292,10 +300,47 @@ start:
.open_end:
stdcall [ted_init], tedit0
copy_path fn_syntax,sys_path,fp_icon,0x0
stdcall [ted_init_syntax_file], tedit0,run_file_70,fp_icon
;mov edi,tedit0
;call [ted_text_colored]
copy_path fn_syntax,sys_path,file_name,0x0
; *** init syntax file ***
; ¯à®¢¥à塞 à §¬¥à ä ©«  ᨭ⠪á¨á 
mov eax,70
mov [run_file_70.Function], 5
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
mov dword[run_file_70.Count], 0
mov dword[run_file_70.Buffer], open_b
mov byte[run_file_70+20], 0
mov dword[run_file_70.FileName], file_name
mov ebx,run_file_70
int 0x40
cmp eax,0
jne @f
mov edi,tedit0
mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©«  ¢ ¡ ©â å
mov ted_syntax_file_size,ecx
stdcall mem.Alloc,ecx ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ä ©«  ᨭ⠪á¨á 
mov ted_syntax_file,eax
;¯à®¡ã¥¬ ®âªàëâì ä ©« ᨭ⠪á¨á 
mov ebx,run_file_70
mov dword[ebx], 0
mov dword[ebx+4], 0
mov dword[ebx+8], 0
mov dword[ebx+12], ecx
mov dword[ebx+16], eax ;ted_syntax_file
mov byte[ebx+20], 0
m2m dword[ebx+21], file_name
mcall 70
cmp eax,0
jne @f
stdcall [ted_init_syntax_file],edi
jmp .end_0
@@:
notify_window_run txt_not_syntax_file
.end_0:
;get cmd line
cmp [buf_cmd_lin],0
@ -1152,6 +1197,8 @@ foc_obj dd 0 ;
obj_count_txt_props dd 0 ;ª®«¨ç¥á⢮ ¨á¯®«ì§ã¥¬ëå ⥪á⮢ëå ᢮©áâ¢
obj_m_win dd 0 ;áâàãªâãà  £« ¢­®£® ®ª­ 
txt_not_syntax_file db '<27>¥ ­ ©¤¥­ ä ©« ¤«ï ¯®¤á¢¥âª¨ ᨭ⠪á¨á .',0
;
if 1 ;lang eq ru
@ -1459,10 +1506,11 @@ load_lib_end:
align 16
procinfo process_information
run_file_70 FileInfoBlock
open_b rb 560
i_end:
buf_cmd_lin rb 1024
fp_icon rb 1024 ;icon file path
file_name rb 1024 ;icon file path
fp_obj_opt rb 1024 ;obj options file patch
rb 1024
prop_thread: