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>
|
|
|
|
|
pushad
|
2010-04-22 21:39:39 +02:00
|
|
|
|
mov edi,tedit0
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
|
|
|
|
mov ecx,0x40000000
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,5*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
|
|
|
|
inc cx
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,30*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
stdcall [ted_can_save],edi
|
2009-12-29 00:19:20 +01:00
|
|
|
|
cmp al,1
|
|
|
|
|
je @f
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
@@:
|
|
|
|
|
inc cx
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,55*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
or ecx,0x40000000
|
|
|
|
|
|
|
|
|
|
inc cx
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,85*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
call [ted_is_select]
|
2009-12-29 00:19:20 +01:00
|
|
|
|
cmp al,0
|
|
|
|
|
jne @f
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
@@:
|
|
|
|
|
inc cx ; Cut
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,110*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
|
|
|
|
inc cx ; Copy
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,135*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
|
|
|
|
mov cx,10 ; Upper
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,265*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
|
|
|
|
inc cx ; Lower
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,290*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
inc cx ; reverse
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,315*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
or ecx,0x40000000
|
|
|
|
|
|
2013-11-14 11:59:09 +01:00
|
|
|
|
cmp dword[buf],0
|
2009-12-29 00:19:20 +01:00
|
|
|
|
jne @f
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
@@:
|
|
|
|
|
mov cx,6 ; Paste
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,160*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
or ecx,0x40000000
|
|
|
|
|
|
|
|
|
|
inc cx
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,185*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
|
|
|
|
inc cx
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,210*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
|
|
|
|
inc cx
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,235*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
mov ebx,ted_tim_undo
|
|
|
|
|
cmp ted_tim_ch,ebx
|
2009-12-29 00:19:20 +01:00
|
|
|
|
jg @f
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
@@:
|
|
|
|
|
mov cx,13
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,345*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
or ecx,0x40000000
|
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
cmp ted_tim_undo,1
|
2009-12-29 00:19:20 +01:00
|
|
|
|
jge @f
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
@@:
|
|
|
|
|
inc cx
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,370*65536+25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
or ecx,0x40000000
|
|
|
|
|
|
2013-11-28 11:35:07 +01:00
|
|
|
|
inc cx
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,400*65536+25
|
2013-11-28 11:35:07 +01:00
|
|
|
|
call draw_but_icon
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2013-11-28 11:35:07 +01:00
|
|
|
|
inc cx
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,425*65536+25
|
2013-11-28 11:35:07 +01:00
|
|
|
|
call draw_but_icon
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2013-11-28 11:35:07 +01:00
|
|
|
|
mov cx,17 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,450*65536+25
|
2013-11-28 11:35:07 +01:00
|
|
|
|
call draw_but_icon
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2013-11-28 11:35:07 +01:00
|
|
|
|
mov cx,18 ;cp 1251 -> 866
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,480*65536+25
|
2013-11-28 11:35:07 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
|
|
|
|
mov cx,19 ;cp 866 -> 1251
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov edx,505*65536+25
|
2013-11-28 11:35:07 +01:00
|
|
|
|
call draw_but_icon
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
;push edi
|
|
|
|
|
;mov edi,dword[edit]
|
|
|
|
|
cmp ted_panel_id,TED_PANEL_FIND ;if not panel
|
2009-12-29 00:19:20 +01:00
|
|
|
|
jne @f
|
|
|
|
|
push eax ebx ecx edx
|
|
|
|
|
|
|
|
|
|
mov eax,13 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><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,TED_PANEL_WIDTH
|
2010-04-15 17:50:49 +02:00
|
|
|
|
mov ecx,ted_wnd_t
|
2009-12-29 00:19:20 +01:00
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,20
|
|
|
|
|
mov edx,[sc.work]
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
mov eax,4 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2015-08-02 16:54:03 +02:00
|
|
|
|
mov ebx,30*65536+25
|
2010-04-15 17:50:49 +02:00
|
|
|
|
add ebx,ted_wnd_t
|
2009-12-29 00:19:20 +01:00
|
|
|
|
mov ecx,[sc.work_text]
|
|
|
|
|
or ecx,0x80000000
|
|
|
|
|
mov edx,txtFindCapt
|
|
|
|
|
int 0x40
|
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
stdcall [edit_box_draw], dword edit2
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
|
|
|
|
mov eax,13 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><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,TED_PANEL_WIDTH
|
2010-04-15 17:50:49 +02:00
|
|
|
|
mov ecx,ted_wnd_t
|
2009-12-29 00:19:20 +01:00
|
|
|
|
add cx,20+15 ; 15 - height text box
|
|
|
|
|
shl ecx,16
|
2010-04-15 17:50:49 +02:00
|
|
|
|
add ecx,ted_wnd_h
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov edx,ted_scr_h
|
|
|
|
|
add cx,word[edx+sb_offs_size_y]
|
2009-12-29 00:19:20 +01:00
|
|
|
|
sub cx,20+15-1 ; 15 - height text box
|
|
|
|
|
mov edx,[sc.work]
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
mov eax,8 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ebx,5*65536+85
|
2010-04-15 17:50:49 +02:00
|
|
|
|
mov ecx,ted_wnd_t
|
2009-12-29 00:19:20 +01:00
|
|
|
|
add cx,20+15+5
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,20
|
|
|
|
|
mov edx,201 ;button id
|
|
|
|
|
mov esi,[sc.work_button]
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
mov eax,4 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ebx,15*65536+(20+15+10)
|
2010-04-15 17:50:49 +02:00
|
|
|
|
add ebx,ted_wnd_t
|
2009-12-29 00:19:20 +01:00
|
|
|
|
mov ecx,[sc.work_text]
|
|
|
|
|
or ecx,0x80000000
|
|
|
|
|
mov edx,txtFindNext
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
pop edx ecx ebx eax
|
2010-04-15 17:50:49 +02:00
|
|
|
|
jmp .end_f
|
2009-12-29 00:19:20 +01:00
|
|
|
|
@@:
|
|
|
|
|
push eax edx
|
|
|
|
|
mov eax,8
|
|
|
|
|
mov edx,201
|
|
|
|
|
or edx,0x80000000
|
|
|
|
|
int 0x40
|
|
|
|
|
pop edx eax
|
2010-04-15 17:50:49 +02:00
|
|
|
|
.end_f:
|
2010-04-29 20:27:40 +02:00
|
|
|
|
;pop edi
|
2009-12-29 00:19:20 +01:00
|
|
|
|
ret
|
2010-04-15 17:50:49 +02:00
|
|
|
|
endp
|
|
|
|
|
|
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
|
|
|
|
|
;push edi
|
|
|
|
|
;mov edi,dword[edit]
|
|
|
|
|
cmp ted_panel_id,TED_PANEL_SYNTAX ;if not panel
|
2009-12-29 00:19:20 +01:00
|
|
|
|
jne @f
|
2010-04-29 20:27:40 +02:00
|
|
|
|
pushad
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
|
|
|
|
mov eax,13 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><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,TED_PANEL_WIDTH
|
2010-04-15 17:50:49 +02:00
|
|
|
|
mov ecx,ted_wnd_t
|
2009-12-29 00:19:20 +01:00
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,20
|
|
|
|
|
mov edx,[sc.work]
|
2010-04-15 17:50:49 +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><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
stdcall dword[tl_draw], tree1
|
2010-04-15 17:50:49 +02: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>
|
|
|
|
|
stdcall dword[scrollbar_ver_draw], dword ws_dir_lbox
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
|
|
|
|
ror ecx,16
|
|
|
|
|
add ecx,dword[tree1.box_height]
|
|
|
|
|
add ecx,20
|
2010-04-15 17:50:49 +02:00
|
|
|
|
and ecx,0xffff
|
2009-12-29 00:19:20 +01:00
|
|
|
|
ror ecx,16
|
2010-04-15 17:50:49 +02:00
|
|
|
|
add ecx,ted_wnd_h
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov esi,ted_scr_h
|
|
|
|
|
add cx,word[esi+sb_offs_size_y]
|
2009-12-29 00:19:20 +01:00
|
|
|
|
sub cx,20
|
|
|
|
|
sub ecx,dword[tree1.box_height]
|
|
|
|
|
inc cx
|
2010-04-15 17:50:49 +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><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
|
|
|
|
mov eax,8 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ebx,5*65536+65
|
2010-04-15 17:50:49 +02:00
|
|
|
|
mov ecx,ted_wnd_t
|
|
|
|
|
add ecx,25
|
2009-12-29 00:19:20 +01:00
|
|
|
|
add ecx,dword[tree1.box_height]
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,20
|
|
|
|
|
mov edx,200 ;button id
|
|
|
|
|
mov esi,[sc.work_button]
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
mov eax,4 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ebx,30*65536+5
|
2010-04-15 17:50:49 +02:00
|
|
|
|
add ebx,ted_wnd_t
|
2009-12-29 00:19:20 +01:00
|
|
|
|
mov ecx,[sc.work_text]
|
|
|
|
|
or ecx,0x80000000
|
|
|
|
|
mov edx,txtFormatCapt
|
|
|
|
|
int 0x40
|
|
|
|
|
|
2015-08-01 02:13:37 +02:00
|
|
|
|
mov ebx,10*65536+50
|
2009-12-29 00:19:20 +01:00
|
|
|
|
add ebx,dword[tree1.box_height]
|
2010-04-15 17:50:49 +02:00
|
|
|
|
add ebx,ted_wnd_t
|
2009-12-29 00:19:20 +01:00
|
|
|
|
mov edx,txtFormatApply
|
|
|
|
|
int 0x40
|
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
popad
|
2010-04-15 17:50:49 +02:00
|
|
|
|
jmp .end_f
|
2009-12-29 00:19:20 +01:00
|
|
|
|
@@:
|
2010-04-15 17:50:49 +02:00
|
|
|
|
push eax edx
|
|
|
|
|
mov eax,8
|
|
|
|
|
mov edx,200
|
|
|
|
|
or edx,0x80000000
|
|
|
|
|
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>
|
|
|
|
|
pop edx eax
|
|
|
|
|
.end_f:
|
2010-04-29 20:27:40 +02:00
|
|
|
|
;pop edi
|
2009-12-29 00:19:20 +01:00
|
|
|
|
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:
|
2010-04-29 20:27:40 +02:00
|
|
|
|
pushad
|
|
|
|
|
mov ebx,ted_scr_h
|
|
|
|
|
mov esi,ted_scr_w
|
2010-04-15 17:50:49 +02:00
|
|
|
|
|
|
|
|
|
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>
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov eax,dword[esi+sb_offs_size_x]
|
2010-04-15 17:50:49 +02:00
|
|
|
|
and eax,0xffff
|
|
|
|
|
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
|
2009-12-29 00:19:20 +01:00
|
|
|
|
jg @f
|
2010-04-15 17:50:49 +02:00
|
|
|
|
mov ted_wnd_h,MIN_M_WND_H
|
2009-12-29 00:19:20 +01:00
|
|
|
|
@@:
|
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov ax,word[ebx+sb_offs_size_y]
|
2010-04-15 17:50:49 +02:00
|
|
|
|
and eax,0xffff
|
|
|
|
|
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>
|
|
|
|
|
|
2010-05-03 17:12:50 +02:00
|
|
|
|
stdcall [ted_init_scroll_bars], tedit0,2
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2010-04-15 17:50:49 +02:00
|
|
|
|
mov eax,ted_wnd_t
|
2009-12-29 00:19:20 +01:00
|
|
|
|
mov edi,dword tree1
|
2010-04-15 17:50:49 +02:00
|
|
|
|
mov tl_box_top,eax ;=ted_wnd_t
|
2009-12-29 00:19:20 +01:00
|
|
|
|
add tl_box_top,20
|
|
|
|
|
|
2010-04-15 17:50:49 +02:00
|
|
|
|
mov dword[edit2.top],eax ;=ted_wnd_t
|
2009-12-29 00:19:20 +01:00
|
|
|
|
add dword[edit2.top],20
|
|
|
|
|
|
2010-04-15 17:50:49 +02:00
|
|
|
|
popad
|
2009-12-29 00:19:20 +01:00
|
|
|
|
ret
|
2010-04-15 17:50:49 +02:00
|
|
|
|
|
2009-12-29 00:19:20 +01:00
|
|
|
|
;input:
|
|
|
|
|
; ecx = 0x4000____
|
|
|
|
|
; cx = icon index
|
|
|
|
|
; 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
|
|
|
|
|
|
|
|
|
|
mov eax,8 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
push ecx edx esi
|
|
|
|
|
mov ebx,edx
|
|
|
|
|
mov edx,ecx
|
|
|
|
|
add edx,3
|
|
|
|
|
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>
|
|
|
|
|
mov eax,7 ;bmp
|
|
|
|
|
@@:
|
|
|
|
|
pop esi edx ecx
|
|
|
|
|
|
|
|
|
|
cmp eax,7
|
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
|
|
|
|
|
and ecx,0xffff
|
|
|
|
|
imul ecx,1200
|
|
|
|
|
add ebx,ecx
|
|
|
|
|
mov ecx,20
|
|
|
|
|
shl ecx,16
|
|
|
|
|
add ecx,20
|
|
|
|
|
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
|
|
|
|
|
|