forked from KolibriOS/kolibrios
update 'te_syntax': use *.png icons and other changes
git-svn-id: svn://kolibrios.org@4990 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e7e198c752
commit
664313ede7
@ -1,13 +1,8 @@
|
||||
if not exist bin mkdir bin
|
||||
if not exist bin\tl_sys_16.bmp @copy ..\..\develop\libraries\box_lib\trunk\tl_sys_16.bmp bin\tl_sys_16.bmp
|
||||
if not exist bin\tl_nod_16.bmp @copy ..\..\develop\libraries\box_lib\trunk\tl_nod_16.bmp bin\tl_nod_16.bmp
|
||||
if not exist bin\info mkdir bin\info
|
||||
|
||||
if not exist bin\box_lib.obj @fasm.exe -m 16384 ..\..\develop\libraries\box_lib\trunk\box_lib.asm bin\box_lib.obj
|
||||
@kpack bin\box_lib.obj
|
||||
if not exist bin\tl_sys_16.png @copy ..\..\media\log_el\trunk\tl_sys_16.png bin\tl_sys_16.png
|
||||
if not exist bin\tl_nod_16.png @copy ..\t_edit\tl_nod_16.png bin\tl_nod_16.png
|
||||
|
||||
@fasm.exe -m 16384 te_syntax.asm bin\te_syntax.kex
|
||||
@kpack bin\te_syntax.kex
|
||||
|
||||
..\t_edit\info\build.bat ..\t_edit\info\ bin\info\
|
||||
pause
|
@ -2,27 +2,25 @@ fn_col_option dd def_col_file
|
||||
fn_syntax_dir db 'info/',0
|
||||
def_col_file db 'default.syn',0
|
||||
|
||||
system_dir0 db '/sys/lib/'
|
||||
boxlib_name db 'box_lib.obj',0
|
||||
system_dir_0 db '/sys/lib/'
|
||||
lib_name_0 db 'box_lib.obj',0
|
||||
|
||||
fn_icon_tl_sys db 'tl_sys_16.bmp',0
|
||||
fn_icon_tl_nod db 'tl_nod_16.bmp',0
|
||||
system_dir_1 db '/sys/lib/'
|
||||
lib_name_1 db 'libimg.obj',0
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
align 4
|
||||
boxlib_import:
|
||||
import_box_lib:
|
||||
dd alib_init2 ;äãªæ¨ï § ¯ã᪠¥âáï ¬ ªà®á®¬ 1 à § ¯à¨ ¯®¤ª«î票¨ ¡¨¡¨«¨®â¥ª¨, ¯®â®¬ã ¢ ¯à®£à ¬¬¥ ¬¥âª ¥¥ ¥ ã¦
|
||||
|
||||
edit_box_draw dd aEdit_box_draw
|
||||
edit_box_key dd aEdit_box_key
|
||||
edit_box_mouse dd aEdit_box_mouse
|
||||
version_ed dd aVersion_ed
|
||||
|
||||
scrollbar_ver_draw dd aScrollbar_ver_draw
|
||||
scrollbar_ver_mouse dd aScrollbar_ver_mouse
|
||||
scrollbar_hor_draw dd aScrollbar_hor_draw
|
||||
scrollbar_hor_mouse dd aScrollbar_hor_mouse
|
||||
version_scrollbar dd aVersion_scrollbar
|
||||
|
||||
tl_data_init dd sz_tl_data_init
|
||||
tl_data_clear dd sz_tl_data_clear
|
||||
@ -46,7 +44,6 @@ tl_node_move_down dd sz_tl_node_move_down
|
||||
tl_save_mem dd sz_tl_save_mem
|
||||
tl_load_mem dd sz_tl_load_mem
|
||||
|
||||
ted_but_save_file dd sz_ted_but_save_file
|
||||
ted_but_sumb_upper dd sz_ted_but_sumb_upper
|
||||
ted_but_sumb_lover dd sz_ted_but_sumb_lover
|
||||
ted_can_save dd sz_ted_can_save
|
||||
@ -60,6 +57,7 @@ ted_is_select dd sz_ted_is_select
|
||||
ted_key dd sz_ted_key
|
||||
ted_mouse dd sz_ted_mouse
|
||||
ted_open_file dd sz_ted_open_file
|
||||
ted_save_file dd sz_ted_save_file
|
||||
ted_text_add dd sz_ted_text_add
|
||||
ted_but_select_word dd sz_ted_but_select_word
|
||||
ted_but_cut dd sz_ted_but_cut
|
||||
@ -70,11 +68,9 @@ ted_but_redo dd sz_ted_but_redo
|
||||
ted_but_reverse dd sz_ted_but_reverse
|
||||
ted_but_find_next dd sz_ted_but_find_next
|
||||
ted_text_colored dd sz_ted_text_colored
|
||||
;version_text_edit dd sz_ted_version
|
||||
|
||||
PathShow_prepare dd sz_PathShow_prepare
|
||||
PathShow_draw dd sz_PathShow_draw
|
||||
;Version_path_show dd szVersion_path_show
|
||||
|
||||
dd 0,0
|
||||
alib_init2 db 'lib_init',0
|
||||
@ -82,13 +78,11 @@ alib_init2 db 'lib_init',0
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
aEdit_box_mouse db 'edit_box_mouse',0
|
||||
aVersion_ed db 'version_ed',0
|
||||
|
||||
aScrollbar_ver_draw db 'scrollbar_v_draw',0
|
||||
aScrollbar_ver_mouse db 'scrollbar_v_mouse',0
|
||||
aScrollbar_hor_draw db 'scrollbar_h_draw',0
|
||||
aScrollbar_hor_mouse db 'scrollbar_h_mouse',0
|
||||
aVersion_scrollbar db 'version_scrollbar',0
|
||||
|
||||
sz_tl_data_init db 'tl_data_init',0
|
||||
sz_tl_data_clear db 'tl_data_clear',0
|
||||
@ -112,7 +106,6 @@ sz_tl_node_move_down db 'tl_node_move_down',0
|
||||
sz_tl_save_mem db 'tl_save_mem',0
|
||||
sz_tl_load_mem db 'tl_load_mem',0
|
||||
|
||||
sz_ted_but_save_file db 'ted_but_save_file',0
|
||||
sz_ted_but_sumb_upper db 'ted_but_sumb_upper',0
|
||||
sz_ted_but_sumb_lover db 'ted_but_sumb_lover',0
|
||||
sz_ted_can_save db 'ted_can_save',0
|
||||
@ -126,6 +119,7 @@ sz_ted_is_select db 'ted_is_select',0
|
||||
sz_ted_key db 'ted_key',0
|
||||
sz_ted_mouse db 'ted_mouse',0
|
||||
sz_ted_open_file db 'ted_open_file',0
|
||||
sz_ted_save_file db 'ted_save_file',0
|
||||
sz_ted_text_add db 'ted_text_add',0
|
||||
sz_ted_but_select_word db 'ted_but_select_word',0
|
||||
sz_ted_but_cut db 'ted_but_cut',0
|
||||
@ -136,12 +130,22 @@ sz_ted_but_redo db 'ted_but_redo',0
|
||||
sz_ted_but_reverse db 'ted_but_reverse',0
|
||||
sz_ted_but_find_next db 'ted_but_find_next',0
|
||||
sz_ted_text_colored db 'ted_text_colored',0
|
||||
;sz_ted_version db 'version_text_edit',0
|
||||
|
||||
sz_PathShow_prepare db 'PathShow_prepare',0
|
||||
sz_PathShow_draw db 'PathShow_draw',0
|
||||
;szVersion_path_show db 'version_PathShow',0
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
align 4
|
||||
import_libimg:
|
||||
dd alib_init1
|
||||
img_to_rgb2 dd aimg_to_rgb2
|
||||
img_decode dd aimg_decode
|
||||
img_destroy dd aimg_destroy
|
||||
dd 0,0
|
||||
alib_init1 db 'lib_init',0
|
||||
aimg_to_rgb2 db 'img_to_rgb2',0
|
||||
aimg_decode db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ëå
|
||||
aimg_destroy db 'img_destroy',0
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
ws_dir_lbox: ;¤®ç¥à¨© áªà®««¨£ ¤«ï í«¥¬¥â ListBox
|
||||
.x:
|
||||
|
@ -18,11 +18,58 @@ include '../../macros.inc'
|
||||
include '../../proc32.inc'
|
||||
include '../../develop/libraries/box_lib/load_lib.mac'
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../t_edit/mem.inc'
|
||||
include '../../dll.inc'
|
||||
include 'te_data.inc'
|
||||
include 'te_work.inc' ;text work functions
|
||||
|
||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,0
|
||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
|
||||
;Œ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥¨© á ¨á¯®«ì§®¢ ¨¥¬ ¡¨¡«¨®â¥ª¨ libimg.obj
|
||||
;¤«ï ¨á¯®«ì§®¢ ¨ï ¬ ªà®á ã¦ë ¯¥à¥¬¥ë¥:
|
||||
; - run_file_70 FileInfoBlock
|
||||
; - image_data dd 0
|
||||
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
|
||||
|
||||
mov eax,70 ;70-ï äãªæ¨ï à ¡®â á ä ©« ¬¨
|
||||
mov [run_file_70.Function], 0
|
||||
mov [run_file_70.Position], 0
|
||||
mov [run_file_70.Flags], 0
|
||||
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], file_name
|
||||
mov ebx,run_file_70
|
||||
int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥¨ï
|
||||
cmp ebx,0xffffffff
|
||||
je @f
|
||||
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥ë© ¡ãä¥à image_data
|
||||
stdcall dword[img_decode], dword[buf],ebx,0
|
||||
mov dword[image_data],eax
|
||||
;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥¨¥ ª ä®à¬ âã rgb
|
||||
stdcall dword[img_to_rgb2], dword[image_data],dword[buf]
|
||||
;㤠«ï¥¬ ¢à¥¬¥ë© ¡ãä¥à image_data
|
||||
stdcall dword[img_destroy], dword[image_data]
|
||||
@@:
|
||||
}
|
||||
|
||||
image_data dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì. ¤«ï 㦥 ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï
|
||||
icon_tl_sys dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª
|
||||
|
||||
align 4
|
||||
start:
|
||||
@ -54,50 +101,16 @@ load_libraries l_libs_start,load_lib_end
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
stdcall dword[tl_data_init],dword tree1
|
||||
copy_path fn_icon_tl_sys,sys_path,file_name,0
|
||||
|
||||
mov ecx,3*256*13
|
||||
stdcall mem.Alloc,ecx
|
||||
; ç¨â ¥¬ ä ©« á ªãàá®à ¬¨ ¨ «¨¨ï¬¨
|
||||
load_image_file 'tl_sys_16.png', icon_tl_sys,54+3*256*13
|
||||
mov eax,dword[icon_tl_sys]
|
||||
mov dword[tree1.data_img_sys],eax
|
||||
|
||||
mov [run_file_70.Function], 0
|
||||
mov [run_file_70.Position], 54
|
||||
mov [run_file_70.Flags], 0
|
||||
mov [run_file_70.Count], ecx
|
||||
mov [run_file_70.Buffer], eax
|
||||
mov byte[run_file_70+20], 0
|
||||
mov [run_file_70.FileName], file_name
|
||||
|
||||
mov eax,70 ;load icon file
|
||||
mov ebx,run_file_70
|
||||
int 0x40
|
||||
cmp ebx,0
|
||||
jg @f
|
||||
mov dword[tree1.data_img_sys],0
|
||||
@@:
|
||||
;---------------------------------------------------------------------
|
||||
; ç¨â ¥¬ bmp ä ©« á ¨ª®ª ¬¨ 㧫®¢
|
||||
copy_path fn_icon_tl_nod,sys_path,file_name,0
|
||||
|
||||
mov ecx,3*256*2
|
||||
stdcall mem.Alloc,ecx
|
||||
load_image_file 'tl_nod_16.png', icon_tl_sys,54+3*256*2
|
||||
mov eax,dword[icon_tl_sys]
|
||||
mov dword[tree1.data_img],eax
|
||||
|
||||
; mov [run_file_70.Function], 0
|
||||
; mov [run_file_70.Position], 54
|
||||
; mov [run_file_70.Flags], 0
|
||||
mov [run_file_70.Count], ecx
|
||||
mov [run_file_70.Buffer], eax
|
||||
; mov byte[run_file_70+20], 0
|
||||
; mov [run_file_70.FileName], file_name
|
||||
|
||||
mov eax,70 ;load icon file
|
||||
mov ebx,run_file_70
|
||||
int 0x40
|
||||
cmp ebx,0
|
||||
jg @f
|
||||
mov dword[tree1.data_img],0
|
||||
@@:
|
||||
;------------------------------------------------------------------------------
|
||||
copy_path fn_syntax_dir,sys_path,file_name,0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ á¨â ªá¨á
|
||||
mov eax,70
|
||||
@ -324,7 +337,7 @@ but_OpenSyntax:
|
||||
|
||||
align 4
|
||||
but_SaveSyntax:
|
||||
stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text]
|
||||
stdcall [ted_save_file], tedit0,run_file_70,[edit1.text]
|
||||
ret
|
||||
|
||||
align 4
|
||||
@ -365,7 +378,7 @@ get_wnd_in_focus:
|
||||
;@@:
|
||||
ret
|
||||
|
||||
hed db 'TextEditor syntax file converter 23.06.12',0 ;¯®¤¯¨áì ®ª
|
||||
hed db 'TextEditor syntax file converter 01.07.14',0 ;¯®¤¯¨áì ®ª
|
||||
conv_tabl rb 128 ; â ¡«¨æ ¤«ï ª®¢¥àâ¨à®¢ ¨ï scan-ª®¤ ¢ ascii-ª®¤
|
||||
|
||||
txt122 db '‡ £à. ä ©«',0
|
||||
@ -373,15 +386,19 @@ txt148 db '
|
||||
txt_inp_file db 'ˆáå. ä ©«:',0
|
||||
txt_out_file db '‚ëå. ä ©«:',0
|
||||
|
||||
err_message_found_lib0 db 'Sorry I cannot found library box_lib.obj',0
|
||||
head_f_i0:
|
||||
head_f_l0 db 'System error',0
|
||||
err_message_import0 db 'Error on load import library box_lib.obj',0
|
||||
err_message_found_lib1 db 'Sorry I cannot found library msgbox.obj',0
|
||||
txt_no_kpack db 'Žâªàë¢ ¥¬ë© ä ©« ᦠâ Kpack-®¬.',13,10,'„«ï à ¡®âë á ä ©«®¬ à ᯠªã©â¥ ¥£® ¨á¯®«ì§ãï á¨á⥬ãî ¯à®£à ¬¬ã Kpack.',13,10,'<27> ¡®â ᮠᦠâ묨 ä ©« ¬¨ ¯®ª ¥ ¯®¤¤¥à¦¨¢ ¥âáï.',0
|
||||
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
err_message_found_lib_0 db 'Sorry I cannot found library ',39,'box_lib.obj',39,0
|
||||
err_message_import_0 db 'Error on load import library ',39,'box_lib.obj',39,0
|
||||
err_message_found_lib_1 db 'Sorry I cannot found library ',39,'libimg.obj',39,0
|
||||
err_message_import_1 db 'Error on load import library ',39,'libimg.obj',39,0
|
||||
|
||||
;library structures
|
||||
l_libs_start:
|
||||
lib0 l_libs boxlib_name, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l0, boxlib_import,err_message_import0, head_f_i0
|
||||
lib0 l_libs lib_name_0, sys_path, file_name, system_dir_0, err_message_found_lib_0, head_f_l, import_box_lib,err_message_import_0, head_f_i
|
||||
lib1 l_libs lib_name_1, sys_path, file_name, system_dir_1, err_message_found_lib_1, head_f_l, import_libimg,err_message_import_1, head_f_i
|
||||
load_lib_end:
|
||||
|
||||
|
||||
|
@ -83,6 +83,11 @@ InitColText:
|
||||
@@:
|
||||
|
||||
mov esi,[options_file]
|
||||
cmp dword[esi],'KPCK'
|
||||
jne @f
|
||||
notify_window_run txt_no_kpack ; ñîçäàåì îêíî @notify
|
||||
jmp .no_colors
|
||||
@@:
|
||||
mov edi,count_colors_text
|
||||
mov ecx,9*4
|
||||
rep movsb
|
||||
|
Loading…
Reference in New Issue
Block a user