2019-01-11 11:59:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
align 16
|
|
|
|
|
draw_window:
|
|
|
|
|
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
|
|
|
|
|
|
|
|
|
mov edx,[sc.work]
|
|
|
|
|
or edx,0x73000000
|
|
|
|
|
mcall SF_CREATE_WINDOW,dword[wnd_s_pos],dword[wnd_s_pos+4],,,hed
|
|
|
|
|
|
|
|
|
|
mcall SF_THREAD_INFO,procinfo,-1
|
|
|
|
|
mov edi,tedit0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> edi <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> EvSize <EFBFBD> ted_wnd_t
|
|
|
|
|
call EvSize
|
|
|
|
|
|
|
|
|
|
movzx ebx,word[procinfo.client_box.width]
|
|
|
|
|
inc bx
|
|
|
|
|
mcall SF_DRAW_RECT,,ted_wnd_t ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
call draw_but_toolbar
|
|
|
|
|
stdcall [kmainmenu_draw], [main_menu]
|
|
|
|
|
stdcall [ted_draw], tedit0
|
|
|
|
|
|
|
|
|
|
mcall SF_REDRAW,SSF_END_DRAW
|
|
|
|
|
ret
|
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2010-04-29 20:27:40 +02:00
|
|
|
|
draw_but_toolbar: ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2016-01-21 23:22:11 +01:00
|
|
|
|
pushad
|
|
|
|
|
mov edi,tedit0
|
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov ecx,0x40000000+ID_BUT_NEW
|
2018-10-19 21:27:02 +02:00
|
|
|
|
mov edx,(5 shl 16)+25
|
|
|
|
|
bt word[panel_but],0
|
|
|
|
|
jnc @f
|
|
|
|
|
call draw_but_icon ;New
|
|
|
|
|
@@:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_OPEN
|
2018-10-19 21:27:02 +02:00
|
|
|
|
bt word[panel_but+1],0
|
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Open
|
|
|
|
|
@@:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
|
|
|
|
|
stdcall [ted_can_save],edi
|
|
|
|
|
cmp al,1
|
|
|
|
|
je @f
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
@@:
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_SAVE
|
2018-10-19 21:27:02 +02:00
|
|
|
|
bt word[panel_but+2],0
|
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Save
|
|
|
|
|
@@:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
or ecx,0x40000000
|
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_SAVE_AS
|
2018-10-19 21:27:02 +02:00
|
|
|
|
bt word[panel_but+3],0
|
2019-01-08 17:22:08 +01:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Save as
|
|
|
|
|
@@:
|
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_SELECT
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+4],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,30 shl 16
|
|
|
|
|
call draw_but_icon ;Select word
|
|
|
|
|
@@:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
|
|
|
|
|
call [ted_is_select]
|
2018-10-19 21:27:02 +02:00
|
|
|
|
or al,al
|
|
|
|
|
jnz @f
|
2016-01-21 23:22:11 +01:00
|
|
|
|
and ecx,0xffff
|
|
|
|
|
@@:
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_CUT
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+5],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Cut
|
|
|
|
|
@@:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_COPY
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+6],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Copy
|
|
|
|
|
@@:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
or ecx,0x40000000
|
|
|
|
|
|
|
|
|
|
cmp dword[buf],0
|
|
|
|
|
jne @f
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
@@:
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_PASTE
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+7],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Paste
|
|
|
|
|
@@:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
or ecx,0x40000000
|
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_FIND
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+8],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Found
|
|
|
|
|
@@:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_REPLACE
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+9],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Replace
|
|
|
|
|
@@:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_KEY_WORDS
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+10],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Key words
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
call [ted_is_select]
|
|
|
|
|
or al,al
|
|
|
|
|
jnz @f
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
@@:
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_UPPER
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+11],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,30 shl 16
|
|
|
|
|
call draw_but_icon ;Upper
|
|
|
|
|
@@:
|
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_LOWER
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+12],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Lower
|
|
|
|
|
@@:
|
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_REVERSE
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+13],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Reverse
|
|
|
|
|
@@:
|
|
|
|
|
or ecx,0x40000000
|
2016-01-21 23:22:11 +01:00
|
|
|
|
|
|
|
|
|
mov ebx,ted_tim_undo
|
|
|
|
|
cmp ted_tim_ch,ebx
|
|
|
|
|
jg @f
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
@@:
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_UNDO
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+14],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,30 shl 16
|
|
|
|
|
call draw_but_icon ;Undo
|
|
|
|
|
@@:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
or ecx,0x40000000
|
|
|
|
|
|
|
|
|
|
cmp ted_tim_undo,1
|
|
|
|
|
jge @f
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
@@:
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_REDO
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+15],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;Redo
|
|
|
|
|
@@:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
or ecx,0x40000000
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_INVISIBLE
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+16],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,30 shl 16
|
|
|
|
|
call draw_but_icon ;Invisible on|off
|
|
|
|
|
@@:
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_SYNTAX_LIST
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+17],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
2019-01-08 17:22:08 +01:00
|
|
|
|
call draw_but_icon ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2018-10-19 21:27:02 +02:00
|
|
|
|
@@:
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_SYNTAX_MODE
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+18],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
2019-01-08 17:22:08 +01:00
|
|
|
|
call draw_but_icon ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>|<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2018-10-19 21:27:02 +02:00
|
|
|
|
@@:
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_CONVERT_1251_866
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+19],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,30 shl 16
|
|
|
|
|
call draw_but_icon ;cp 1251 -> 866
|
|
|
|
|
@@:
|
2013-11-28 11:35:07 +01:00
|
|
|
|
|
2019-01-11 11:59:40 +01:00
|
|
|
|
mov cx,ID_BUT_CONVERT_866_1251
|
2019-01-08 17:22:08 +01:00
|
|
|
|
bt word[panel_but+20],0
|
2018-10-19 21:27:02 +02:00
|
|
|
|
jnc @f
|
|
|
|
|
add edx,25 shl 16
|
|
|
|
|
call draw_but_icon ;cp 866 -> 1251
|
|
|
|
|
@@:
|
2013-11-28 11:35:07 +01:00
|
|
|
|
|
|
|
|
|
popad
|
|
|
|
|
ret
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
|
|
|
|
;txtBUp db 24
|
|
|
|
|
;txtBDn db 25
|
|
|
|
|
;txtBRi db 26
|
|
|
|
|
;txtBLe db 27
|
2010-04-15 17:50:49 +02:00
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
;input:
|
|
|
|
|
; edi = pointer to tedit struct
|
|
|
|
|
align 4
|
|
|
|
|
proc draw_panel_find
|
2019-01-21 12:39:35 +01:00
|
|
|
|
cmp ted_panel_id,TED_PANEL_FIND
|
2016-01-21 23:22:11 +01:00
|
|
|
|
jne @f
|
2019-01-21 12:39:35 +01:00
|
|
|
|
call p_find
|
|
|
|
|
jmp .end_f
|
|
|
|
|
@@:
|
|
|
|
|
cmp ted_panel_id,TED_PANEL_REPLACE
|
|
|
|
|
jne @f
|
|
|
|
|
call p_replace
|
|
|
|
|
jmp .end_f
|
|
|
|
|
@@:
|
|
|
|
|
push eax edx
|
|
|
|
|
mcall SF_DEFINE_BUTTON,,,0x80000000+201
|
|
|
|
|
mcall ,,,0x80000000+202
|
|
|
|
|
mcall ,,,0x80000000+203
|
|
|
|
|
pop edx eax
|
|
|
|
|
.end_f:
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
p_find:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
push eax ebx ecx edx
|
|
|
|
|
mov ecx,ted_wnd_t
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,20
|
|
|
|
|
mcall SF_DRAW_RECT,TED_PANEL_WIDTH,,[sc.work]
|
|
|
|
|
|
2019-01-21 12:39:35 +01:00
|
|
|
|
mov ecx,ted_wnd_t
|
|
|
|
|
add cx,20+15 ; 15 - height text box
|
|
|
|
|
shl ecx,16
|
|
|
|
|
add ecx,ted_wnd_h
|
|
|
|
|
mov edx,ted_scr_h
|
|
|
|
|
add cx,word[edx+sb_offs_size_y]
|
|
|
|
|
sub cx,20+15-1 ; 15 - height text box
|
|
|
|
|
mcall ,,,[sc.work]
|
|
|
|
|
|
|
|
|
|
stdcall [edit_box_draw], edit2
|
|
|
|
|
|
|
|
|
|
mov ecx,ted_wnd_t
|
|
|
|
|
shl ecx,16
|
|
|
|
|
add ecx,(93 shl 16)+20
|
|
|
|
|
mcall SF_DEFINE_BUTTON,(5 shl 16)+85,,201,[sc.work_button] ;201 - button id
|
|
|
|
|
|
|
|
|
|
mov ebx,(23 shl 16)+7
|
2016-01-21 23:22:11 +01:00
|
|
|
|
add ebx,ted_wnd_t
|
|
|
|
|
mov ecx,[sc.work_text]
|
|
|
|
|
or ecx,0x80000000
|
|
|
|
|
mcall SF_DRAW_TEXT,,,txtFindCapt
|
|
|
|
|
|
2019-01-21 12:39:35 +01:00
|
|
|
|
mov ecx,[sc.work_button_text]
|
|
|
|
|
or ecx,0x80000000
|
|
|
|
|
mov ebx,(15 shl 16)+100
|
|
|
|
|
add ebx,ted_wnd_t
|
|
|
|
|
mcall ,,,txtFindNext
|
|
|
|
|
|
|
|
|
|
stdcall [option_box_draw], opt_grlist1
|
|
|
|
|
pop edx ecx ebx eax
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
p_replace:
|
|
|
|
|
push eax ebx ecx edx
|
|
|
|
|
mov ecx,ted_wnd_t
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,20
|
|
|
|
|
mcall SF_DRAW_RECT,TED_PANEL_WIDTH,,[sc.work]
|
2016-01-21 23:22:11 +01:00
|
|
|
|
|
|
|
|
|
mov ecx,ted_wnd_t
|
|
|
|
|
add cx,20+15 ; 15 - height text box
|
|
|
|
|
shl ecx,16
|
|
|
|
|
add ecx,ted_wnd_h
|
|
|
|
|
mov edx,ted_scr_h
|
|
|
|
|
add cx,word[edx+sb_offs_size_y]
|
|
|
|
|
sub cx,20+15-1 ; 15 - height text box
|
2019-01-21 12:39:35 +01:00
|
|
|
|
mcall ,,,[sc.work]
|
|
|
|
|
|
|
|
|
|
stdcall [edit_box_draw], edit1
|
|
|
|
|
stdcall [edit_box_draw], edit2
|
2016-01-21 23:22:11 +01:00
|
|
|
|
|
|
|
|
|
mov ecx,ted_wnd_t
|
|
|
|
|
shl ecx,16
|
2019-01-21 12:39:35 +01:00
|
|
|
|
add ecx,(133 shl 16)+20
|
|
|
|
|
mcall SF_DEFINE_BUTTON,(5 shl 16)+95,,202,[sc.work_button] ;replace next
|
2016-01-21 23:22:11 +01:00
|
|
|
|
|
2019-01-21 12:39:35 +01:00
|
|
|
|
add ecx,(26 shl 16)
|
|
|
|
|
mcall ,,,203 ;replace all
|
|
|
|
|
|
|
|
|
|
mov ebx,ted_wnd_t
|
|
|
|
|
add ebx,(23 shl 16)+7
|
2016-01-21 23:22:11 +01:00
|
|
|
|
mov ecx,[sc.work_text]
|
|
|
|
|
or ecx,0x80000000
|
2019-01-21 12:39:35 +01:00
|
|
|
|
mcall SF_DRAW_TEXT,,,txtFindCapt
|
|
|
|
|
add ebx,93
|
|
|
|
|
mcall SF_DRAW_TEXT,,,txtRerlaceCapt
|
|
|
|
|
|
|
|
|
|
mov ecx,[sc.work_button_text]
|
|
|
|
|
or ecx,0x80000000
|
|
|
|
|
mov ebx,ted_wnd_t
|
|
|
|
|
add ebx,(15 shl 16)+140
|
|
|
|
|
mcall ,,,txtRerlace
|
|
|
|
|
add ebx,26
|
|
|
|
|
mcall ,,,txtRerlaceAll
|
|
|
|
|
|
|
|
|
|
stdcall [option_box_draw], opt_grlist1
|
2016-01-21 23:22:11 +01:00
|
|
|
|
pop edx ecx ebx eax
|
|
|
|
|
ret
|
2010-04-15 17:50:49 +02:00
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
;input:
|
|
|
|
|
; edi = pointer to tedit struct
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2010-04-29 20:27:40 +02:00
|
|
|
|
proc draw_panel_syntax
|
2016-01-21 23:22:11 +01:00
|
|
|
|
cmp ted_panel_id,TED_PANEL_SYNTAX ;if not panel
|
|
|
|
|
jne @f
|
|
|
|
|
pushad
|
|
|
|
|
|
|
|
|
|
mov ecx,ted_wnd_t
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,20
|
|
|
|
|
mcall SF_DRAW_RECT,TED_PANEL_WIDTH,,[sc.work] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2019-01-23 23:08:19 +01:00
|
|
|
|
stdcall [tl_draw], tree1
|
2016-01-21 23:22:11 +01:00
|
|
|
|
mov [ws_dir_lbox.all_redraw],1 ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-01-23 23:08:19 +01:00
|
|
|
|
stdcall [scrollbar_ver_draw], ws_dir_lbox
|
2016-01-21 23:22:11 +01:00
|
|
|
|
|
|
|
|
|
ror ecx,16
|
2019-01-23 23:08:19 +01:00
|
|
|
|
add ecx,[tree1.box_height]
|
2016-01-21 23:22:11 +01:00
|
|
|
|
add ecx,20
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
ror ecx,16
|
|
|
|
|
add ecx,ted_wnd_h
|
|
|
|
|
mov esi,ted_scr_h
|
|
|
|
|
add cx,word[esi+sb_offs_size_y]
|
|
|
|
|
sub cx,20
|
2019-01-23 23:08:19 +01:00
|
|
|
|
sub ecx,[tree1.box_height]
|
2016-01-21 23:22:11 +01:00
|
|
|
|
inc cx
|
|
|
|
|
int 0x40 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
mov ecx,ted_wnd_t
|
|
|
|
|
add ecx,25
|
2019-01-23 23:08:19 +01:00
|
|
|
|
add ecx,[tree1.box_height]
|
2016-01-21 23:22:11 +01:00
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,20
|
|
|
|
|
mcall SF_DEFINE_BUTTON,(5 shl 16)+65,,200,[sc.work_button] ;200 - button id
|
|
|
|
|
|
|
|
|
|
mov ebx,(30 shl 16)+5
|
|
|
|
|
add ebx,ted_wnd_t
|
|
|
|
|
mov ecx,[sc.work_text]
|
|
|
|
|
or ecx,0x80000000
|
|
|
|
|
mcall SF_DRAW_TEXT,,,txtFormatCapt
|
|
|
|
|
|
|
|
|
|
mov ebx,(10 shl 16)+31
|
2019-01-23 23:08:19 +01:00
|
|
|
|
add ebx,[tree1.box_height]
|
2016-01-21 23:22:11 +01:00
|
|
|
|
add ebx,ted_wnd_t
|
2019-01-23 23:08:19 +01:00
|
|
|
|
mov ecx,[sc.work_button_text]
|
|
|
|
|
or ecx,0x80000000
|
2016-01-21 23:22:11 +01:00
|
|
|
|
mcall ,,,txtFormatApply
|
|
|
|
|
|
|
|
|
|
popad
|
|
|
|
|
jmp .end_f
|
|
|
|
|
@@:
|
|
|
|
|
push eax edx
|
2019-01-23 23:08:19 +01:00
|
|
|
|
mov edx,0x80000000+200
|
2016-01-21 23:22:11 +01:00
|
|
|
|
mcall SF_DEFINE_BUTTON ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
pop edx eax
|
|
|
|
|
.end_f:
|
|
|
|
|
ret
|
2010-04-15 17:50:49 +02:00
|
|
|
|
endp
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2011-08-26 16:09:59 +02:00
|
|
|
|
MIN_M_WND_H equ 100 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;input:
|
|
|
|
|
; edi = pointer to tedit struct
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2011-08-26 16:09:59 +02:00
|
|
|
|
EvSize:
|
2016-01-21 23:22:11 +01:00
|
|
|
|
pushad
|
|
|
|
|
mov ebx,ted_scr_h
|
|
|
|
|
mov esi,ted_scr_w
|
|
|
|
|
|
|
|
|
|
m2m ted_wnd_w,[procinfo.client_box.width] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov eax,ted_wnd_l
|
|
|
|
|
sub ted_wnd_w,eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
movzx eax,word[esi+sb_offs_size_x]
|
|
|
|
|
sub ted_wnd_w,eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
m2m ted_wnd_h,[procinfo.client_box.height] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cmp ted_wnd_h,MIN_M_WND_H
|
|
|
|
|
jg @f
|
|
|
|
|
mov ted_wnd_h,MIN_M_WND_H
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
movzx eax,word[ebx+sb_offs_size_y]
|
|
|
|
|
sub ted_wnd_h,eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov eax,ted_wnd_t
|
|
|
|
|
sub ted_wnd_h,eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
stdcall [ted_init_scroll_bars], tedit0,2
|
|
|
|
|
|
|
|
|
|
mov eax,ted_wnd_t
|
2019-01-21 12:39:35 +01:00
|
|
|
|
mov edi,tree1
|
2016-01-21 23:22:11 +01:00
|
|
|
|
mov tl_box_top,eax ;=ted_wnd_t
|
|
|
|
|
add tl_box_top,20
|
|
|
|
|
|
|
|
|
|
mov [edit2.top],eax ;=ted_wnd_t
|
|
|
|
|
add dword[edit2.top],20
|
2019-01-21 12:39:35 +01:00
|
|
|
|
mov [edit1.top],eax ;=ted_wnd_t
|
|
|
|
|
add dword[edit1.top],113
|
2016-01-21 23:22:11 +01:00
|
|
|
|
popad
|
|
|
|
|
ret
|
2010-04-15 17:50:49 +02:00
|
|
|
|
|
2009-12-29 00:19:20 +01:00
|
|
|
|
;input:
|
|
|
|
|
; ecx = 0x4000____
|
2019-01-11 11:59:40 +01:00
|
|
|
|
; cx = ID button
|
2009-12-29 00:19:20 +01:00
|
|
|
|
; edx = x*2^16+y
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2009-12-29 00:19:20 +01:00
|
|
|
|
draw_but_icon:
|
2010-04-29 20:27:40 +02:00
|
|
|
|
push eax ebx
|
|
|
|
|
|
2016-01-21 23:22:11 +01:00
|
|
|
|
mov eax,SF_DEFINE_BUTTON
|
2010-04-29 20:27:40 +02:00
|
|
|
|
push ecx edx esi
|
|
|
|
|
mov ebx,edx
|
|
|
|
|
mov edx,ecx
|
|
|
|
|
mov cx,bx
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,19 ;=20-1
|
|
|
|
|
mov bx,19 ;=20-1
|
|
|
|
|
mov esi,ebx
|
|
|
|
|
shr esi,16
|
|
|
|
|
add esi,20
|
|
|
|
|
cmp esi,[procinfo.client_box.width]
|
2013-10-29 13:48:21 +01:00
|
|
|
|
jge @f ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov esi,[sc.work_button]
|
|
|
|
|
int 0x40 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2016-01-21 23:22:11 +01:00
|
|
|
|
mov eax,SF_PUT_IMAGE
|
2010-04-29 20:27:40 +02:00
|
|
|
|
@@:
|
|
|
|
|
pop esi edx ecx
|
|
|
|
|
|
2016-01-21 23:22:11 +01:00
|
|
|
|
cmp eax,SF_PUT_IMAGE
|
2013-10-29 13:48:21 +01:00
|
|
|
|
jne @f ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov ebx,[bmp_icon]
|
2013-11-28 11:35:07 +01:00
|
|
|
|
bt ecx,30 ;if (ecx & 0x40000000)
|
2013-10-29 13:48:21 +01:00
|
|
|
|
jc .gray
|
|
|
|
|
add ebx,TOOLBAR_ICONS_SIZE ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.gray:
|
2010-04-29 20:27:40 +02:00
|
|
|
|
push ecx
|
2019-01-11 11:59:40 +01:00
|
|
|
|
sub ecx,ID_BUT_0
|
2010-04-29 20:27:40 +02:00
|
|
|
|
and ecx,0xffff
|
|
|
|
|
imul ecx,1200
|
|
|
|
|
add ebx,ecx
|
2018-10-19 21:27:02 +02:00
|
|
|
|
mov ecx,(20 shl 16)+20
|
2010-04-29 20:27:40 +02:00
|
|
|
|
int 0x40 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
pop ecx
|
|
|
|
|
@@:
|
|
|
|
|
pop ebx eax
|
|
|
|
|
ret
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2013-10-29 13:48:21 +01:00
|
|
|
|
;descrition:
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;input:
|
|
|
|
|
; buf_rgb - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 24 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; buf_g24 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 24 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; pixels - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
align 4
|
2013-11-14 11:59:09 +01:00
|
|
|
|
proc img_to_gray, buf_rgb:dword, buf_g24:dword, pixels:dword
|
|
|
|
|
pushad
|
2013-10-29 13:48:21 +01:00
|
|
|
|
mov esi,[buf_rgb]
|
|
|
|
|
mov edi,[buf_g24]
|
|
|
|
|
mov ecx,[pixels]
|
2013-11-14 11:59:09 +01:00
|
|
|
|
mov ebx,3
|
2013-10-29 13:48:21 +01:00
|
|
|
|
@@:
|
|
|
|
|
movzx eax,byte[esi]
|
2013-11-14 11:59:09 +01:00
|
|
|
|
movzx edx,byte[esi+1]
|
|
|
|
|
add eax,edx
|
|
|
|
|
movzx edx,byte[esi+2]
|
|
|
|
|
add eax,edx
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div ebx ;shr eax,2
|
2013-10-29 13:48:21 +01:00
|
|
|
|
mov ah,al
|
|
|
|
|
mov word[edi],ax
|
|
|
|
|
mov byte[edi+2],al
|
|
|
|
|
add esi,3
|
|
|
|
|
add edi,3
|
|
|
|
|
loop @b
|
2013-11-14 11:59:09 +01:00
|
|
|
|
popad
|
2013-10-29 13:48:21 +01:00
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|