Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 4307 → Rev 4308

/programs/other/t_edit/t_button.inc
63,7 → 63,7
push edi
mov edi, tedit0
 
stdcall [ted_but_save_file],edi,run_file_70,[edit1.text]
call ted_but_save_file
cmp ted_err_save,0
jne @f
call On_NewFile
76,7 → 76,7
align 4
but_no_msg_OpenFile:
push eax ebx
stdcall [ted_open_file], tedit0,run_file_70,[edit1.text]
stdcall [ted_open_file], tedit0,run_file_70,openfile_path
call ted_messages_after_open_file
pop ebx eax
ret
115,20 → 115,19
@@:
cmp [OpenDialog_data.status],1
jne .ret_f
stdcall [PathShow_prepare], PathShow_data_1
stdcall [PathShow_draw], PathShow_data_1
 
;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªà뢠¥¬®£® ⥪á⮢®£® ä ©« 
mov esi,[OpenDialog_data.openfile_path]
call strlen
mov [edit1.size],eax
mov [edit1.pos],eax
stdcall [edit_box_draw], edit1
 
;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªà뢠¥¬®£® ⥪á⮢®£® ä ©« 
mov edx,[edit1.text]
mov edx,openfile_path
add edx,eax
.f_beg:
cmp byte[edx],'.'
je .found
dec edx
cmp edx,[edit1.text]
cmp edx,openfile_path
jg .f_beg
.found:
inc edx ;edx - 㪠§ â¥«ì ­  à áè¨à¥­¨¥ ®âªàë⮣® ä ©« 
150,7 → 149,7
call open_unpac_synt_file
.end_0:
 
stdcall [ted_open_file], tedit0,run_file_70,[edit1.text]
stdcall [ted_open_file], tedit0,run_file_70,openfile_path
call ted_messages_after_open_file
 
.ret_f:
158,6 → 157,22
ret
 
;description:
; äã­ªæ¨ï á®åà ­¥­¨ï ä ©«  á ¢ë§®¢®¬ ®ª­  ¤¨ «®£ 
align 4
proc ted_but_save_file
;*** ¢ë§®¢ ¤¨ «®£®¢®£® ®ª­  ¤«ï á®åà ­¥­¨ï ä ©« 
copy_path open_dialog_name,communication_area_default_path,file_name,0
mov [OpenDialog_data.type],1
stdcall [OpenDialog_Start],OpenDialog_data
cmp [OpenDialog_data.status],1 ;if status==1 then save
jne .end_save_file
stdcall [PathShow_prepare], PathShow_data_1
stdcall [ted_save_file],tedit0,run_file_70,openfile_path
.end_save_file:
ret
endp
 
;description:
; ª®¯¨à®¢ ­¨¥ ¯ ¬ïâ¨
align 4
proc mem_copy, source:dword, destination:dword, len:dword
216,6 → 231,7
jl .ret_f
stdcall [mb_create],msgbox_1,thread
.ret_f:
stdcall [PathShow_prepare], PathShow_data_1
pop edi ecx
ret
 
265,8 → 281,8
cld
rep movsb
 
copy_path ebx,fn_syntax_dir,file_name_rez,0
copy_path file_name_rez,sys_path,file_name,0
copy_path ebx,fn_syntax_dir,syntax_path,0
copy_path syntax_path,sys_path,file_name,0
mov edi, tedit0
mov [run_file_70.Function], 0
mov [run_file_70.Position], 0
308,8 → 324,7
;description:
; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ ¯®¨áª 
align 4
proc ted_but_find
push edi
proc ted_but_find uses edi
mov edi,tedit0
 
cmp ted_panel_id,TED_PANEL_NULL
323,11 → 338,34
.e_if:
call EvSize
stdcall [ted_draw],edi
pop edi
ret
endp
 
align 4
tbl_1251_866:
rb 128
db 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0 ;128
db 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0 ;144
db 0, 0, 0, 0, 0, 0, 0, 0,240,0,0,0,0,0,0,0 ;160
db 0, 0, 0, 0, 0, 0, 0, 0,241,0,0,0,0,0,0,0 ;176
db 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 ;192
db 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159 ;208
db 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175 ;224
db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;240
 
align 4
tbl_866_1251:
rb 128
db 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207 ;128
db 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223 ;144
db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;160
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;176
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;192
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;208
db 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 ;224
db 168,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;240
 
align 4
ted_on_find_err:
stdcall [mb_create],msgbox_7,thread ;message: Can not find text
ret
/programs/other/t_edit/t_data.inc
95,9 → 95,9
tl_node_lev_inc dd sz_tl_node_lev_inc
tl_node_lev_dec dd sz_tl_node_lev_dec
 
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_but_convert_by_table dd sz_ted_but_convert_by_table
ted_can_save dd sz_ted_can_save
ted_clear dd sz_ted_clear
ted_delete dd sz_ted_delete
109,6 → 109,7
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
121,6 → 122,9
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
 
dd 0,0
alib_init0 db 'lib_init',0
 
163,9 → 167,9
sz_tl_node_lev_inc db 'tl_node_lev_inc',0
sz_tl_node_lev_dec db 'tl_node_lev_dec',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_but_convert_by_table db 'ted_but_convert_by_table',0
sz_ted_can_save db 'ted_can_save',0
sz_ted_clear db 'ted_clear',0
sz_ted_delete db 'ted_delete',0
177,6 → 181,7
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
189,6 → 194,9
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
 
align 4
import_proclib:
OpenDialog_Init dd aOpenDialog_Init
486,7 → 494,7
 
if lang eq ru
 
hed db '’¥ªáâ®¢ë© à¥¤ ªâ®à 14.11.13',0 ;¯®¤¯¨áì ®ª­ 
hed db '’¥ªáâ®¢ë© à¥¤ ªâ®à 28.11.13',0 ;¯®¤¯¨áì ®ª­ 
 
menu_text_area:
db '” ©«',0
580,14 → 588,6
db 0
db '‡ ªàëâì',0
db 0
msgbox_10:
db 1,0
db '‚­¨¬ ­¨¥',0
db '‚ë ¨á¯®«ì§ã¥â¥ áâ àãî ¢¥àá¨î ¡¨¡«¨®â¥ª¨ ',39,'box_lib.obj',39,'.',13,\
'®¯à®¡ã©â¥ ­ ©â¨ ¡¨¡«¨®â¥ªã ¢ ª®â®à®©',13,\
'í«¥¬¥­â ',39,'t_edit',39,' ¨¬¥¥â ¢¥àá¨î 3.',0
db '‡ ªàëâì',0
db 0
 
txtFile db '” ©«:',0
txtFindCapt db '®¨áª',0
597,7 → 597,7
 
else
 
hed db 'Text editor 14.11.13',0
hed db 'Text editor 28.11.13',0
 
menu_text_area:
db 'File',0
691,14 → 691,6
db 0
db 'Close',0
db 0
msgbox_10:
db 1,0
db 'Warning',0
db 'You are using an older version of the library ',39,'box_lib.obj',39,'.',13,\
'Try to find a library in which the element',13,\
39,'t_edit',39,' has a version 3.',13,0
db 'Close',0
db 0
 
txtFile db 'File:',0
txtFindCapt db 'Search',0
/programs/other/t_edit/t_draw.inc
102,10 → 102,18
mov edx,425*65536+25
call draw_but_icon
 
mov cx,17
mov cx,17 ;âûáîð ôàéëà ïîäñâåòêè
mov edx,450*65536+25
call draw_but_icon
 
mov cx,18 ;cp 1251 -> 866
mov edx,425*65536+2
call draw_but_icon
 
mov cx,19 ;cp 866 -> 1251
mov edx,450*65536+2
call draw_but_icon
 
popad
ret
 
332,7 → 340,7
cmp eax,7
jne @f ;êíîïêà íå âëåçëà â îêíî
mov ebx,[bmp_icon]
bt ecx,30 ;if (ecx or 0x40000000)
bt ecx,30 ;if (ecx & 0x40000000)
jc .gray
add ebx,TOOLBAR_ICONS_SIZE ;ïåðåìåùàåìñÿ íà ñåðûå êíîïêè
.gray:
/programs/other/t_edit/t_edit.asm
1,8 → 1,5
;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, Heavyiron
;¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬,   â ª¦¥
;’¥¯«®¢ã €«¥ªá¥î (<Lrz> www.lrz.land.ru)
;Ž£à®¬­ ï ¡« £®¤ à­®áâì ¢á¥¬, ªâ® ¯®¬®£ «: ª®¤®¬/ᮢ¥â®¬/¤¨§ ©­®¬ ...
 
 
use32
org 0x0
db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
18,7 → 15,7
maxChars equ 100002 ;(...+2)
BUF_SIZE equ 4096 ;buffer for copy|paste
maxSyntaxFileSize equ 410000
TOOLBAR_ICONS_SIZE equ 1200*18
TOOLBAR_ICONS_SIZE equ 1200*20
 
include '../../proc32.inc'
;include '../../config.inc'
102,28 → 99,21
mov ecx,eax
mov edi,openfile_path
cld
rep movsb ;ª®¯¨à㥬 ¨¬ï ä ©«  ¢ ¡ãä¥à edit1
rep movsb ;ª®¯¨à㥬 ¨¬ï ä ©«  ¢ ¡ãä¥à openfile_path
 
load_libraries l_libs_start,load_lib_end
 
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨
mov ebp,lib0
.test_lib_open:
cmp dword [ebp+ll_struc_size-4],0
jz @f
mcall -1 ;exit not correct
@@:
mov ebp,lib1 ;
cmp dword [ebp+ll_struc_size-4],0
jz @f
mcall -1 ;exit not correct
@@:
add ebp,ll_struc_size
cmp ebp,load_lib_end
jl .test_lib_open
 
cmp dword[version_text_edit],3
jge @f
stdcall [mb_create],msgbox_10,thread
mcall -1
@@:
 
;---------------------------------------------------------------------
stdcall [ted_init], tedit0
stdcall dword[tl_data_init], tree1
130,6 → 120,10
 
; OpenDialog initialisation
stdcall [OpenDialog_Init],OpenDialog_data
mov eax,[sc.work_button_text]
mov [PathShow_data_1.font_color],eax
mov eax,[sc.work_button]
mov [PathShow_data_1.background_color],eax
 
; init toolbar file
load_image_file 'te_icon.png', bmp_icon,TOOLBAR_ICONS_SIZE*2 ;㬭®¦¥­¨¥ ­  2 ¤«ï á¥àëå ª­®¯®ª
223,7 → 217,6
je @f ;if file names exist
mov esi,openfile_path
call strlen ;eax=strlen
mov [edit1.size],eax
call but_no_msg_OpenFile
@@:
 
276,7 → 269,7
mov edx,txtFile
int 0x40
 
stdcall [edit_box_draw], dword edit1
stdcall [PathShow_draw], dword PathShow_data_1
stdcall [menu_bar_draw], dword menu_data_1
 
call draw_but_toolbar
288,11 → 281,6
 
align 4
mouse:
stdcall [edit_box_mouse], dword edit1
 
test word [edit1.flags],10b ;ed_focus ;¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
jne still
 
stdcall [ted_mouse], tedit0
 
cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel
313,7 → 301,7
je button.exit
cmp dword[menu_data_1.cursor_out],3
jne @f
stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text]
call ted_but_save_file
@@:
cmp dword[menu_data_1.cursor_out],2
jne @f
369,26 → 357,6
mcall 2 ;¯®«ãç ¥¬ ª®¤ ­ ¦ â®© ª« ¢¨è¨
stdcall [tl_key], tree1
 
test word [edit1.flags],10b;ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
je @f
cmp ah,0x80 ;if key up
ja still
cmp ah,42 ;[Shift] (left)
je still
cmp ah,54 ;[Shift] (right)
je still
cmp ah,56 ;[Alt]
je still
cmp ah,29 ;[Ctrl]
je still
cmp ah,69 ;[Pause Break]
je still
 
stdcall KeyConvertToASCII, dword conv_tabl
stdcall [edit_box_key], dword edit1
jmp still
@@:
 
test word [edit2.flags],10b;ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
je @f
cmp ah,0x80 ;if key up
431,7 → 399,7
@@:
cmp ah,5
jne @f
stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text]
call ted_but_save_file
@@:
cmp ah,6
jne @f
493,6 → 461,14
jne @f
stdcall but_synt_show, tedit0
@@:
cmp ah,21
jne @f
stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866
@@:
cmp ah,22
jne @f
stdcall [ted_but_convert_by_table],tedit0,tbl_866_1251
@@:
 
cmp ah,200
jne @f
522,8 → 498,20
stdcall dword[tl_data_clear], tree1
mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
 
PathShow_data_1:
.type dd 0 ;+0
.start_y dw 9 ;+4
.start_x dw 222 ;+6
.font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1
.area_size_x dw 200 ;+10
.font_number dd 0 ;+12 ; 0 - monospace, 1 - variable
.background_flag dd 1 ;+16
.font_color dd 0x0 ;+20
.background_color dd 0xffffff ;+24
.text_pointer dd openfile_path ;+28
.work_area_pointer dd text_work_area ;+32
.temp_text_length dd 0 ;+36
 
edit1 edit_box 250, 220, 5, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 4090, openfile_path, mouse_dd, 0
edit2 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0
 
unpac_mem dd 0
587,17 → 575,19
thread_coords:
rb 1024
stacktop:
sys_path:
sys_path: ;¯ãâì ®âªã¤  § ¯ãá⨫áï ¨á¯®«­ï¥¬ë© ä ©«
rb 4096
file_name:
file_name: ;¯ à ¬¥âàë § ¯ã᪠
rb 4096
file_name_rez:
syntax_path: ;¨¬ï ¯®¤ª«îç ¥¬®£® ä ©«  ᨭ⠪á¨á 
rb 4096
plugin_path:
rb 4096
openfile_path:
openfile_path: ;¯®«­ë© ¯ãâì ª ä ©«ã á ª®â®àë¬ ¨¤¥â à ¡®â 
rb 4096
filename_area:
text_work_area: ;¯ãâì ª ä ©«ã, ª®â®àë© ¯®ª §ë¢ ¥âáï ¢ ®ª­¥
rb 4096
filename_area: ;¨¬ï ä ©«  ¤«ï ¤¨ «®£  ®âªàëâ¨ï/§ ªàëâ¨ï
rb 256
file_info:
rb 40
/programs/other/t_edit/te_icon.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream