Subversion Repositories Kolibri OS

Compare Revisions

Ignore whitespace Rev 2124 → Rev 2125

/programs/other/t_edit/t_button.inc
9,16 → 9,16
ends
 
struct symbol
c db ? ; +0 ᨬ¢®«
col db ? ; +1 梥â
perv dd ? ; +2
next dd ? ; +6 㪠§ â¥«¨
tc dd ? ; +10 ¢à¥¬. ᮧ¤ ­¨ï
td dd ? ; +14 ¢à¥¬. 㤠«¥­¨ï
c db ? ; +0 ᨬ¢®«
col db ? ; +1 梥â
perv dd ? ; +2
next dd ? ; +6 㪠§ â¥«¨
tc dd ? ;+10 ¢à¥¬. ᮧ¤ ­¨ï
td dd ? ;+14 ¢à¥¬. 㤠«¥­¨ï
ends
 
 
hed db 'TextEditor 22.08.11',0 ;¯®¤¯¨áì ®ª­ 
hed db 'TextEditor 26.08.11',0 ;¯®¤¯¨áì ®ª­ 
sc system_colors
 
fn_icon db 'te_icon.bmp',0
230,7 → 230,7
mov ted_panel_id,TED_PANEL_FIND
mov ted_wnd_l,TED_PANEL_WIDTH
.e_if:
stdcall EvSize,edi
call EvSize
stdcall [ted_draw],edi
pop edi
ret
303,7 → 303,7
mov ted_panel_id,TED_PANEL_SYNTAX
mov ted_wnd_l,TED_PANEL_WIDTH
.e_if:
stdcall EvSize,edi
call EvSize
stdcall [ted_draw],edi
pop edi
ret
/programs/other/t_edit/t_draw.inc
260,11 → 260,12
ret
endp
 
MIN_M_WND_H equ 100
MIN_M_WND_H equ 100 ;ìèíèìàëüíàÿ âûñîòà ãëàâíîãî îêíà
;input:
; edi = pointer to tedit struct
align 4
proc EvSize, edit:dword
EvSize:
pushad
mov edi,dword[edit]
mov ebx,ted_scr_h
mov esi,ted_scr_w
 
299,7 → 300,6
 
popad
ret
endp
 
;input:
; ecx = 0x4000____
/programs/other/t_edit/t_edit.asm
194,44 → 194,43
 
align 4
still:
mov eax,10
mcall
mcall 10
 
cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
jz red_win
cmp al,2
jz key
cmp al,3
jz button
cmp al,6
jz mouse
cmp al,1 ;¨§¬¥­¨«®áì ¯®«®¦¥­¨¥ ®ª­ 
jz red_win
cmp al,2
jz key
cmp al,3
jz button
cmp al,6 ;¬ëèì
jne @f
mcall 9,procinfo,-1
cmp ax,word[procinfo+4]
jne @f ;®ª­® ­¥  ªâ¨¢­®
jmp mouse
@@:
jmp still
 
jmp still
 
align 4
draw_window:
mcall 12,1
mcall 12,1
 
xor eax,eax
mov ebx,10*65536+485
mov ecx,10*65536+320
mov edx,[sc.work]
or edx,0x73000000
mov edi,hed
int 0x40
mov edx,[sc.work]
or edx,0x73000000
mov edi,hed
mcall 0,(10 shl 16)+485,(10 shl 16)+320
 
mov edi,tedit0
mcall 9,procinfo,-1
mov edi,tedit0 ;§­ ç¥­¨¥ edi ­ã¦­® ¤«ï EvSize ¨ ted_wnd_t
call EvSize
 
mcall 9,procinfo,-1
stdcall EvSize,edi
mov eax,13 ;¢¥àå­¨© ¯àאַ㣮«ì­¨ª, ¤«ï ®ç¨á⪨ ¢¥àå­¥© ¯ ­¥«¨
xor ebx,ebx
mov ecx,ted_wnd_t
mov bx,word[procinfo.client_box.width]
inc bx
int 0x40
 
mov eax,13 ;¢¥àå­¨© ¯àאַ㣮«ì­¨ª, ¤«ï ®ç¨á⪨ ¢¥àå­¥© ¯ ­¥«¨
xor ebx,ebx
mov ecx,ted_wnd_t
mov bx,word [procinfo.client_box.width]
inc bx
int 0x40
 
mov eax,4
mov ebx,185*65536+9
mov ecx,[sc.work_text]
272,46 → 271,43
 
align 4
mouse:
stdcall [edit_box_mouse], dword edit1
stdcall [edit_box_mouse], dword edit1
 
test word [edit1.flags],10b;ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
jne still
test word [edit1.flags],10b ;ed_focus ;¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
jne still
 
stdcall [ted_mouse], tedit0
stdcall [ted_mouse], tedit0
 
cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel
jne @f
stdcall [edit_box_mouse], dword edit2
@@:
cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX ;if not panel
jne .menu_bar_1 ;@f
stdcall [tl_mouse], tree1
cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel
jne @f
stdcall [edit_box_mouse], dword edit2
@@:
cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX ;if not panel
jne .menu_bar_1 ;@f
stdcall [tl_mouse], tree1
;-----------------------------------------------
.menu_bar_1:
mov [menu_data_1.get_mouse_flag],1
mov [menu_data_1.get_mouse_flag],1
; mouse event for Menu 1
push dword menu_data_1
call [menu_bar_mouse]
cmp [menu_data_1.click],dword 1
jne .mnu_1
cmp [menu_data_1.cursor_out],dword 4
je button.exit
cmp [menu_data_1.cursor_out],dword 3
jne @f
stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text]
@@:
cmp [menu_data_1.cursor_out],dword 2
jne @f
call ted_but_open_file
@@:
cmp [menu_data_1.cursor_out],dword 1
jne @f
call ted_but_new_file
@@:
;cmp [menu_data_1.cursor_out],dword 0
;jne @f
stdcall [menu_bar_mouse],dword menu_data_1
cmp dword[menu_data_1.click],1
jne .mnu_1
cmp dword[menu_data_1.cursor_out],4
je button.exit
cmp dword[menu_data_1.cursor_out],3
jne @f
stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text]
@@:
cmp dword[menu_data_1.cursor_out],2
jne @f
call ted_but_open_file
@@:
cmp dword[menu_data_1.cursor_out],1
jne @f
call ted_but_new_file
@@:
.mnu_1:
jmp still
jmp still
;---------------------------------------------------------------------
 
;output: