Rev 6087 | Rev 7571 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6087 | Rev 7488 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | draw_but_toolbar: ;ôóíêöèÿ äëÿ ðèñîâàíèÿ ïàíåëè èíñòðóìåíòîâ |
2 | draw_but_toolbar: ;ôóíêöèÿ äëÿ ðèñîâàíèÿ ïàíåëè èíñòðóìåíòîâ |
3 | pushad |
3 | pushad |
4 | mov edi,tedit0 |
4 | mov edi,tedit0 |
Line 5... | Line 5... | ||
5 | 5 | ||
6 | mov ecx,0x40000000 |
6 | mov ecx,0x40000000 |
- | 7 | mov edx,(5 shl 16)+25 |
|
- | 8 | bt word[panel_but],0 |
|
7 | mov edx,5*65536+25 |
9 | jnc @f |
- | 10 | call draw_but_icon ;New |
|
Line 8... | Line 11... | ||
8 | call draw_but_icon |
11 | @@: |
- | 12 | ||
- | 13 | inc cx |
|
9 | 14 | bt word[panel_but+1],0 |
|
10 | inc cx |
15 | jnc @f |
- | 16 | add edx,25 shl 16 |
|
Line 11... | Line 17... | ||
11 | mov edx,30*65536+25 |
17 | call draw_but_icon ;Open |
12 | call draw_but_icon |
18 | @@: |
13 | 19 | ||
14 | stdcall [ted_can_save],edi |
20 | stdcall [ted_can_save],edi |
15 | cmp al,1 |
21 | cmp al,1 |
16 | je @f |
22 | je @f |
- | 23 | and ecx,0xffff |
|
- | 24 | @@: |
|
17 | and ecx,0xffff |
25 | inc cx |
18 | @@: |
26 | bt word[panel_but+2],0 |
- | 27 | jnc @f |
|
19 | inc cx |
28 | add edx,25 shl 16 |
Line 20... | Line 29... | ||
20 | mov edx,55*65536+25 |
29 | call draw_but_icon ;Save |
- | 30 | @@: |
|
- | 31 | or ecx,0x40000000 |
|
21 | call draw_but_icon |
32 | |
22 | or ecx,0x40000000 |
33 | inc cx |
- | 34 | bt word[panel_but+3],0 |
|
Line 23... | Line 35... | ||
23 | 35 | jnc @f |
|
24 | inc cx |
36 | add edx,30 shl 16 |
25 | mov edx,85*65536+25 |
37 | call draw_but_icon ;Select word |
26 | call draw_but_icon |
38 | @@: |
27 | 39 | ||
28 | call [ted_is_select] |
40 | call [ted_is_select] |
29 | cmp al,0 |
- | |
30 | jne @f |
41 | or al,al |
31 | and ecx,0xffff |
- | |
32 | @@: |
42 | jnz @f |
33 | inc cx ; Cut |
- | |
34 | mov edx,110*65536+25 |
- | |
35 | call draw_but_icon |
- | |
36 | - | ||
37 | inc cx ; Copy |
43 | and ecx,0xffff |
38 | mov edx,135*65536+25 |
44 | @@: |
39 | call draw_but_icon |
45 | inc cx |
40 | - | ||
41 | mov cx,10 ; Upper |
- | |
42 | mov edx,265*65536+25 |
- | |
Line 43... | Line 46... | ||
43 | call draw_but_icon |
46 | bt word[panel_but+4],0 |
- | 47 | jnc @f |
|
- | 48 | add edx,25 shl 16 |
|
44 | 49 | call draw_but_icon ;Cut |
|
45 | inc cx ; Lower |
50 | @@: |
- | 51 | ||
46 | mov edx,290*65536+25 |
52 | inc cx |
Line 47... | Line 53... | ||
47 | call draw_but_icon |
53 | bt word[panel_but+5],0 |
48 | 54 | jnc @f |
|
49 | inc cx ; reverse |
55 | add edx,25 shl 16 |
50 | mov edx,315*65536+25 |
56 | call draw_but_icon ;Copy |
51 | call draw_but_icon |
57 | @@: |
- | 58 | or ecx,0x40000000 |
|
- | 59 | ||
52 | or ecx,0x40000000 |
60 | cmp dword[buf],0 |
53 | 61 | jne @f |
|
- | 62 | and ecx,0xffff |
|
54 | cmp dword[buf],0 |
63 | @@: |
Line 55... | Line 64... | ||
55 | jne @f |
64 | inc cx |
- | 65 | bt word[panel_but+6],0 |
|
- | 66 | jnc @f |
|
56 | and ecx,0xffff |
67 | add edx,25 shl 16 |
57 | @@: |
68 | call draw_but_icon ;Paste |
- | 69 | @@: |
|
Line 58... | Line 70... | ||
58 | mov cx,6 ; Paste |
70 | or ecx,0x40000000 |
- | 71 | ||
- | 72 | inc cx |
|
59 | mov edx,160*65536+25 |
73 | bt word[panel_but+7],0 |
60 | call draw_but_icon |
74 | jnc @f |
- | 75 | add edx,25 shl 16 |
|
Line 61... | Line 76... | ||
61 | or ecx,0x40000000 |
76 | call draw_but_icon ;Found |
- | 77 | @@: |
|
- | 78 | ||
62 | 79 | inc cx |
|
- | 80 | bt word[panel_but+8],0 |
|
- | 81 | jnc @f |
|
- | 82 | add edx,25 shl 16 |
|
- | 83 | call draw_but_icon ;Replace |
|
- | 84 | @@: |
|
- | 85 | ||
- | 86 | inc cx |
|
- | 87 | bt word[panel_but+9],0 |
|
- | 88 | jnc @f |
|
- | 89 | add edx,25 shl 16 |
|
- | 90 | call draw_but_icon ;Key words |
|
- | 91 | @@: |
|
- | 92 | ||
- | 93 | call [ted_is_select] |
|
- | 94 | or al,al |
|
- | 95 | jnz @f |
|
- | 96 | and ecx,0xffff |
|
- | 97 | @@: |
|
- | 98 | inc cx |
|
63 | inc cx |
99 | bt word[panel_but+10],0 |
- | 100 | jnc @f |
|
- | 101 | add edx,30 shl 16 |
|
- | 102 | call draw_but_icon ;Upper |
|
- | 103 | @@: |
|
- | 104 | ||
- | 105 | inc cx |
|
- | 106 | bt word[panel_but+11],0 |
|
- | 107 | jnc @f |
|
- | 108 | add edx,25 shl 16 |
|
Line 64... | Line 109... | ||
64 | mov edx,185*65536+25 |
109 | call draw_but_icon ;Lower |
65 | call draw_but_icon |
110 | @@: |
66 | 111 | ||
67 | inc cx |
112 | inc cx |
68 | mov edx,210*65536+25 |
113 | bt word[panel_but+12],0 |
69 | call draw_but_icon |
114 | jnc @f |
- | 115 | add edx,25 shl 16 |
|
- | 116 | call draw_but_icon ;Reverse |
|
70 | 117 | @@: |
|
71 | inc cx |
118 | or ecx,0x40000000 |
- | 119 | ||
72 | mov edx,235*65536+25 |
120 | mov ebx,ted_tim_undo |
Line 73... | Line 121... | ||
73 | call draw_but_icon |
121 | cmp ted_tim_ch,ebx |
74 | 122 | jg @f |
|
75 | mov ebx,ted_tim_undo |
123 | and ecx,0xffff |
76 | cmp ted_tim_ch,ebx |
124 | @@: |
77 | jg @f |
125 | inc cx |
- | 126 | bt word[panel_but+13],0 |
|
- | 127 | jnc @f |
|
78 | and ecx,0xffff |
128 | add edx,30 shl 16 |
79 | @@: |
129 | call draw_but_icon ;Undo |
- | 130 | @@: |
|
80 | mov cx,13 |
131 | or ecx,0x40000000 |
Line 81... | Line 132... | ||
81 | mov edx,345*65536+25 |
132 | |
- | 133 | cmp ted_tim_undo,1 |
|
- | 134 | jge @f |
|
82 | call draw_but_icon |
135 | and ecx,0xffff |
83 | or ecx,0x40000000 |
136 | @@: |
- | 137 | inc cx |
|
Line 84... | Line 138... | ||
84 | 138 | bt word[panel_but+14],0 |
|
- | 139 | jnc @f |
|
- | 140 | add edx,25 shl 16 |
|
85 | cmp ted_tim_undo,1 |
141 | call draw_but_icon ;Redo |
86 | jge @f |
142 | @@: |
- | 143 | or ecx,0x40000000 |
|
Line -... | Line 144... | ||
- | 144 | ||
87 | and ecx,0xffff |
145 | inc cx |
- | 146 | bt word[panel_but+15],0 |
|
88 | @@: |
147 | jnc @f |
89 | inc cx |
148 | add edx,30 shl 16 |
- | 149 | call draw_but_icon ;Invisible on|off |
|
Line -... | Line 150... | ||
- | 150 | @@: |
|
90 | mov edx,370*65536+25 |
151 | |
- | 152 | inc cx |
|
91 | call draw_but_icon |
153 | bt word[panel_but+16],0 |
92 | or ecx,0x40000000 |
154 | jnc @f |
- | 155 | add edx,25 shl 16 |
|
Line -... | Line 156... | ||
- | 156 | call draw_but_icon |
|
93 | 157 | @@: |
|
- | 158 | ||
94 | inc cx |
159 | inc cx |
95 | mov edx,400*65536+25 |
160 | bt word[panel_but+17],0 |
- | 161 | jnc @f |
|
Line 96... | Line 162... | ||
96 | call draw_but_icon |
162 | add edx,25 shl 16 |
97 | 163 | call draw_but_icon ;Âûáîð ôàéëà ïîäñâåòêè |
|
Line 98... | Line 164... | ||
98 | inc cx |
164 | @@: |
Line 307... | Line 373... | ||
307 | .gray: |
373 | .gray: |
308 | push ecx |
374 | push ecx |
309 | and ecx,0xffff |
375 | and ecx,0xffff |
310 | imul ecx,1200 |
376 | imul ecx,1200 |
311 | add ebx,ecx |
377 | add ebx,ecx |
312 | mov ecx,20 |
378 | mov ecx,(20 shl 16)+20 |
313 | shl ecx,16 |
- | |
314 | add ecx,20 |
- | |
315 | int 0x40 ;ñòàâèì ðèñóíîê íà êíîïêó |
379 | int 0x40 ;ñòàâèì ðèñóíîê íà êíîïêó |
316 | pop ecx |
380 | pop ecx |
317 | @@: |
381 | @@: |
318 | pop ebx eax |
382 | pop ebx eax |
319 | ret |
383 | ret |