Rev 5692 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5692 | Rev 6675 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;Basic macros for use editbox ; |
2 | ;Basic macros for use editbox ; |
3 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
3 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 4... | Line -... | ||
4 | - | ||
5 | 4 | ||
6 | macro use_editbox_draw |
5 | macro use_editbox_draw |
7 | { |
6 | { |
8 | edit_box: |
7 | edit_box: |
9 | .draw: |
8 | .draw: |
- | 9 | pushad |
|
- | 10 | mov edi,[esp+36] |
|
- | 11 | and dword ed_text_color,17FFFFFFh |
|
- | 12 | mov ecx,ed_text_color |
|
- | 13 | mov ebx,ecx |
|
- | 14 | shr ecx,28 |
|
- | 15 | shl ebx,4 |
|
- | 16 | shr ebx,28 |
|
- | 17 | inc ebx |
|
- | 18 | mov eax,6 |
|
- | 19 | jecxz @f |
|
10 | pushad |
20 | mov al, 8 |
- | 21 | @@: |
|
11 | .draw_1: |
22 | mul bl |
- | 23 | mov ed_char_width,eax |
|
- | 24 | mov al, 9 |
|
- | 25 | jecxz @f |
|
- | 26 | mov al, 16 |
|
- | 27 | @@: |
|
- | 28 | mul bl |
|
12 | ;--- à¨á㥬 à ¬ªã --- |
29 | add eax,4 |
13 | mov edi,dword [esp+36] |
30 | mov ed_height,eax |
14 | call .draw_border |
31 | call .draw_border |
15 | .draw_bg_cursor_text: |
- | |
16 | ;--- ¨§¬¥ï¥¬ ᬥ饨¥, ¥á«¨ ¤® --- |
32 | .draw_bg_cursor_text: |
17 | call .check_offset |
- | |
18 | ;--- à¨á㥬 ¢ãâà¥îî ®¡« áâì --- |
33 | call .check_offset |
19 | call .draw_bg |
- | |
20 | ;--- à¨á㥬 ¢ë¤¥«¥¨¥, ¯® shift ¥á«¨ ¥áâì --- |
34 | call .draw_bg |
21 | call .draw_shift |
35 | call .draw_shift |
22 | .draw_cursor_text: |
36 | .draw_cursor_text: |
23 | call .draw_text |
- | |
24 | ;--- à¨á㥬 ªãàá®à --- |
- | |
25 | ;--- ¬®¦¥â ¥£® ¥ ¤® à¨á®¢ âì --- |
37 | call .draw_text |
26 | test word ed_flags,ed_focus |
38 | test word ed_flags,ed_focus |
27 | jz .editbox_exit |
39 | jz .editbox_exit |
28 | call .draw_cursor |
40 | call .draw_cursor |
29 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
41 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 32... | Line 44... | ||
32 | .editbox_exit: |
44 | .editbox_exit: |
33 | popad |
45 | popad |
34 | ret 4 |
46 | ret 4 |
35 | } |
47 | } |
Line 36... | Line -... | ||
36 | - | ||
37 | 48 | ||
38 | macro use_editbox_key |
49 | macro use_editbox_key |
39 | { |
50 | { |
40 | ;========================================================== |
51 | ;========================================================== |
41 | ;=== ®¡à ¡®âª ª« ¢¨ âãàë ================================= |
52 | ;=== ®¡à ¡®âª ª« ¢¨ âãàë ================================= |
42 | ;========================================================== |
53 | ;========================================================== |
43 | edit_box_key: |
54 | edit_box_key: |
44 | pushad |
55 | pushad |
45 | mov edi,dword [esp+36] |
56 | mov edi,[esp+36] |
46 | test word ed_flags,ed_focus ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
57 | test word ed_flags,ed_focus ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
47 | jz edit_box.editbox_exit |
58 | jz edit_box.editbox_exit |
48 | test word ed_flags,ed_mouse_on or ed_disabled |
59 | test word ed_flags,ed_mouse_on or ed_disabled |
49 | jnz edit_box.editbox_exit |
- | |
50 | 60 | jnz edit_box.editbox_exit |
|
51 | ;-------------------------------------- |
61 | ;-------------------------------------- |
52 | ; this code for Win-keys, works with |
62 | ; this code for Win-keys, works with |
53 | ; kernel SVN r.3356 or later |
63 | ; kernel SVN r.3356 or later |
54 | push eax |
64 | push eax |
Line 60... | Line 70... | ||
60 | jz @f |
70 | jz @f |
61 | .win_key_pressed: |
71 | .win_key_pressed: |
62 | pop ebx |
72 | pop ebx |
63 | pop eax |
73 | pop eax |
64 | jmp edit_box.editbox_exit |
74 | jmp edit_box.editbox_exit |
65 | @@: |
75 | |
66 | pop ebx |
76 | @@: pop ebx |
67 | pop eax |
77 | pop eax |
68 | ;-------------------------------------- |
78 | ;-------------------------------------- |
69 | ;஢¥àª ¦ â shift ? |
79 | ;஢¥àª ¦ â shift ? |
70 | call edit_box_key.check_shift_ctrl_alt |
80 | call edit_box_key.check_shift_ctrl_alt |
71 | ;---------------------------------------------------------- |
81 | ;---------------------------------------------------------- |
Line 125... | Line 135... | ||
125 | ;=== ®¡à ¡®âª ¬ëè¨ ======================================= |
135 | ;=== ®¡à ¡®âª ¬ëè¨ ======================================= |
126 | ;========================================================== |
136 | ;========================================================== |
127 | ;save for stdcall ebx,esi,edi,ebp |
137 | ;save for stdcall ebx,esi,edi,ebp |
128 | edit_box_mouse: |
138 | edit_box_mouse: |
129 | pushad |
139 | pushad |
130 | mov edi,dword [esp+36] |
140 | mov edi,[esp+36] |
131 | test word ed_flags,ed_disabled |
141 | test word ed_flags,ed_disabled |
132 | jnz edit_box.editbox_exit |
142 | jnz edit_box.editbox_exit |
133 | ;debug |
143 | ;debug |
134 | ;---------------------------------------------------------- |
144 | ;---------------------------------------------------------- |
135 | ;--- ¯®«ãç ¥¬ á®áâ®ï¨¥ ª®¯®ª ¬ëè¨ ----------------------- |
145 | ;--- ¯®«ãç ¥¬ á®áâ®ï¨¥ ª®¯®ª ¬ëè¨ ----------------------- |
Line 139... | Line 149... | ||
139 | ;--- ¯à®¢¥à塞 á®áâ®ï¨¥ ---------------------------------- |
149 | ;--- ¯à®¢¥à塞 á®áâ®ï¨¥ ---------------------------------- |
140 | ;---------------------------------------------------------- |
150 | ;---------------------------------------------------------- |
141 | test eax,1 |
151 | test eax,1 |
142 | jnz edit_box_mouse.mouse_left_button |
152 | jnz edit_box_mouse.mouse_left_button |
143 | and word ed_flags,ed_mouse_on_off |
153 | and word ed_flags,ed_mouse_on_off |
144 | mov ebx,dword ed_mouse_variable |
154 | mov ebx,ed_mouse_variable |
145 | push 0 |
155 | push 0 |
146 | pop dword [ebx] |
156 | pop dword [ebx] |
147 | ; mov dword [ebx],ebx |
- | |
148 | jmp edit_box.editbox_exit |
157 | jmp edit_box.editbox_exit |
- | 158 | ||
149 | .mouse_left_button: |
159 | .mouse_left_button: |
150 | ;---------------------------------------------------------- |
160 | ;---------------------------------------------------------- |
151 | ;--- ¡«®ª¨à®¢ª ®â 䮪ãá¨à®¢ª¨ ¢ ¤àã£¨å ¡®ªá å ¯à¨ ¯®¯ ¤ ¨¨ ¨å ªãàá®à |
161 | ;--- ¡«®ª¨à®¢ª ®â 䮪ãá¨à®¢ª¨ ¢ ¤àã£¨å ¡®ªá å ¯à¨ ¯®¯ ¤ ¨¨ ¨å ªãàá®à |
152 | ;---------------------------------------------------------- |
162 | ;---------------------------------------------------------- |
153 | mov eax,dword ed_mouse_variable |
163 | mov eax,ed_mouse_variable |
154 | push dword [eax] |
164 | push dword [eax] |
155 | pop eax |
165 | pop eax |
156 | test eax,eax |
166 | test eax,eax |
157 | jz @f |
167 | jz @f |
158 | cmp eax,edi |
168 | cmp eax,edi |
Line 181... | Line 191... | ||
181 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
191 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
182 | ;Bit mask from editbox |
192 | ;Bit mask from editbox |
183 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
193 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
184 | } |
194 | } |
Line 185... | Line -... | ||
185 | - | ||
186 | 195 | ||
187 | ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
196 | ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
188 | ;¨¦¥ à ᯮ«®¦¥ë äãªæ¨¨ ª®â®à묨 ॠ«¨§ã¥âáï ¢¥áì «£®à¨â¬ |
197 | ;¨¦¥ à ᯮ«®¦¥ë äãªæ¨¨ ª®â®à묨 ॠ«¨§ã¥âáï ¢¥áì «£®à¨â¬ |
189 | ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
198 | ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
190 | ; ªà®á ¤«ï ¢ë¢®¤ ®á®¢ëå äãªæ¨© ª®â®àë¥ ¨á¯®«ì§ãîâáï ¡®ªá®¬ |
199 | ; ªà®á ¤«ï ¢ë¢®¤ ®á®¢ëå äãªæ¨© ª®â®àë¥ ¨á¯®«ì§ãîâáï ¡®ªá®¬ |
Line 196... | Line 205... | ||
196 | ;---------------------------------------------------------- |
205 | ;---------------------------------------------------------- |
197 | edit_box.draw_shift: |
206 | edit_box.draw_shift: |
198 | test word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
207 | test word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
199 | jz @f |
208 | jz @f |
200 | mov ebp,shift_color |
209 | mov ebp,shift_color |
201 | mov ebx,dword ed_shift_pos |
210 | mov ebx,ed_shift_pos |
202 | call edit_box_key.sh_cl_ |
211 | call edit_box_key.sh_cl_ |
203 | @@: ret |
212 | @@: ret |
204 | ;---------------------------------------------------------- |
213 | ;---------------------------------------------------------- |
205 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ⥪áâ -------------------------- |
214 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ⥪áâ -------------------------- |
206 | ;---------------------------------------------------------- |
215 | ;---------------------------------------------------------- |
207 | edit_box.draw_text: |
216 | edit_box.draw_text: |
208 | ;--- ¢ëç¨á«ï¥¬, ᪮«ìª® ¯®¬¥é ¥âáï ᨬ¢®«®¢ --- |
- | |
209 | call edit_box.get_n |
217 | call edit_box.get_n |
210 | mov esi,ed_size |
218 | mov esi,ed_size |
211 | mov ebx,ed_offset |
219 | sub esi,ed_offset |
212 | sub esi,ebx |
- | |
213 | cmp eax,esi |
220 | cmp eax,esi |
214 | jae @F |
221 | jae @f |
215 | mov esi,eax |
222 | mov esi,eax |
- | 223 | @@: |
|
216 | ;--- à¨á㥬 ⥪áâ --- |
224 | test esi,esi |
- | 225 | jz @f |
|
217 | @@: mov eax,4 |
226 | mov eax,4 |
218 | mov ebx,ed_left |
227 | mov ebx,ed_left |
219 | mov edx,ed_offset |
- | |
220 | add ebx,2 |
228 | add ebx,2 |
221 | shl ebx,16 |
229 | shl ebx,16 |
222 | add ebx,ed_top |
230 | add ebx,ed_top |
- | 231 | add ebx,2 |
|
223 | mov ecx,ed_text_color |
232 | mov ecx,ed_text_color |
224 | add ebx,4 |
233 | test dword ed_flags,ed_pass |
225 | add edx,ed_text |
234 | jnz .password |
226 | test word ed_flags,ed_pass |
235 | mov edx,ed_text |
227 | jnz edit_box.draw_password |
236 | add edx,ed_offset |
228 | mcall |
237 | mcall |
- | 238 | @@: |
|
229 | ret |
239 | ret |
230 | txt_pass db '*',0 |
- | |
231 | proc edit_box.draw_password |
- | |
232 | locals |
- | |
233 | s_len dw ? ;¤«¨ ¢ë¢®¤¨¬®£® ⥪áâ |
- | |
234 | endl |
240 | |
235 | cmp esi,1 |
241 | .password: |
236 | jl .end_f ;¥á«¨ áâப ¯ãáâ ï |
- | |
237 | mov [s_len],si |
242 | mov ebp,esi |
238 | xor esi,esi |
243 | mov esi,1 |
239 | inc esi |
- | |
240 | lea edx,[txt_pass] |
244 | mov edx,txt_pass |
241 | @@: |
245 | @@: |
242 | mcall |
246 | mcall |
243 | add ebx,6 shl 16 ;¤®¡ ¢«ï¥¬ áâ ¤ àâãî è¨à¨ã ᨬ¢®« |
247 | rol ebx,16 |
244 | dec word[s_len] |
248 | add ebx,ed_char_width |
245 | cmp word[s_len],0 |
249 | rol ebx,16 |
246 | jg @b |
250 | dec ebp |
247 | .end_f: |
251 | jnz @b |
248 | ret |
252 | ret |
249 | endp |
253 | |
- | 254 | txt_pass db '*' |
|
250 | ;---------------------------------------------------------- |
255 | ;---------------------------------------------------------- |
251 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ä® ---------------------------- |
256 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ä® ---------------------------- |
252 | ;¢å®¤ë¥ ¤ ë¥ |
- | |
253 | ;eax |
- | |
254 | ;edx - color |
- | |
255 | ;---------------------------------------------------------- |
257 | ;---------------------------------------------------------- |
256 | - | ||
257 | edit_box.draw_bg: |
258 | edit_box.draw_bg: |
258 | mov ebx,ed_left |
259 | mov ebx,ed_left |
259 | add ebx,1 |
260 | inc ebx |
260 | mov edx,ed_color |
- | |
261 | test word ed_flags, ed_disabled |
- | |
262 | jz @f |
- | |
263 | mov edx, 0x00cacaca ; TODO: add new value disabled_color to editbox struct |
- | |
264 | @@: |
- | |
265 | shl ebx,16 |
261 | shl ebx,16 |
266 | add ebx,ed_width |
262 | add ebx,ed_width |
267 | sub ebx,1 |
263 | dec ebx |
- | 264 | mov edx,ed_color |
|
- | 265 | test word ed_flags, ed_disabled |
|
268 | ;¢å®¤ ⮫쪮 梥â edx |
266 | jz edit_box.draw_bg_eax |
- | 267 | mov edx, 0xCACACA ; TODO: add disabled_color field to editbox struct |
|
269 | edit_box.draw_bg_eax: |
268 | edit_box.draw_bg_eax: |
270 | mov ecx,ed_top |
269 | mov ecx,ed_top |
271 | mov eax,13 |
- | |
272 | add ecx,1 |
270 | inc ecx |
273 | shl ecx,16 |
271 | shl ecx,16 |
274 | add ecx,ed_height |
272 | add ecx,ed_height |
275 | dec ecx |
273 | dec ecx |
276 | mcall |
274 | mcall 13 |
277 | ret |
275 | ret |
- | 276 | ||
278 | ;---------------------------------------------------------- |
277 | ;---------------------------------------------------------- |
279 | ;--- ¯à®æ¥¤ãà ¯®«ãç¥¨ï ª®«¨ç¥á⢠ᨬ¢®«®¢ ¢ ⥪ã饩 è¨à¨¥ ª®¬¯®¥â |
278 | ;--- ¯à®æ¥¤ãà ¯®«ãç¥¨ï ª®«¨ç¥á⢠ᨬ¢®«®¢ ¢ ⥪ã饩 è¨à¨¥ ª®¬¯®¥â |
280 | ;---------------------------------------------------------- |
279 | ;---------------------------------------------------------- |
281 | edit_box.get_n: |
280 | edit_box.get_n: |
282 | mov eax,ed_width ;¯®«ã祬 è¨à¨ã ª®¬¯®¥â |
281 | mov eax,ed_width |
283 | xor edx,edx ;१ã«ìâ â à ᯮ« £ ¥âáï ¢ ¯ ॠedx:eax ¢ eax - ®áâ ⮪ |
- | |
284 | sub eax,4 ;¢ëç⥬ 4 |
282 | sub eax,4 |
285 | mov ebx,6 ;§ £à㧨¬ ¤¥«¨â¥«ì |
283 | xor edx,edx |
286 | div ebx ;à §¤¥«¨¬ 6 |
284 | div word ed_char_width |
287 | ret |
285 | ret |
- | 286 | ||
288 | ;---------------------------------------------------------- |
287 | ;---------------------------------------------------------- |
289 | ;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï ªãàá®à -------------------------- |
288 | ;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï ªãàá®à -------------------------- |
290 | ;---------------------------------------------------------- |
289 | ;---------------------------------------------------------- |
291 | ;¢å®¤ë¥ ebp- 梥â |
290 | ;¢å®¤ë¥ ebp- 梥â |
292 | edit_box.clear_cursor: |
291 | edit_box.clear_cursor: |
293 | mov edx,ebp |
292 | mov edx,ebp |
294 | mov ebx,cl_curs_x |
293 | mov ebx,cl_curs_x |
295 | mov ecx,cl_curs_y |
294 | mov ecx,cl_curs_y |
296 | jmp edit_box.draw_curs |
295 | jmp edit_box.draw_curs |
297 | edit_box.draw_cursor: |
- | |
298 | mov edx,ed_text_color |
- | |
299 | mov ebx,ed_pos |
- | |
300 | mov ecx,ed_offset |
- | |
301 | sub ebx,ecx |
- | |
Line -... | Line 296... | ||
- | 296 | ||
302 | 297 | edit_box.draw_cursor: |
|
303 | lea ebx,[ebx*2+ebx] |
298 | mov eax,ed_pos |
- | 299 | sub eax,ed_offset |
|
304 | shl ebx,1 |
300 | mul dword ed_char_width |
305 | ;imul ebx,6 |
301 | mov ebx,eax |
306 | add ebx,ed_left |
- | |
307 | mov ecx,ed_top |
302 | add ebx,ed_left |
308 | inc ebx |
- | |
309 | add ecx,2 |
303 | inc ebx |
310 | mov ebp,ebx |
304 | mov edx,ebx |
- | 305 | shl ebx,16 |
|
311 | shl ebx,16 |
306 | add ebx,edx |
- | 307 | mov ecx,ed_top |
|
312 | mov bx,bp |
308 | add ecx,2 |
313 | mov ebp,ecx |
- | |
314 | 309 | mov edx,ecx |
|
315 | shl ecx,16 |
310 | shl ecx,16 |
316 | mov cx,bp |
311 | add ecx,edx |
317 | add ecx,ed_height-4 |
- | |
- | 312 | add ecx,ed_height |
|
318 | 313 | sub ecx,4 |
|
319 | mov cl_curs_x,ebx |
314 | mov cl_curs_x,ebx |
- | 315 | mov cl_curs_y,ecx |
|
320 | mov cl_curs_y,ecx |
316 | mov edx,ed_text_color |
321 | edit_box.draw_curs: |
317 | edit_box.draw_curs: |
322 | mcall 38 |
318 | mcall 38 |
- | 319 | ret |
|
323 | ret |
320 | |
324 | ;---------------------------------------------------------- |
321 | ;---------------------------------------------------------- |
325 | ;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï à ¬ª¨ ---------------------------- |
322 | ;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï à ¬ª¨ ---------------------------- |
326 | ;---------------------------------------------------------- |
323 | ;---------------------------------------------------------- |
327 | edit_box.draw_border: |
324 | edit_box.draw_border: |
Line 359... | Line 356... | ||
359 | mov ebx,ebp |
356 | mov ebx,ebp |
360 | shl ebx,16 |
357 | shl ebx,16 |
361 | mov bx,bp |
358 | mov bx,bp |
362 | mcall |
359 | mcall |
363 | ret |
360 | ret |
- | 361 | ||
364 | ;---------------------------------------------------------- |
362 | ;---------------------------------------------------------- |
365 | ;--- ¯à®¢¥àª , § 襫 «¨ ªãàá®à § £à ¨æë ¨, ¥á«¨ ¤®, --- |
363 | ;--- ¯à®¢¥àª , § 襫 «¨ ªãàá®à § £à ¨æë ¨, ¥á«¨ ¤®, --- |
366 | ;--- ¨§¬¥ï¥¬ ᬥ饨¥ ------------------------------------ |
364 | ;--- ¨§¬¥ï¥¬ ᬥ饨¥ ------------------------------------ |
367 | ;--- ¥á«¨ ᬥ饨¥ ¡ë«®, ãáâ ®¢ª ä« £ ed_offset_cl, ¨ ç¥, |
365 | ;--- ¥á«¨ ᬥ饨¥ ¡ë«®, ãáâ ®¢ª ä« £ ed_offset_cl, ¨ ç¥, |
368 | ; ¥á«¨ ¨ç¥£® ¥ ¨§¬¥¨«®áì, â® ¢ëáâ ¢«¥¨¥ ed_offset_fl |
366 | ; ¥á«¨ ¨ç¥£® ¥ ¨§¬¥¨«®áì, â® ¢ëáâ ¢«¥¨¥ ed_offset_fl |
Line 372... | Line 370... | ||
372 | pushad |
370 | pushad |
373 | mov ecx,ed_pos |
371 | mov ecx,ed_pos |
374 | mov ebx,ed_offset |
372 | mov ebx,ed_offset |
375 | cmp ebx,ecx |
373 | cmp ebx,ecx |
376 | ja edit_box.sub_8 |
374 | ja edit_box.sub_8 |
377 | - | ||
378 | push ebx |
375 | push ebx |
379 | call edit_box.get_n ;¯®«ã稬 ª®«-¢® ᨬ¢®«®¢ ª®â®àë¥ ã¬¥é îâáï ¢ è¨à¨¥ ª®¬¯®¥â , ¢ ¯ ॠॣ¨áâ஢ edx:eax |
376 | call edit_box.get_n |
380 | pop ebx |
377 | pop ebx |
381 | mov edx,ebx |
378 | mov edx,ebx |
382 | add edx,eax ;ed_offset+width editbox |
379 | add edx,eax |
383 | inc edx ;¥®¡å®¤¨¬® ¤«ï ®à¬ «ì®£® ¯®«®¦¥¨ï ªãàá®à ¢ ªà ©¥© «¥¢®© ¯®§¨æ¨¨ |
380 | inc edx ;¥®¡å®¤¨¬® ¤«ï ®à¬ «ì®£® ¯®«®¦¥¨ï ªãàá®à ¢ ªà ©¥© «¥¢®© ¯®§¨æ¨¨ |
384 | cmp edx,ecx |
381 | cmp edx,ecx |
385 | ja @f |
382 | ja @f |
386 | - | ||
387 | mov edx,ed_size |
383 | mov edx,ed_size |
388 | cmp edx,ecx |
384 | cmp edx,ecx |
389 | je edit_box.add_end |
385 | je edit_box.add_end |
390 | - | ||
391 | sub edx,ecx |
386 | sub edx,ecx |
392 | cmp edx,8 |
387 | cmp edx,8 |
393 | jbe edit_box.add_8 |
388 | jbe edit_box.add_8 |
394 | add ebx,8 |
389 | add ebx,8 |
395 | jmp edit_box.chk_d |
390 | jmp edit_box.chk_d |
Line -... | Line 391... | ||
- | 391 | ||
- | 392 | @@: or word ed_flags,ed_offset_fl |
|
- | 393 | popad |
|
- | 394 | ret |
|
396 | 395 | ||
397 | edit_box.sub_8: |
396 | edit_box.sub_8: |
398 | test ecx,ecx |
- | |
399 | jz edit_box.sub_min |
397 | test ecx,ecx |
400 | cmp ebx,8 |
- | |
401 | jbe edit_box.sub_min |
398 | jz @f |
402 | sub ebx,8 ;ebx=ed_offset |
399 | sub ebx,8 ;ebx=ed_offset |
403 | jmp edit_box.chk_d |
400 | ja edit_box.chk_d |
404 | edit_box.sub_min: |
401 | @@: |
405 | xor ebx,ebx |
402 | xor ebx,ebx |
Line 406... | Line 403... | ||
406 | jmp edit_box.chk_d |
403 | jmp edit_box.chk_d |
- | 404 | ||
407 | 405 | edit_box.add_end: |
|
408 | edit_box.add_end:sub edx,eax |
406 | sub edx,eax |
- | 407 | mov ebx,edx |
|
- | 408 | jmp edit_box.chk_d |
|
409 | mov ebx,edx |
409 | |
- | 410 | edit_box.add_8: |
|
410 | jmp edit_box.chk_d |
411 | add ebx,edx |
411 | edit_box.add_8: add ebx,edx |
412 | edit_box.chk_d: |
412 | edit_box.chk_d: mov ed_offset,ebx |
413 | mov ed_offset,ebx |
413 | call edit_box.draw_bg |
- | |
414 | and word ed_flags,ed_offset_cl |
- | |
415 | edit_ex |
414 | call edit_box.draw_bg |
416 | @@: |
- | |
417 | or word ed_flags,ed_offset_fl |
415 | and word ed_flags,ed_offset_cl |
Line 418... | Line -... | ||
418 | - | ||
419 | edit_ex |
416 | popad |
420 | 417 | ret |
|
421 | align 4 |
418 | |
422 | proc edit_box_set_text, edit:dword, text:dword |
419 | proc edit_box_set_text, edit:dword, text:dword |
423 | pushad |
420 | pushad |
424 | mov edi,dword[edit] |
421 | mov edi,[edit] |
425 | mov ecx,ed_max |
422 | mov ecx,ed_max |
426 | inc ecx ;ãç¨âë¢ ¥¬ ¡ã¤ã饥 ®¡à¥§ ¨¥ áâப¨ ¤«ï ascii 0 |
423 | inc ecx |
427 | mov edi,dword[text] |
424 | mov edi,[text] |
428 | xor al,al |
425 | xor al,al |
429 | cld |
- | |
430 | repne scasb ;¯®¨áª ¢ áâப¥ edi ᨬ¢®« al |
426 | cld |
431 | mov ecx,edi ;ecx = text + ¬¨. § 票¥ ¨§: 1) ed_max ¨«¨ 2) ¤«¨ë áâப¨ text |
427 | repne scasb |
432 | 428 | mov ecx,edi |
|
433 | mov edi,dword[edit] |
429 | mov edi,[edit] |
434 | mov esi,dword[text] |
430 | mov esi,[text] |
435 | sub ecx,esi ;ecx = ¤«¨ áâப¨ text (® ¥ ¡®«ìè¥ ç¥¬ ed_max) |
431 | sub ecx,esi |
436 | dec ecx |
432 | dec ecx |
437 | mov ed_size,ecx ;áâ ¢¨¬ ®¢ë© à §¬¥à áâப¨ |
433 | mov ed_size,ecx |
438 | mov ed_pos,ecx ;áâ ¢¨¬ ªãàá®à ¢ ª®¥æ ®¢®© áâப¨ |
434 | mov ed_pos,ecx |
439 | and word ed_flags,ed_shift_cl ;ᨬ ¥¬ ¢ë¤¥«¥¨¥ ¥á«¨ ®® ¡ë«® |
435 | and word ed_flags,ed_shift_cl |
440 | mov edi,ed_text |
436 | mov edi,ed_text |
441 | repne movsb ;ª®¯¨à®¢ ¨¥ ⥪á⮢®© áâப¨ text ¢ edit_box |
437 | repne movsb |
442 | mov byte[edi],0 ;áâ ¢¨¬ ascii 0 ¢ ª®æ¥ áâப¨ |
438 | mov byte[edi],0 |
443 | popad |
439 | popad |
Line 444... | Line 440... | ||
444 | ret |
440 | ret |
445 | endp |
441 | endp |
446 | } |
442 | } |
447 | 443 | ||
448 | macro use_key_func |
444 | macro use_key_func |
449 | { |
445 | { |
450 | ;¡à ¡®âª Shift ¤«ï áïâ¨ï ¢ë¤¥«¥¨ï ¥¨§¢¥á⮩ ®¡« á⨠|
446 | ;¡à ¡®âª Shift ¤«ï áïâ¨ï ¢ë¤¥«¥¨ï ¥¨§¢¥á⮩ ®¡« á⨠|
451 | edit_box_key.shift: ;;;;;;;SHIFT |
- | |
452 | call edit_box.draw_bg |
447 | edit_box_key.shift: |
453 | test word ed_flags,ed_shift |
448 | call edit_box.draw_bg |
454 | je edit_box_key.f_exit |
449 | test word ed_flags,ed_shift |
455 | 450 | je edit_box_key.f_exit |
|
456 | mov ebp,shift_color |
451 | mov ebp,shift_color |
457 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
- | |
- | 452 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
|
458 | mov ebx,dword ed_shift_pos |
453 | mov ebx,ed_shift_pos |
459 | call edit_box_key.sh_cl_ |
454 | call edit_box_key.sh_cl_ |
460 | jmp edit_box.draw_cursor_text |
455 | jmp edit_box.draw_cursor_text |
461 | ;;;;;;;;;;;;;;;;;;;;; |
456 | |
462 | edit_box_key.f_exit: |
457 | edit_box_key.f_exit: |
- | 458 | call edit_box.check_offset |
|
463 | call edit_box.check_offset |
459 | and word ed_flags,ed_shift_cl |
464 | and word ed_flags,ed_shift_cl |
- | |
465 | call edit_box_key.enable_null |
460 | call edit_box_key.enable_null |
466 | jmp edit_box.draw_cursor_text |
461 | jmp edit_box.draw_cursor_text |
467 | edit_box_key.sh_cl_: |
462 | |
468 | ;;;;;;SHIFT end |
463 | edit_box_key.sh_cl_: |
469 | ;®¡à ¡®âª ®ç¨á⪨, ¯à¨ «¥¢®¬ - ¯à ¢®¬ ¤¢¨¦¥¨¨ ¢ë¤¥«¥¨ï |
464 | ;®¡à ¡®âª ®ç¨á⪨, ¯à¨ «¥¢®¬ - ¯à ¢®¬ ¤¢¨¦¥¨¨ ¢ë¤¥«¥¨ï |
470 | ;¤«ï ®¡à ¡®âª¨ áïâ¨ï ¢ë¤¥«¥¨ï |
- | |
471 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
465 | ;¤«ï ®¡à ¡®âª¨ áïâ¨ï ¢ë¤¥«¥¨ï |
472 | mov eax,dword ed_pos |
466 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
473 | cmp eax,ebx |
467 | mov eax,ed_pos |
474 | 468 | cmp eax,ebx |
|
475 | jae edit_box_key.sh_n |
- | |
- | 469 | jae edit_box_key.sh_n |
|
476 | push eax ;¬¥ì襥 ¢ eax |
470 | push eax ;¬¥ì襥 ¢ eax |
477 | push ebx ;¡®«ì襥 |
471 | push ebx ;¡®«ì襥 |
478 | jmp edit_box_key.sh_n1 |
472 | jmp edit_box_key.sh_n1 |
479 | ;¥á«¨ ¨ ç¥ |
473 | |
480 | edit_box_key.sh_n: |
474 | edit_box_key.sh_n: |
Line 487... | Line 481... | ||
487 | mov ecx,ed_offset |
481 | mov ecx,ed_offset |
488 | add eax,ecx ;eax = w_off= ed_offset+width |
482 | add eax,ecx ;eax = w_off= ed_offset+width |
489 | mov edx,eax ;save |
483 | mov edx,eax ;save |
490 | pop ebx ;¡®«ì襥 |
484 | pop ebx ;¡®«ì襥 |
491 | pop eax ;¬¥ì襥 |
485 | pop eax ;¬¥ì襥 |
492 | - | ||
493 | cmp eax,ecx ;áà ¢¥¨¥ ¬¥ì襣® á offset. |
486 | cmp eax,ecx ;áà ¢¥¨¥ ¬¥ì襣® á offset. |
494 | jae edit_box_key.f_f ;¥á«¨ ¡®«ìè¥ |
487 | jae edit_box_key.f_f ;¥á«¨ ¡®«ìè¥ |
495 | xor eax,eax |
488 | xor eax,eax |
496 | cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
489 | cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
497 | jb @f |
490 | jnb @f |
498 | sub ebx,ecx |
491 | mov ebx,edx |
499 | jmp edit_box_key.nxt_f |
- | |
500 | @@: mov ebx,edx |
492 | @@: |
501 | sub ebx,ecx |
493 | sub ebx,ecx |
502 | jmp edit_box_key.nxt_f |
494 | jmp edit_box_key.nxt_f |
- | 495 | ||
503 | edit_box_key.f_f: |
496 | edit_box_key.f_f: |
504 | sub eax,ecx |
497 | sub eax,ecx |
505 | cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
498 | cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
506 | jle @f |
499 | jle @f |
507 | sub ebx,ecx |
500 | sub ebx,ecx |
508 | sub ebx,eax |
501 | sub ebx,eax |
509 | jmp edit_box_key.nxt_f |
502 | jmp edit_box_key.nxt_f |
510 | @@: |
503 | |
511 | mov ebx,edx |
504 | @@: mov ebx,edx |
512 | sub ebx,ecx |
505 | sub ebx,ecx |
513 | sub ebx,eax |
506 | sub ebx,eax |
514 | edit_box_key.nxt_f: |
507 | edit_box_key.nxt_f: |
515 | mov edx,ebx |
508 | mul dword ed_char_width |
516 | lea ebx,[eax*2+eax] |
509 | xchg eax,ebx |
517 | shl ebx,1 |
510 | mul dword ed_char_width |
518 | add ebx,ed_left |
511 | add ebx,ed_left |
519 | inc ebx |
512 | inc ebx |
520 | shl ebx,16 |
513 | shl ebx,16 |
521 | lea ecx,[edx*2+edx] |
- | |
522 | shl ecx,1 |
514 | inc eax |
523 | mov bx,cx |
515 | mov bx, ax |
524 | inc ebx |
- | |
525 | mov edx,ebp;shift_color |
516 | mov edx,ebp ;shift_color |
526 | - | ||
527 | call edit_box.draw_bg_eax |
517 | call edit_box.draw_bg_eax |
528 | @@: call edit_box_key.enable_null |
518 | jmp edit_box_key.enable_null |
529 | ret |
519 | |
530 | ;;;;;;;;;;;;;;;;;;;;; |
- | |
531 | ;áâ ®¢ª - áï⨥ ¢ë¤¥«¥¨ï ¢ ®¤¨ ᨬ¢®« |
520 | ;áâ ®¢ª - áï⨥ ¢ë¤¥«¥¨ï ¢ ®¤¨ ᨬ¢®« |
532 | ;;;;;;;;;;;;;;;;;;;;; |
- | |
533 | edit_box_key.drw_sim: |
521 | edit_box_key.drw_sim: |
534 | mov eax,dword ed_pos |
522 | mov eax,ed_pos |
535 | call edit_box_key.draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª á § ¤ ë¬ æ¢¥â®¬ |
523 | call edit_box_key.draw_rectangle |
536 | jmp @b |
524 | jmp edit_box_key.enable_null |
537 | ;;;;;;;;;;;;;;;;;;;;; |
- | |
- | 525 | ||
538 | ;ãªæ¨ï ãáâ ®¢ª¨ ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨¨ ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
526 | ;ãªæ¨ï ãáâ ®¢ª¨ ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨¨ ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
539 | ;®£¨ª : |
- | |
540 | ;;;;;;;;;; |
- | |
541 | edit_box_key.draw_wigwag: |
527 | edit_box_key.draw_wigwag: |
542 | ;äãªæ¨ï ãáâ ®¢ª¨ ¯¥à¥¬¥ëå |
- | |
543 | mov ebp,shift_color |
528 | mov ebp,shift_color |
544 | call edit_box.clear_cursor |
529 | call edit_box.clear_cursor |
545 | - | ||
546 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ ¢ë¤¥«¥®© ®¡« á⨠|
530 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ ¢ë¤¥«¥®© ®¡« á⨠|
547 | mov ebp,shift_color |
531 | mov ebp,shift_color |
548 | mov eax,dword ed_pos |
532 | mov eax,ed_pos |
549 | test word ed_flags,ed_left_fl |
533 | test word ed_flags,ed_left_fl |
550 | jz edit_box_key.low |
534 | jnz edit_box_key.draw_rectangle |
551 | jmp @f |
535 | dec eax |
- | 536 | jmp edit_box_key.draw_rectangle |
|
552 | ;;;;;;;;;; |
537 | |
553 | ;ãªæ¨ï 㤠«¥¨ï ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨¨ ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
538 | ;ãªæ¨ï 㤠«¥¨ï ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨¨ ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
554 | ;®£¨ª : |
- | |
555 | ;;;;;;;;;; |
- | |
556 | edit_box_key.draw_wigwag_cl: |
539 | edit_box_key.draw_wigwag_cl: |
557 | ;äãªæ¨ï ãáâ ®¢ª¨ ¯¥à¥¬¥ëå |
- | |
558 | mov ebp,ed_color |
540 | mov ebp,ed_color |
559 | call edit_box.clear_cursor |
541 | call edit_box.clear_cursor |
560 | - | ||
561 | mov ebp,ed_color |
542 | mov ebp,ed_color |
562 | mov eax,dword ed_pos |
543 | mov eax,ed_pos |
563 | test word ed_flags,ed_left_fl |
544 | test word ed_flags,ed_left_fl |
564 | jz edit_box_key.low |
545 | jnz edit_box_key.draw_rectangle |
565 | @@: call edit_box_key.draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª § ªà 訢 ¥¬®© ®¡« á⨠|
- | |
566 | ret |
546 | dec eax |
567 | edit_box_key.low: dec eax |
547 | jmp edit_box_key.draw_rectangle |
568 | jmp @b |
- | |
- | 548 | ||
569 | ;¢å®¤®© ¯ à ¬¥âà ebx - ed_pos |
549 | ;¢å®¤®© ¯ à ¬¥âà ebx - ed_pos |
570 | edit_box_key.sh_first_sh: |
550 | edit_box_key.sh_first_sh: |
571 | test word ed_flags,ed_shift |
551 | test word ed_flags,ed_shift |
572 | je @f |
552 | je @f |
573 | mov dword ed_shift_pos_old,ebx |
553 | mov ed_shift_pos_old,ebx |
574 | test word ed_flags,ed_shift_on |
554 | test word ed_flags,ed_shift_on |
575 | jne @f |
555 | jne @f |
576 | mov dword ed_shift_pos,ebx |
556 | mov ed_shift_pos,ebx |
577 | or word ed_flags,ed_shift_on |
557 | or word ed_flags,ed_shift_on |
578 | @@: ret |
558 | @@: ret |
579 | ;¡à ¡®âª ªà ©¨å ¯®«®¦¥¨© ¢ editbox ¯à¨ ¦ ⮬ shift |
559 | ;¡à ¡®âª ªà ©¨å ¯®«®¦¥¨© ¢ editbox ¯à¨ ¦ ⮬ shift |
580 | ;¯à®¨§¢®¤¨â áï⨥ ¢ë¤¥«¥¨ï, ¥á«¨ ¥â shift |
560 | ;¯à®¨§¢®¤¨â áï⨥ ¢ë¤¥«¥¨ï, ¥á«¨ ¥â shift |
581 | ;¨ ç¥ ¢®®¡é¥ ¢ë室¨â |
561 | ;¨ ç¥ ¢®®¡é¥ ¢ë室¨â |
Line 584... | Line 564... | ||
584 | jne @f |
564 | jne @f |
585 | test word ed_flags,ed_shift_bac |
565 | test word ed_flags,ed_shift_bac |
586 | je @f |
566 | je @f |
587 | call edit_box.draw_bg |
567 | call edit_box.draw_bg |
588 | mov ebp,ed_color |
568 | mov ebp,ed_color |
589 | mov ebx,dword ed_shift_pos |
569 | mov ebx,ed_shift_pos |
590 | call edit_box_key.sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
570 | call edit_box_key.sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
591 | and word ed_flags,ed_shift_cl ; ®ç¨á⪠®â ⮣®, çâ® ã¡à «¨ ¢ë¤¥«¥¨¥ |
571 | and word ed_flags,ed_shift_cl ; ®ç¨á⪠®â ⮣®, çâ® ã¡à «¨ ¢ë¤¥«¥¨¥ |
592 | jmp edit_box.draw_cursor_text |
572 | jmp edit_box.draw_cursor_text |
593 | @@: |
573 | |
594 | and word ed_flags,ed_shift_off |
574 | @@: and word ed_flags,ed_shift_off |
595 | popad |
575 | popad |
596 | ret 4 |
576 | ret 4 |
597 | ;¯à®¢¥àª á®áâ®ï¨ï shift, ¡ë« «¨ ® ¦ â à ìè¥? |
577 | ;¯à®¢¥àª á®áâ®ï¨ï shift, ¡ë« «¨ ® ¦ â à ìè¥? |
598 | edit_box_key.sh_enable: |
578 | edit_box_key.sh_enable: |
599 | test word ed_flags,ed_shift |
579 | test word ed_flags,ed_shift |
600 | jne edit_box_key.sh_ext_en ; à¨á®¢ âì § ªà è¥ë© ¯àאַ㣮«ì¨ª |
580 | jne edit_box_key.sh_ext_en ; à¨á®¢ âì § ªà è¥ë© ¯àאַ㣮«ì¨ª |
601 | - | ||
602 | test word ed_flags,ed_shift_bac |
581 | test word ed_flags,ed_shift_bac |
603 | je @f |
582 | je @f |
604 | call edit_box.check_offset |
583 | call edit_box.check_offset |
605 | - | ||
606 | mov ebp,ed_color |
584 | mov ebp,ed_color |
607 | mov ebx,dword ed_shift_pos |
585 | mov ebx,ed_shift_pos |
608 | call edit_box_key.sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
586 | call edit_box_key.sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
609 | call edit_box_key.draw_wigwag_cl |
587 | call edit_box_key.draw_wigwag_cl |
610 | and word ed_flags,ed_shift_cl ; 1¢ à ¥ 㦮 |
588 | and word ed_flags,ed_shift_cl ; 1¢ à ¥ 㦮 |
611 | ret |
589 | ret |
Line 612... | Line 590... | ||
612 | 590 | ||
613 | @@: mov ebp,ed_color |
591 | @@: mov ebp,ed_color |
614 | call edit_box.clear_cursor |
592 | call edit_box.clear_cursor |
615 | call edit_box.check_offset |
593 | jmp edit_box.check_offset |
616 | ret |
594 | |
617 | edit_box_key.sh_ext_en: |
595 | edit_box_key.sh_ext_en: |
618 | call edit_box.check_offset |
596 | call edit_box.check_offset |
619 | test word ed_flags,ed_offset_fl |
597 | test word ed_flags,ed_offset_fl |
620 | je @f |
598 | je @f |
621 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ¨å ®ç¨á⪠|
599 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ¨å ®ç¨á⪠|
622 | mov eax,dword ed_shift_pos |
600 | mov eax,ed_shift_pos |
623 | mov ebx,dword ed_pos |
601 | mov ebx,ed_pos |
624 | mov ecx,dword ed_shift_pos_old |
602 | mov ecx,ed_shift_pos_old |
625 | ;¯à®¢¥àª ¨ à¨á®¢ ¨¥ § ªà è¥ëå ®¡« á⥩ |
603 | ;¯à®¢¥àª ¨ à¨á®¢ ¨¥ § ªà è¥ëå ®¡« á⥩ |
626 | cmp eax,ecx |
604 | cmp eax,ecx |
627 | je edit_box_key.1_shem |
605 | je edit_box_key.1_shem |
628 | jb edit_box_key.smaller |
606 | jb edit_box_key.smaller |
629 | cmp ecx,ebx |
607 | cmp ecx,ebx |
630 | ja edit_box_key.1_shem |
608 | ja edit_box_key.1_shem |
631 | call edit_box_key.draw_wigwag_cl ;clear |
609 | call edit_box_key.draw_wigwag_cl ;clear |
- | 610 | jmp edit_box_key.sh_e_end |
|
632 | jmp edit_box_key.sh_e_end |
611 | |
633 | edit_box_key.smaller: |
612 | edit_box_key.smaller: |
634 | cmp ecx,ebx |
613 | cmp ecx,ebx |
635 | jb edit_box_key.1_shem |
614 | jb edit_box_key.1_shem |
636 | call edit_box_key.draw_wigwag_cl ;clear |
615 | call edit_box_key.draw_wigwag_cl ;clear |
- | 616 | jmp edit_box_key.sh_e_end |
|
637 | jmp edit_box_key.sh_e_end |
617 | |
638 | ;alike = |
618 | edit_box_key.1_shem: |
- | 619 | call edit_box_key.draw_wigwag |
|
639 | edit_box_key.1_shem: call edit_box_key.draw_wigwag |
620 | edit_box_key.sh_e_end: |
640 | edit_box_key.sh_e_end: and word ed_flags,ed_shift_off |
621 | and word ed_flags,ed_shift_off |
- | 622 | ret |
|
641 | ret |
623 | |
642 | @@: mov ebp,shift_color |
624 | @@: mov ebp,shift_color |
643 | mov ebx,dword ed_shift_pos |
625 | mov ebx,ed_shift_pos |
644 | call edit_box_key.sh_cl_ |
626 | call edit_box_key.sh_cl_ |
645 | jmp edit_box_key.sh_e_end |
627 | jmp edit_box_key.sh_e_end |
646 | ;äãªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ¦ ⨨ home and end |
628 | ;äãªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ¦ ⨨ home and end |
647 | edit_box_key.sh_home_end: |
629 | edit_box_key.sh_home_end: |
648 | mov ebp,ed_color |
630 | mov ebp,ed_color |
649 | call edit_box.clear_cursor |
631 | call edit_box.clear_cursor |
650 | test word ed_flags,ed_shift_bac |
632 | test word ed_flags,ed_shift_bac |
651 | je @f |
633 | je @f |
652 | mov ebp,ed_color |
634 | mov ebp,ed_color |
653 | mov ebx,dword ed_shift_pos_old |
635 | mov ebx,ed_shift_pos_old |
654 | call edit_box_key.sh_cl_ |
636 | call edit_box_key.sh_cl_ |
655 | 637 | @@: |
|
656 | @@: test word ed_flags,ed_shift |
638 | test word ed_flags,ed_shift |
657 | je edit_box_key.sh_exit_ ;¢ë©â¨ |
639 | je edit_box_key.sh_exit_ ;¢ë©â¨ |
658 | mov ebp,shift_color |
640 | mov ebp,shift_color |
659 | mov ebx,dword ed_shift_pos |
641 | mov ebx,ed_shift_pos |
660 | call edit_box_key.sh_cl_ |
642 | call edit_box_key.sh_cl_ |
661 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
643 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
- | 644 | jmp edit_box_key.sh_e_end |
|
662 | jmp edit_box_key.sh_e_end |
645 | |
663 | edit_box_key.sh_exit_: |
646 | edit_box_key.sh_exit_: |
664 | call edit_box.draw_bg |
647 | call edit_box.draw_bg |
665 | call edit_box.check_offset |
648 | jmp edit_box.check_offset |
666 | ret |
649 | |
667 | ;äãªæ¨ï ¢¥á¥¨ï 0 ¯® ¤à¥áã ed_size+1 |
650 | ;äãªæ¨ï ¢¥á¥¨ï 0 ¯® ¤à¥áã ed_size+1 |
668 | edit_box_key.enable_null: |
651 | edit_box_key.enable_null: |
669 | pusha |
652 | pusha |
670 | mov eax,ed_size |
653 | mov eax,ed_size |
Line 673... | Line 656... | ||
673 | add eax,ebx |
656 | add eax,ebx |
674 | jne @f |
657 | jne @f |
675 | inc eax |
658 | inc eax |
676 | @@: xor ebx,ebx |
659 | @@: xor ebx,ebx |
677 | mov [eax],bl |
660 | mov [eax],bl |
- | 661 | popad |
|
678 | edit_ex |
662 | ret |
- | 663 | ||
679 | ;- 㤠«¥¨¥ ᨬ¢®« |
664 | ;- 㤠«¥¨¥ ᨬ¢®« |
680 | ;å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos |
665 | ;å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos |
681 | edit_box_key.del_char: |
666 | edit_box_key.del_char: |
682 | mov esi,ed_text |
667 | mov esi,ed_text |
683 | test word ed_flags,ed_shift_on |
668 | test word ed_flags,ed_shift_on |
684 | je @f |
669 | je @f |
685 | mov eax,dword ed_shift_pos |
670 | mov eax,ed_shift_pos |
686 | mov ebx,esi |
671 | mov ebx,esi |
687 | cmp eax,ecx |
672 | cmp eax,ecx |
688 | jae edit_box_key.dh_n |
673 | jae edit_box_key.dh_n |
689 | - | ||
690 | mov ed_pos,eax ;çâ®¡ë ¥ ¡ë«® ã¡¥£ ¨ï ªãàá®à |
674 | mov ed_pos,eax ;çâ®¡ë ¥ ¡ë«® ã¡¥£ ¨ï ªãàá®à |
691 | mov ebp,ecx |
675 | mov ebp,ecx |
692 | sub ebp,eax |
676 | sub ebp,eax |
693 | add ebx,eax ;eax ¬¥ìè¥ |
677 | add ebx,eax ;eax ¬¥ìè¥ |
694 | sub edx,ecx |
678 | sub edx,ecx |
695 | add esi,ecx |
679 | add esi,ecx |
696 | - | ||
697 | mov dword ed_shift_pos,ebp |
680 | mov ed_shift_pos,ebp |
698 | jmp edit_box_key.del_ch_sh |
681 | jmp edit_box_key.del_ch_sh |
699 | ;¥á«¨ ¨ ç¥ |
- | |
- | 682 | ||
700 | edit_box_key.dh_n: |
683 | edit_box_key.dh_n: |
701 | mov ebp,eax |
684 | mov ebp,eax |
702 | sub ebp,ecx |
685 | sub ebp,ecx |
703 | add ebx,ecx |
686 | add ebx,ecx |
704 | sub edx,eax |
687 | sub edx,eax |
705 | add esi,eax |
688 | add esi,eax |
706 | mov dword ed_shift_pos,ebp |
689 | mov ed_shift_pos,ebp |
707 | jmp edit_box_key.del_ch_sh |
690 | jmp edit_box_key.del_ch_sh |
Line 708... | Line 691... | ||
708 | 691 | ||
709 | @@: add esi,ecx ;㪠§ ⥫ì + ᬥ饨¥ ª ॠ«ì®¬ã ¡ãä¥àã |
692 | @@: add esi,ecx ;㪠§ ⥫ì + ᬥ饨¥ ª ॠ«ì®¬ã ¡ãä¥àã |
710 | mov ebx,esi |
693 | mov ebx,esi |
711 | inc esi |
694 | inc esi |
712 | cld |
- | |
713 | 695 | cld |
|
714 | sub edx,ecx |
696 | sub edx,ecx |
715 | edit_box_key.del_ch_sh: |
- | |
716 | 697 | edit_box_key.del_ch_sh: |
|
717 | push edi |
698 | push edi |
718 | mov edi,ebx |
699 | mov edi,ebx |
719 | @@: |
700 | @@: |
720 | lodsb |
701 | lodsb |
721 | stosb |
702 | stosb |
722 | dec edx |
703 | dec edx |
723 | jns @b |
- | |
724 | 704 | jns @b |
|
725 | pop edi |
705 | pop edi |
726 | ret |
706 | ret |
727 | ;¢ëç¨á«¨âì § ªà 訢 ¥¬ãî ®¡« áâì |
707 | ;¢ëç¨á«¨âì § ªà 訢 ¥¬ãî ®¡« áâì |
728 | ;ᮣ« 襨¥ ¢ ebp - ¯¥à¥¤ ¥âáï ed_size |
708 | ;ᮣ« 襨¥ ¢ ebp - ¯¥à¥¤ ¥âáï ed_size |
729 | edit_box_key.clear_bg: |
709 | edit_box_key.clear_bg: |
730 | call edit_box.get_n ;¯®«ãç¨âì à §¬¥à ¢ ᨬ¢®« å è¨à¨ë ª®¬¯®¥â |
710 | call edit_box.get_n ;¯®«ãç¨âì à §¬¥à ¢ ᨬ¢®« å è¨à¨ë ª®¬¯®¥â |
731 | push eax |
711 | push eax |
732 | mov ebx,ed_offset |
712 | mov ebx,ed_offset |
733 | add eax,ebx ;eax = w_off= ed_offset+width |
713 | add eax,ebx ;eax = w_off= ed_offset+width |
734 | mov ebx,ebp ;ed_size |
- | |
735 | 714 | mov ebx,ebp ;ed_size |
|
736 | cmp eax,ebx |
715 | cmp eax,ebx |
737 | jb @f |
716 | jb @f |
738 | mov eax,ed_pos |
717 | mov eax,ed_pos |
739 | sub ebx,eax |
718 | sub ebx,eax |
740 | mov ecx,ed_offset |
719 | mov ecx,ed_offset |
741 | sub eax,ecx |
720 | sub eax,ecx |
- | 721 | jmp edit_box_key.nxt |
|
742 | jmp edit_box_key.nxt |
722 | |
743 | @@: mov ebx,ed_pos |
723 | @@: mov ebx,ed_pos |
744 | push ebx |
724 | push ebx |
745 | sub eax,ebx |
725 | sub eax,ebx |
746 | mov ebx,eax ;It is not optimal |
- | |
747 | 726 | mov ebx,eax ;It is not optimal |
|
748 | pop eax ;ed_pos |
727 | pop eax ;ed_pos |
749 | mov ecx,ed_offset |
728 | mov ecx,ed_offset |
750 | sub eax,ecx |
729 | sub eax,ecx |
751 | edit_box_key.nxt: |
730 | edit_box_key.nxt: |
752 | mov ebp,eax ;¯à®¢¥àª ¢ë室 § ªà 訢 ¥¬®© ®¡« á⨠§ ¯à¥¤¥«ë ¤«¨ë |
731 | mov ebp,eax ;¯à®¢¥àª ¢ë室 § ªà 訢 ¥¬®© ®¡« á⨠§ ¯à¥¤¥«ë ¤«¨ë |
753 | add ebp,ebx |
732 | add ebp,ebx |
754 | pop edx |
733 | pop edx |
755 | cmp ebp,edx |
734 | cmp ebp,edx |
756 | je @f |
735 | je @f |
757 | inc ebx |
736 | inc ebx |
758 | 737 | @@: |
|
759 | @@: mov edx,ebx |
738 | mul dword ed_char_width |
760 | lea ebx,[eax*2+eax] |
739 | xchg eax,ebx |
761 | shl ebx,1 |
740 | mul dword ed_char_width |
762 | add ebx,ed_left |
741 | add ebx,ed_left |
763 | inc ebx |
742 | inc ebx |
764 | shl ebx,16 |
- | |
765 | lea ecx,[edx*2+edx] |
743 | shl ebx,16 |
766 | shl ecx,1 |
744 | inc eax |
767 | mov bx,cx |
745 | mov bx, ax |
768 | mov edx,ed_color |
746 | mov edx,ed_color |
769 | call edit_box.draw_bg_eax |
747 | jmp edit_box.draw_bg_eax |
770 | ret |
748 | |
771 | ;;;;;;;;;;;;;;;;;;; |
749 | ;;;;;;;;;;;;;;;;;;; |
772 | ;;; ¡à ¡®âª ¯à¨¬¨â¨¢®¢ |
750 | ;;; ¡à ¡®âª ¯à¨¬¨â¨¢®¢ |
773 | ;;;;;;;;;;;;;;;;;;;; |
751 | ;;;;;;;;;;;;;;;;;;;; |
774 | ; à¨á®¢ âì ¯àאַ㣮«ì¨ª, 梥⠯¥à¥¤ ¥âáï ¢ ebp |
752 | ; à¨á®¢ âì ¯àאַ㣮«ì¨ª, 梥⠯¥à¥¤ ¥âáï ¢ ebp |
775 | ;¢å®¤ë¥ ¯ à ¬¥âàë: |
753 | ;¢å®¤ë¥ ¯ à ¬¥âàë: |
776 | ;eax=dword ed_pos |
754 | ;eax=dword ed_pos |
777 | ;ebp=-梥â ed_color or shift_color |
755 | ;ebp=-梥â ed_color or shift_color |
778 | edit_box_key.draw_rectangle: |
756 | edit_box_key.draw_rectangle: |
779 | mov ecx,dword ed_offset |
757 | sub eax,ed_offset |
780 | sub eax,ecx |
758 | mul dword ed_char_width |
781 | lea ebx,[eax*2+eax] |
759 | add eax,ed_left |
782 | shl ebx,1 |
760 | inc eax |
783 | inc ebx |
761 | shl eax,16 |
784 | add ebx,ed_left |
762 | add eax,ed_char_width |
785 | shl ebx,16 |
- | |
786 | add ebx,6 |
763 | mov ebx,eax |
787 | mov edx,ebp |
764 | mov edx,ebp |
788 | call edit_box.draw_bg_eax |
765 | jmp edit_box.draw_bg_eax |
789 | ret |
766 | |
790 | ;;;;;;;;;;;;;;;;;; |
767 | ;;;;;;;;;;;;;;;;;; |
791 | ;;஢¥àª ¦ â «¨ shift |
768 | ;;஢¥àª ¦ â «¨ shift |
792 | ;;;;;;;;;;;;;;;;;; |
769 | ;;;;;;;;;;;;;;;;;; |
793 | edit_box_key.check_shift_ctrl_alt: |
770 | edit_box_key.check_shift_ctrl_alt: |
794 | pusha ;á®åà ¨¬ ¢á¥ ॣ¨áâàë |
771 | pusha |
795 | mcall 66,3 |
772 | mcall 66,3 |
796 | test al,11b |
773 | test al,11b |
797 | je @f |
774 | je @f |
798 | or word ed_flags,ed_shift ;ãáâ ®¢¨¬ ä« £ Shift |
775 | or word ed_flags,ed_shift ;ãáâ ®¢¨¬ ä« £ Shift |
Line 804... | Line 781... | ||
804 | @@: |
781 | @@: |
805 | and word ed_flags,ed_alt_off ; ®ç¨á⨬ ä« £ Alt |
782 | and word ed_flags,ed_alt_off ; ®ç¨á⨬ ä« £ Alt |
806 | test al,110000b |
783 | test al,110000b |
807 | je @f |
784 | je @f |
808 | or word ed_flags,ed_alt_on ;ãáâ ®¢¨¬ ä« £ Alt |
785 | or word ed_flags,ed_alt_on ;ãáâ ®¢¨¬ ä« £ Alt |
- | 786 | @@: |
|
- | 787 | popad |
|
809 | @@:edit_ex |
788 | ret |
810 | } |
789 | } |
Line 811... | Line 790... | ||
811 | 790 | ||
812 | macro use_key_no_process up,down,esc,enter,tab,numl,capsl,scrolll |
791 | macro use_key_no_process up,down,esc,enter,tab,numl,capsl,scrolll |
813 | { |
792 | { |
Line 834... | Line 813... | ||
834 | if tab eq |
813 | if tab eq |
835 | else |
814 | else |
836 | cmp ah,9 ;TAB - ª« ¢¨è )) |
815 | cmp ah,9 ;TAB - ª« ¢¨è )) |
837 | jz edit_box.editbox_exit |
816 | jz edit_box.editbox_exit |
838 | end if |
817 | end if |
839 | - | ||
840 | if numl eq |
818 | if numl eq |
841 | else |
819 | else |
842 | cmp ah,4 ;Num Lock - ª« ¢¨è )) |
820 | cmp ah,4 ;Num Lock - ª« ¢¨è )) |
843 | jz edit_box.editbox_exit |
821 | jz edit_box.editbox_exit |
844 | end if |
822 | end if |
845 | - | ||
846 | if capsl eq |
823 | if capsl eq |
847 | else |
824 | else |
848 | cmp ah,2 ;Caps Lock - ª« ¢¨è )) |
825 | cmp ah,2 ;Caps Lock - ª« ¢¨è )) |
849 | jz edit_box.editbox_exit |
826 | jz edit_box.editbox_exit |
850 | end if |
827 | end if |
851 | - | ||
852 | if scrolll eq |
828 | if scrolll eq |
853 | else |
829 | else |
854 | cmp ah,1 ;Scroll Lock - ª« ¢¨è )) |
830 | cmp ah,1 ;Scroll Lock - ª« ¢¨è )) |
855 | jz edit_box.editbox_exit |
831 | jz edit_box.editbox_exit |
856 | end if |
832 | end if |
857 | - | ||
858 | } |
833 | } |
Line 859... | Line 834... | ||
859 | 834 | ||
860 | macro use_key_figures_only |
835 | macro use_key_figures_only |
861 | { |
836 | { |
Line 865... | Line 840... | ||
865 | jb edit_box.editbox_exit |
840 | jb edit_box.editbox_exit |
866 | cmp ah,'9' |
841 | cmp ah,'9' |
867 | ja edit_box.editbox_exit |
842 | ja edit_box.editbox_exit |
868 | @@: |
843 | @@: |
869 | } |
844 | } |
- | 845 | ||
870 | macro are_key_shift_press |
846 | macro are_key_shift_press |
871 | { |
847 | { |
872 | test word ed_flags,ed_shift_on |
848 | test word ed_flags,ed_shift_on |
873 | je @f |
849 | je @f |
874 | ;å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos |
850 | ; edx = ed_size, ecx = ed_pos |
875 | push eax |
851 | push eax |
876 | mov edx,ed_size |
852 | mov edx,ed_size |
877 | mov ecx, ed_pos |
853 | mov ecx, ed_pos |
878 | pusha |
854 | pusha |
879 | ;;;;;;;;;;;;;;;;;;;;; |
- | |
880 | ;clear input arrea |
855 | ; clear input area |
881 | mov ebp,ed_color |
856 | mov ebp,ed_color |
882 | mov ebx,dword ed_shift_pos |
857 | mov ebx,ed_shift_pos |
883 | call edit_box_key.sh_cl_ |
858 | call edit_box_key.sh_cl_ |
884 | mov ebp,ed_size |
859 | mov ebp,ed_size |
885 | call edit_box_key.clear_bg |
860 | call edit_box_key.clear_bg |
886 | ;;;;;;;;;;;;;;;;;;;;; |
- | |
887 | popa |
861 | popa |
888 | call edit_box_key.del_char |
862 | call edit_box_key.del_char |
889 | ;;;; |
- | |
890 | mov ebx,ed_size |
863 | mov ebx,ed_size |
891 | sub ebx,dword ed_shift_pos |
864 | sub ebx,ed_shift_pos |
892 | mov ed_size,ebx |
865 | mov ed_size,ebx |
893 | pop eax |
866 | pop eax |
894 | @@: |
867 | @@: |
895 | } |
868 | } |
- | 869 | ||
896 | macro are_key_cur_end |
870 | macro are_key_cur_end |
897 | { |
871 | { |
898 | mov ecx,ed_size |
872 | mov ecx,ed_size |
899 | mov edx, ed_max |
873 | mov edx, ed_max |
900 | test word ed_flags,ed_insert |
874 | test word ed_flags,ed_insert |
901 | jne @f |
875 | jne @f |
902 | cmp ecx,edx |
876 | cmp ecx,edx |
903 | jae edit_box.editbox_exit |
877 | jae edit_box.editbox_exit |
904 | @@: mov ebx, ed_pos |
878 | @@: mov ebx, ed_pos |
905 | cmp ebx,edx |
879 | cmp ebx,edx |
906 | jl @f ; ¥á«¨ ¬¥ìè¥ ¨«¨ à ¢® |
- | |
907 | jmp edit_box.editbox_exit |
880 | jnl edit_box.editbox_exit |
908 | - | ||
909 | @@: ; ᤢ¨£ ¥¬ ᨬ¢®«ë ¯®á«¥ ªãàá®à ¢¯à ¢® |
- | |
910 | mov ecx,ed_size |
881 | mov ecx,ed_size |
911 | push edi eax |
882 | push edi eax |
912 | mov ebp,edi |
883 | mov ebp,edi |
913 | mov esi,ed_text ; ª § â¥«ì ¡ãä¥à |
884 | mov esi,ed_text |
914 | ;㤥¬ à ¡®â âì á® áâப®© |
- | |
915 | add esi,ecx ;add ed_size ¤®¡ ¢¨¬ max size |
885 | add esi,ecx |
916 | mov edi,esi |
886 | mov edi,esi |
917 | - | ||
918 | cmp ecx,ebx ; ᫨ ã á ¯®§¨æ¨ï ªãàá®à = ⥪ã饬ã à §¬¥àã ¯¥ç â ëå ᨬ¢®«®¢ â.¥. ªãàá®à á⮨⠢ ª®æ¥ |
887 | cmp ecx,ebx |
919 | je edit_box_key.In_k |
888 | je edit_box_key.In_k |
920 | - | ||
921 | test dword bp_flags,ed_insert ;IF insert is enabled â.ª. edi ¨§¬¥¥, ¤à¥á㥬 ç¥à¥§ ebp |
889 | test dword bp_flags,ed_insert |
922 | jne edit_box_key.ins_v |
890 | jne edit_box_key.ins_v |
923 | ;clear |
- | |
924 | pusha |
891 | pusha |
925 | mov edi,ebp |
892 | mov edi,ebp |
926 | mov ebp,ed_size |
893 | mov ebp,ed_size |
927 | call edit_box_key.clear_bg |
894 | call edit_box_key.clear_bg |
928 | popa |
895 | popa |
929 | sub ecx,ebx ; ©¤¥¬ ª®«-¢® ᨬ¢®«®¢ ¤«ï ¯¥à¥¤¢¨¦¥¨ï. |
896 | sub ecx,ebx |
930 | inc edi ;¬¥á⨬ è¨ á¨¬¢®«ë ¢¯à ¢® |
897 | inc edi |
931 | std |
898 | std |
932 | inc ecx |
899 | inc ecx |
933 | @@: |
900 | @@: |
934 | ;-------- |
- | |
935 | lodsb |
901 | lodsb |
936 | stosb |
902 | stosb |
937 | ;-------- |
- | |
938 | loop @b |
903 | loop @b |
939 | edit_box_key.In_k: |
904 | edit_box_key.In_k: |
940 | cld |
905 | cld |
941 | pop eax |
906 | pop eax |
942 | mov al,ah |
907 | mov al,ah |
943 | stosb |
908 | stosb |
944 | pop edi |
909 | pop edi |
945 | ; ¢áâ ¢«ï¥¬ ª®¤ ª« ¢¨è¨ â㤠, £¤¥ ªãàá®à |
- | |
946 | ; 㢥«¨ç¨¢ ¥¬ § 票¥ à §¬¥à ¨ ¯®§¨æ¨¨ |
- | |
947 | inc dword ed_size |
910 | inc dword ed_size |
948 | inc dword ed_pos |
911 | inc dword ed_pos |
949 | call edit_box_key.draw_all2 |
912 | call edit_box_key.draw_all2 |
950 | jmp edit_box_key.shift |
913 | jmp edit_box_key.shift |
951 | } |
914 | } |
- | 915 | ||
952 | macro use_work_key |
916 | macro use_work_key |
953 | { |
917 | { |
- | 918 | edit_box_key.insert: |
|
954 | edit_box_key.insert: test word ed_flags,ed_insert ;not word ed_insert |
919 | test word ed_flags,ed_insert |
955 | je @f |
920 | je @f |
956 | and word ed_flags,ed_insert_cl |
921 | and word ed_flags,ed_insert_cl |
957 | - | ||
958 | jmp edit_box.editbox_exit |
922 | jmp edit_box.editbox_exit |
959 | @@: |
923 | |
960 | or word ed_flags,ed_insert |
924 | @@: or word ed_flags,ed_insert |
961 | jmp edit_box.editbox_exit |
925 | jmp edit_box.editbox_exit |
- | 926 | ||
962 | edit_box_key.ins_v: |
927 | edit_box_key.ins_v: |
963 | ; dec dword [ebp+48];ed_size ;processing is insert |
- | |
964 | dec dword bp_size |
928 | dec dword bp_size |
965 | sub esi,ecx |
929 | sub esi,ecx |
966 | add esi,ebx |
930 | add esi,ebx |
967 | mov edi,esi |
931 | mov edi,esi |
968 | ;clear |
- | |
969 | pusha |
932 | pusha |
970 | mov edi,ebp |
933 | mov edi,ebp |
971 | mov ebp,ed_pos |
934 | mov ebp,ed_pos |
972 | call edit_box_key.clear_bg |
935 | call edit_box_key.clear_bg |
973 | popa |
936 | popa |
974 | jmp edit_box_key.In_k |
937 | jmp edit_box_key.In_k |
975 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
- | |
- | 938 | ||
976 | edit_box_key.delete: |
939 | edit_box_key.delete: |
977 | mov edx,ed_size |
940 | mov edx,ed_size |
978 | mov ecx,ed_pos |
941 | mov ecx,ed_pos |
979 | cmp edx,ecx |
942 | cmp edx,ecx |
980 | jg edit_box_key.bac_del |
943 | jg edit_box_key.bac_del |
981 | test word ed_flags,ed_shift_on |
944 | test word ed_flags,ed_shift_on |
982 | jne edit_box_key.del_bac |
945 | jne edit_box_key.del_bac |
983 | popad |
946 | popad |
984 | ret 4 |
947 | ret 4 |
- | 948 | ||
985 | edit_box_key.bac_del: |
949 | edit_box_key.bac_del: |
986 | call edit_box_key.del_char |
950 | call edit_box_key.del_char |
987 | jmp edit_box_key.draw_all |
951 | jmp edit_box_key.draw_all |
988 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
- | |
989 | ;--- ¦ â ª« ¢¨è backspace --- |
- | |
- | 952 | ||
990 | edit_box_key.backspace: |
953 | edit_box_key.backspace: |
991 | test word ed_flags,ed_shift_on |
954 | test word ed_flags,ed_shift_on |
992 | jne edit_box_key.delete |
955 | jne edit_box_key.delete |
993 | ; ¯à®¢¥à塞, ªãàá®à ã «¥¢®£® ªà ï? |
- | |
994 | mov ecx,ed_pos |
956 | mov ecx,ed_pos |
995 | test ecx,ecx |
957 | test ecx,ecx |
996 | jnz edit_box_key.del_bac |
958 | jnz edit_box_key.del_bac |
997 | popad |
959 | popad |
998 | ret 4 |
960 | ret 4 |
Line 1005... | Line 967... | ||
1005 | call edit_box_key.del_char |
967 | call edit_box_key.del_char |
1006 | @@: test word ed_flags,ed_shift_on |
968 | @@: test word ed_flags,ed_shift_on |
1007 | jne edit_box_key.bac_del |
969 | jne edit_box_key.bac_del |
1008 | dec dword ed_pos |
970 | dec dword ed_pos |
1009 | edit_box_key.draw_all: |
971 | edit_box_key.draw_all: |
1010 | push edit_box_key.shift;.draw_cursor_text;eax |
972 | push edit_box_key.shift |
1011 | - | ||
1012 | test word ed_flags,ed_shift_on |
973 | test word ed_flags,ed_shift_on |
1013 | je @f |
974 | je @f |
1014 | mov eax,dword ed_shift_pos |
975 | mov eax,ed_shift_pos |
1015 | mov ebx,ed_size |
976 | mov ebx,ed_size |
1016 | sub ebx,eax |
977 | sub ebx,eax |
1017 | mov ed_size,ebx |
978 | mov ed_size,ebx |
1018 | - | ||
1019 | mov ebp,ed_color |
979 | mov ebp,ed_color |
1020 | call edit_box.clear_cursor |
980 | call edit_box.clear_cursor |
1021 | call edit_box.check_offset |
981 | call edit_box.check_offset |
1022 | call edit_box.draw_bg |
982 | jmp edit_box.draw_bg |
1023 | ret |
- | |
1024 | @@: dec dword ed_size |
- | |
Line -... | Line 983... | ||
- | 983 | ||
1025 | 984 | @@: dec dword ed_size |
|
1026 | edit_box_key.draw_all2: |
985 | edit_box_key.draw_all2: |
1027 | and word ed_flags,ed_shift_cl |
986 | and word ed_flags,ed_shift_cl |
1028 | mov ebp,ed_color |
987 | mov ebp,ed_color |
1029 | call edit_box.clear_cursor |
988 | call edit_box.clear_cursor |
1030 | call edit_box.check_offset |
989 | call edit_box.check_offset |
1031 | mov ebp,ed_size |
990 | mov ebp,ed_size |
1032 | call edit_box_key.clear_bg |
991 | jmp edit_box_key.clear_bg |
1033 | ret |
- | |
1034 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
992 | |
1035 | ;--- ¦ â ª« ¢¨è left --- |
993 | ;--- ¦ â ª« ¢¨è left --- |
1036 | edit_box_key.left: |
994 | edit_box_key.left: |
1037 | mov ebx,ed_pos |
995 | mov ebx,ed_pos |
1038 | test ebx,ebx |
996 | test ebx,ebx |
Line 1042... | Line 1000... | ||
1042 | dec dword ed_pos |
1000 | dec dword ed_pos |
1043 | call edit_box.draw_bg |
1001 | call edit_box.draw_bg |
1044 | call edit_box.draw_shift |
1002 | call edit_box.draw_shift |
1045 | call edit_box_key.sh_enable |
1003 | call edit_box_key.sh_enable |
1046 | jmp edit_box.draw_cursor_text |
1004 | jmp edit_box.draw_cursor_text |
1047 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
- | |
- | 1005 | ||
1048 | ;--- ¦ â ª« ¢¨è right --- |
1006 | ;--- ¦ â ª« ¢¨è right --- |
1049 | edit_box_key.right: |
1007 | edit_box_key.right: |
1050 | mov ebx,ed_pos |
1008 | mov ebx,ed_pos |
1051 | cmp ebx,ed_size |
1009 | cmp ebx,ed_size |
1052 | je edit_box_key.sh_st_of |
1010 | je edit_box_key.sh_st_of |
Line 1055... | Line 1013... | ||
1055 | inc dword ed_pos |
1013 | inc dword ed_pos |
1056 | call edit_box.draw_bg |
1014 | call edit_box.draw_bg |
1057 | call edit_box.draw_shift |
1015 | call edit_box.draw_shift |
1058 | call edit_box_key.sh_enable |
1016 | call edit_box_key.sh_enable |
1059 | jmp edit_box.draw_cursor_text |
1017 | jmp edit_box.draw_cursor_text |
1060 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
- | |
- | 1018 | ||
1061 | edit_box_key.home: |
1019 | edit_box_key.home: |
1062 | mov ebx,ed_pos |
1020 | mov ebx,ed_pos |
1063 | test ebx,ebx |
1021 | test ebx,ebx |
1064 | jz edit_box_key.sh_st_of |
1022 | jz edit_box_key.sh_st_of |
1065 | call edit_box_key.sh_first_sh |
1023 | call edit_box_key.sh_first_sh |
Line 1067... | Line 1025... | ||
1067 | mov ed_pos,eax |
1025 | mov ed_pos,eax |
1068 | call edit_box.draw_bg |
1026 | call edit_box.draw_bg |
1069 | call edit_box.draw_shift |
1027 | call edit_box.draw_shift |
1070 | call edit_box_key.sh_home_end |
1028 | call edit_box_key.sh_home_end |
1071 | jmp edit_box.draw_cursor_text |
1029 | jmp edit_box.draw_cursor_text |
- | 1030 | ||
1072 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1031 | ;--- ¦ â ª« ¢¨è end --- |
1073 | edit_box_key.end: |
1032 | edit_box_key.end: |
1074 | mov ebx,ed_pos |
1033 | mov ebx,ed_pos |
1075 | cmp ebx,dword ed_size |
1034 | cmp ebx,ed_size |
1076 | je edit_box_key.sh_st_of |
1035 | je edit_box_key.sh_st_of |
1077 | call edit_box_key.sh_first_sh |
1036 | call edit_box_key.sh_first_sh |
1078 | mov eax,ed_size |
1037 | mov eax,ed_size |
1079 | mov ed_pos,eax |
1038 | mov ed_pos,eax |
1080 | call edit_box.draw_bg |
1039 | call edit_box.draw_bg |
1081 | call edit_box.draw_shift |
1040 | call edit_box.draw_shift |
1082 | call edit_box_key.sh_home_end |
1041 | call edit_box_key.sh_home_end |
1083 | jmp edit_box.draw_cursor_text |
1042 | jmp edit_box.draw_cursor_text |
1084 | ;----------------------------------------------------------------------------- |
- | |
- | 1043 | ||
1085 | edit_box_key.ctrl_c: |
1044 | edit_box_key.ctrl_c: |
1086 | ; add memory area |
1045 | ; add memory area |
1087 | mov ecx,ed_size |
1046 | mov ecx,ed_size |
1088 | add ecx,3*4 |
1047 | add ecx,3*4 |
1089 | mcall 68,12 |
1048 | mcall 68,12 |
Line 1110... | Line 1069... | ||
1110 | push eax |
1069 | push eax |
1111 | mcall 54,2 |
1070 | mcall 54,2 |
1112 | pop ecx |
1071 | pop ecx |
1113 | ; remove unnecessary memory area |
1072 | ; remove unnecessary memory area |
1114 | mcall 68,13 |
1073 | mcall 68,13 |
1115 | ;-------------------------------------- |
- | |
1116 | .exit: |
1074 | .exit: |
1117 | jmp edit_box.editbox_exit |
1075 | jmp edit_box.editbox_exit |
1118 | ;----------------------------------------------------------------------------- |
- | |
- | 1076 | ||
1119 | edit_box_key.ctrl_v: |
1077 | edit_box_key.ctrl_v: |
1120 | mcall 54,0 |
1078 | mcall 54,0 |
1121 | ; no slots of clipboard ? |
1079 | ; no slots of clipboard ? |
1122 | test eax,eax |
1080 | test eax,eax |
1123 | jz .exit |
1081 | jz .exit |
1124 | ; main list area not found ? |
1082 | ; main list area not found ? |
1125 | inc eax |
1083 | inc eax |
1126 | test eax,eax |
1084 | test eax,eax |
1127 | jz .exit |
1085 | jz .exit |
1128 | - | ||
1129 | sub eax,2 |
1086 | sub eax,2 |
1130 | mov ecx,eax |
1087 | mov ecx,eax |
1131 | mcall 54,1 |
1088 | mcall 54,1 |
1132 | ; main list area not found ? |
1089 | ; main list area not found ? |
1133 | inc eax |
1090 | inc eax |
Line 1135... | Line 1092... | ||
1135 | jz .exit |
1092 | jz .exit |
1136 | ; error ? |
1093 | ; error ? |
1137 | sub eax,2 |
1094 | sub eax,2 |
1138 | test eax,eax |
1095 | test eax,eax |
1139 | jz .exit |
1096 | jz .exit |
1140 | - | ||
1141 | inc eax |
1097 | inc eax |
1142 | ; check contents of container |
1098 | ; check contents of container |
1143 | mov ebx,[eax+4] |
1099 | mov ebx,[eax+4] |
1144 | ; check for text |
1100 | ; check for text |
1145 | test ebx,ebx |
1101 | test ebx,ebx |
1146 | jnz .no_valid_text |
1102 | jnz .no_valid_text |
1147 | - | ||
1148 | mov ebx,[eax+8] |
1103 | mov ebx,[eax+8] |
1149 | ; check for cp866 |
1104 | ; check for cp866 |
1150 | cmp bl,1 |
1105 | cmp bl,1 |
1151 | jnz .no_valid_text |
1106 | jnz .no_valid_text |
1152 | - | ||
1153 | mov ecx,[eax] |
1107 | mov ecx,[eax] |
1154 | sub ecx,3*4 |
1108 | sub ecx,3*4 |
1155 | cmp ecx,ed_max |
1109 | cmp ecx,ed_max |
1156 | jb @f |
1110 | jb @f |
1157 | - | ||
1158 | mov ecx,ed_max |
1111 | mov ecx,ed_max |
1159 | @@: |
1112 | @@: |
1160 | mov esi,eax |
1113 | mov esi,eax |
1161 | add esi,3*4 |
1114 | add esi,3*4 |
1162 | mov ed_size,ecx |
1115 | mov ed_size,ecx |
Line 1166... | Line 1119... | ||
1166 | cld |
1119 | cld |
1167 | @@: |
1120 | @@: |
1168 | lodsb |
1121 | lodsb |
1169 | cmp al,0x0d ; EOS (end of string) |
1122 | cmp al,0x0d ; EOS (end of string) |
1170 | je .replace |
1123 | je .replace |
1171 | - | ||
1172 | cmp al,0x0a ; EOS (end of string) |
1124 | cmp al,0x0a ; EOS (end of string) |
1173 | jne .continue |
1125 | jne .continue |
1174 | .replace: |
1126 | .replace: |
1175 | mov al,0x20 ; space |
1127 | mov al,0x20 ; space |
1176 | .continue: |
1128 | .continue: |
1177 | stosb |
1129 | stosb |
1178 | dec ecx |
1130 | dec ecx |
1179 | jnz @b |
1131 | jnz @b |
1180 | ; rep movsb |
- | |
1181 | pop edi eax |
1132 | pop edi eax |
1182 | ;-------------------------------------- |
- | |
1183 | .no_valid_text: |
1133 | .no_valid_text: |
1184 | ; remove unnecessary memory area |
1134 | ; remove unnecessary memory area |
1185 | mov ecx,eax |
1135 | mov ecx,eax |
1186 | mcall 68,13 |
1136 | mcall 68,13 |
1187 | ;-------------------------------------- |
- | |
1188 | .exit: |
1137 | .exit: |
1189 | jmp edit_box.draw_1 |
1138 | jmp edit_box.draw_bg_cursor_text |
1190 | } |
1139 | } |
Line 1191... | Line 1140... | ||
1191 | 1140 | ||
1192 | macro use_mouse_func |
1141 | macro use_mouse_func |
1193 | { |
- | |
1194 | ;---------------------------------------------------------- |
- | |
1195 | ;--- ¡à ¡®âª .mouse_wigwag |
- | |
1196 | ;---------------------------------------------------------- |
1142 | { |
1197 | edit_box_mouse.mouse_wigwag: |
1143 | edit_box_mouse.mouse_wigwag: |
1198 | push eax |
1144 | push eax |
1199 | call edit_box.draw_bg |
1145 | call edit_box.draw_bg |
1200 | call edit_box.draw_shift |
1146 | call edit_box.draw_shift |
1201 | pop eax |
- | |
1202 | shr eax,16 |
1147 | pop eax |
1203 | or word ed_flags,ed_shift_bac+ed_shift_on+ed_shift |
- | |
1204 | ;;;;;;;;;;;;;;;;;; |
1148 | or word ed_flags,ed_shift_bac+ed_shift_on+ed_shift |
1205 | ;;¯à®æ¥¤ãà ®¡à ¡®âª¨ ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ª®£¤ ¯à®¨á室¨â ¢ë室 § ¯à¥¤¥«ë editbox |
- | |
1206 | ;;;;;;;;;;;;;;;;;; |
1149 | ;¡à ¡®âª ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ª®£¤ ¯à®¨á室¨â ¢ë室 § ¯à¥¤¥«ë editbox |
1207 | test ax,0x8000 |
1150 | test eax,eax |
1208 | jnz edit_box_mouse.mleft |
- | |
1209 | 1151 | js edit_box_mouse.mleft |
|
1210 | mov ebx,ed_left |
1152 | shr eax,16 |
1211 | cmp eax,ebx |
1153 | sub eax,ed_left |
1212 | jb edit_box_mouse.mleft |
- | |
1213 | - | ||
1214 | add ebx,ed_width |
1154 | jc edit_box_mouse.mleft |
1215 | cmp eax,ebx |
1155 | cmp ed_width,eax |
1216 | ja edit_box_mouse.mright |
- | |
1217 | - | ||
1218 | sub ebx,ed_width |
- | |
1219 | 1156 | jc edit_box_mouse.mright |
|
1220 | xor edx,edx |
- | |
1221 | sub eax,ebx ; ¢ëç⥬ ¨§ ª®®à¤¨ â ¬ë誨 ¯® ®á¨ å ª®®à¤¨ âë ¤® editbox ¯® ®á¨ å |
- | |
1222 | mov ebx,6 |
1157 | xor edx,edx |
1223 | div ebx |
- | |
1224 | ;;;;;;;;;;;;;;;;;; |
1158 | div word ed_char_width |
1225 | ;;¯à®æ¥¤ãà ®¡à ¡®âª¨ ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ¢ ¯à¥¤¥« å ®¡« á⨠editbox |
- | |
1226 | ;;;;;;;;;;;;;;;;;; |
1159 | ;¡à ¡®âª ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ¢ ¯à¥¤¥« å ®¡« á⨠editbox |
1227 | ;®«ã稫¨ ª®®à¤¨ âë ¢ eax ¬ë誨, â.¥. ªã¤ ® ¯¥à¥¬¥á⨫ áì |
1160 | ;®«ã稫¨ ª®®à¤¨ âë ¢ eax ¬ë誨, â.¥. ªã¤ ® ¯¥à¥¬¥á⨫ áì |
1228 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ¨å ®ç¨á⪠|
1161 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ¨å ®ç¨á⪠|
1229 | add eax,ed_offset ;¤®¡ ¢¨¬ ᬥ饨¥ |
1162 | add eax,ed_offset |
1230 | cmp eax,dword ed_size ;¥á«¨ ¢ë諨 § ¯à¥¤¥«ë, â® ¨ç¥£® ¥ ¤¥« âì |
1163 | cmp eax,ed_size |
1231 | ja edit_box_mouse.mwigvag |
1164 | ja edit_box_mouse.mwigvag |
1232 | edit_box_mouse.mdraw: |
1165 | edit_box_mouse.mdraw: |
1233 | mov dword ed_pos,eax ;á®åà ¨¬ ®¢®¥ § 票¥ |
1166 | mov ed_pos,eax |
1234 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ¨å ®ç¨á⪠|
1167 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ¨å ®ç¨á⪠|
1235 | mov ecx,dword ed_shift_pos |
1168 | mov ecx,ed_shift_pos |
1236 | mov ebx,dword ed_shift_pos_old |
1169 | mov ebx,ed_shift_pos_old |
1237 | mov dword ed_shift_pos_old,eax ;¢¥á¥¬ ®¢®¥ § 票¥ áâ ன ¯®§¨æ¨¨ ªãàá®à |
1170 | mov ed_shift_pos_old,eax |
1238 | ;¯à®¢¥àª ¨ à¨á®¢ ¨¥ § ªà è¥ëå ®¡« á⥩ |
1171 | ;¯à®¢¥àª ¨ à¨á®¢ ¨¥ § ªà è¥ëå ®¡« á⥩ |
1239 | cmp ecx,ebx ;¢ëïá塞 ªã¤ ¡ë«® ¤¢¨¦¥¨¥ ®¤¨ è £ § ¤ |
1172 | cmp ecx,ebx |
1240 | je edit_box_mouse.m1_shem ;¤¢¨¦¥¨ï ¥ ¡ë«® à ¥¥ |
1173 | je edit_box_mouse.m1_shem ;¤¢¨¦¥¨ï ¥ ¡ë«® à ¥¥ |
1241 | jb edit_box_mouse.msmaller ;¤¢¨¦¥¨¥ ¡ë«® -> |
1174 | jb edit_box_mouse.msmaller ;¡ë«® ¤¢¨¦¥¨¥ -> |
1242 | cmp ebx,eax ;¤¢¨¦¥¨¥ ¡ë«® ¤® í⮣® <- ¨ âãâ ¬ë ¯à®¢¥à塞 ᥩç á ªã¤ ¤¢¨¦¥¨¥ ¯à®¨á室¨â |
1175 | cmp ebx,eax |
1243 | ja edit_box_mouse.m1_shem ;¥á«¨ ¡ë«® ¤¢¨¦¥¨¥ <- ⮠㦮 § ªà á¨âì ®¡« áâì |
1176 | ja edit_box_mouse.m1_shem ;¡ë«® ¤¢¨¦¥¨¥ <- |
- | 1177 | je edit_box_mouse.mwigvag |
|
1244 | je edit_box_mouse.mwigvag ;¥á«¨ ¨§¬¥¥¨ï ¥ ¡ë«®, â® ¨ç¥£® ¥ ¤¥« âì |
1178 | mov ebp,ed_color |
1245 | mov ebp,ed_color ;âãâ 㦮 ®ç¨áâ¨âì ®¡« áâì c ed_pos ed_shift_pos_old |
- | |
1246 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
- | |
1247 | call edit_box_key.sh_cl_ |
1179 | call edit_box_key.sh_cl_ ;®ç¨áâ¨âì ®¡« áâì c ed_pos ed_shift_pos_old |
- | 1180 | jmp edit_box_mouse.mwigvag |
|
1248 | jmp edit_box_mouse.mwigvag |
1181 | |
1249 | edit_box_mouse.msmaller: |
1182 | edit_box_mouse.msmaller: |
1250 | cmp ebx,eax |
1183 | cmp ebx,eax |
1251 | jb edit_box_mouse.m1_shem |
1184 | jb edit_box_mouse.m1_shem |
1252 | mov ebp,ed_color |
- | |
1253 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
1185 | mov ebp,ed_color |
1254 | call edit_box_key.sh_cl_ |
1186 | call edit_box_key.sh_cl_ |
1255 | jmp edit_box_mouse.mwigvag |
1187 | jmp edit_box_mouse.mwigvag |
1256 | ;alike = |
1188 | |
1257 | edit_box_mouse.m1_shem: |
1189 | edit_box_mouse.m1_shem: |
1258 | mov ebp,shift_color |
- | |
1259 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
1190 | mov ebp,shift_color |
1260 | mov ebx,ecx |
1191 | mov ebx,ecx |
1261 | call edit_box_key.sh_cl_ |
- | |
1262 | jmp edit_box_mouse.mwigvag |
1192 | call edit_box_key.sh_cl_ |
1263 | edit_box_mouse.mwigvag: |
1193 | edit_box_mouse.mwigvag: |
1264 | and word ed_flags,ed_shift_mcl |
1194 | and word ed_flags,ed_shift_mcl |
- | 1195 | jmp edit_box.draw_cursor_text |
|
1265 | jmp edit_box.draw_cursor_text |
1196 | |
1266 | edit_box_mouse.mleft: |
1197 | edit_box_mouse.mleft: |
1267 | mov eax,ed_pos |
1198 | mov eax,ed_pos |
1268 | cmp eax,0 |
1199 | cmp eax,0 |
1269 | jbe edit_box_mouse.mwigvag |
1200 | jbe edit_box_mouse.mwigvag |
Line 1273... | Line 1204... | ||
1273 | mov ebx,ed_shift_pos |
1204 | mov ebx,ed_shift_pos |
1274 | mov ebp,shift_color |
1205 | mov ebp,shift_color |
1275 | call edit_box_key.sh_cl_ |
1206 | call edit_box_key.sh_cl_ |
1276 | pop eax |
1207 | pop eax |
1277 | jmp edit_box_mouse.mdraw |
1208 | jmp edit_box_mouse.mdraw |
- | 1209 | ||
1278 | edit_box_mouse.mright: |
1210 | edit_box_mouse.mright: |
1279 | mov eax,ed_pos |
1211 | mov eax,ed_pos |
1280 | mov ebx,ed_size |
1212 | mov ebx,ed_size |
1281 | cmp eax,ebx |
1213 | cmp eax,ebx |
1282 | jae edit_box_mouse.mwigvag |
1214 | jae edit_box_mouse.mwigvag |
Line 1289... | Line 1221... | ||
1289 | pop eax |
1221 | pop eax |
1290 | jmp edit_box_mouse.mdraw |
1222 | jmp edit_box_mouse.mdraw |
1291 | } |
1223 | } |
Line 1292... | Line 1224... | ||
1292 | 1224 | ||
1293 | macro use_work_mouse |
- | |
1294 | ;---------------------------------------------------------- |
1225 | macro use_work_mouse |
1295 | ;--- ¥ 㤥ন¢ ¥¬ «¨ ¬ë ª« ¢¨èã ¬ë誨, ¯¥à¥¬¥é ï ªãàá®à, ¢® ¢á¥ à §ë¥ áâ®à®ë? |
- | |
1296 | ;---------------------------------------------------------- |
1226 | ; ¥ 㤥ন¢ ¥¬ «¨ ¬ë ª« ¢¨èã ¬ë誨, ¯¥à¥¬¥é ï ªãàá®à? |
1297 | { |
1227 | { |
1298 | test word ed_flags,ed_mouse_on |
1228 | test word ed_flags,ed_mouse_on |
1299 | jne edit_box_mouse.mouse_wigwag |
- | |
1300 | ;---------------------------------------------------------- |
1229 | jne edit_box_mouse.mouse_wigwag |
1301 | ;--- ¯à®¢¥à塞, ¯®¯ ¤ ¥â «¨ ªãàá®à ¢ edit box ------------- |
- | |
1302 | ;---------------------------------------------------------- |
1230 | ; ¯à®¢¥à塞, ¯®¯ ¤ ¥â «¨ ªãàá®à ¢ edit box |
1303 | mov ebx,ed_top |
1231 | mov ebx,ed_top |
1304 | cmp ax,bx |
1232 | cmp ax,bx |
1305 | jl edit_box_mouse._blur;.mouse_end_no_focus |
- | |
1306 | 1233 | jl edit_box_mouse._blur |
|
1307 | add ebx,ed_height |
1234 | add ebx,ed_height |
1308 | cmp ax,bx |
1235 | cmp ax,bx |
1309 | jg edit_box_mouse._blur;.mouse_end_no_focus |
- | |
1310 | 1236 | jg edit_box_mouse._blur |
|
1311 | shr eax,16 |
- | |
1312 | 1237 | shr eax,16 |
|
1313 | mov ebx,ed_left |
1238 | mov ebx,ed_left |
1314 | cmp ax,bx |
1239 | cmp ax,bx |
1315 | jl edit_box_mouse._blur;.mouse_end_no_focus |
- | |
1316 | 1240 | jl edit_box_mouse._blur |
|
1317 | add ebx,ed_width |
- | |
1318 | 1241 | add ebx,ed_width |
|
1319 | cmp ax,bx |
1242 | cmp ax,bx |
1320 | jg edit_box_mouse._blur;.mouse_end_no_focus |
- | |
1321 | 1243 | jg edit_box_mouse._blur |
|
1322 | ;--- ¨§¬¥ï¥¬ ¯®§¨æ¨î ªãàá®à --- |
1244 | ; ¨§¬¥ï¥¬ ¯®§¨æ¨î ªãàá®à |
1323 | push eax |
1245 | push eax |
1324 | mov ebp,ed_color |
1246 | mov ebp,ed_color |
1325 | call edit_box.clear_cursor |
1247 | call edit_box.clear_cursor |
1326 | pop eax |
1248 | pop eax |
1327 | edit_box_mouse._mvpos: |
1249 | edit_box_mouse._mvpos: |
1328 | xor edx,edx |
1250 | xor edx,edx |
1329 | sub eax,ed_left |
- | |
1330 | - | ||
1331 | mov ebx,6 |
1251 | sub eax,ed_left |
1332 | div bx |
1252 | div word ed_char_width |
1333 | add eax,ed_offset |
1253 | add eax,ed_offset |
1334 | cmp eax,ed_size |
1254 | cmp eax,ed_size |
1335 | jna edit_box_mouse._mshift |
1255 | jna edit_box_mouse._mshift |
1336 | mov eax,ed_size |
- | |
1337 | 1256 | mov eax,ed_size |
|
1338 | edit_box_mouse._mshift: |
- | |
1339 | ;;;;;;; |
1257 | edit_box_mouse._mshift: |
1340 | ;;¥ªæ¨ï ®¡à ¡®âª¨ shift ¨ ¢ë¤¥«¥¨ï ¯® shift |
- | |
1341 | ;;;;;;; |
1258 | ; ᥪæ¨ï ®¡à ¡®âª¨ shift ¨ ¢ë¤¥«¥¨ï ¯® shift |
1342 | test word ed_flags,ed_shift_bac |
1259 | test word ed_flags,ed_shift_bac |
1343 | je @f |
1260 | je @f |
1344 | mov ebp,dword ed_color |
1261 | mov ebp,ed_color |
1345 | mov ebx,dword ed_shift_pos |
1262 | mov ebx,ed_shift_pos |
1346 | push eax |
1263 | push eax |
1347 | call edit_box_key.sh_cl_ |
1264 | call edit_box_key.sh_cl_ |
1348 | and word ed_flags,ed_shift_bac_cl |
1265 | and word ed_flags,ed_shift_bac_cl |
1349 | pop eax |
1266 | pop eax |
1350 | @@: |
1267 | @@: |
1351 | test word ed_flags,ed_mouse_on |
1268 | test word ed_flags,ed_mouse_on |
1352 | jne @f |
1269 | jne @f |
1353 | mov dword ed_shift_pos,eax |
1270 | mov ed_shift_pos,eax |
1354 | or word ed_flags,ed_mouse_on |
1271 | or word ed_flags,ed_mouse_on |
1355 | mov dword ed_pos,eax |
1272 | mov ed_pos,eax |
1356 | mov ebx,dword ed_mouse_variable |
1273 | mov ebx,ed_mouse_variable |
1357 | push edi |
1274 | push edi |
1358 | pop dword [ebx] |
1275 | pop dword [ebx] |
1359 | bts word ed_flags,1 ;ãáâ ®¢ª 䮪ãá |
1276 | bts word ed_flags,1 |
1360 | call edit_box.draw_bg |
1277 | call edit_box.draw_bg |
1361 | jmp edit_box_mouse.m_sh |
1278 | jmp edit_box_mouse.m_sh |
1362 | @@: |
1279 | |
1363 | cmp eax,dword ed_shift_pos ;¥á«¨ ¯®§¨æ¨¨ ¥ ¨§¬¥¨«¨áì |
1280 | @@: cmp eax,ed_shift_pos |
1364 | je edit_box.editbox_exit |
1281 | je edit_box.editbox_exit |
1365 | mov ed_pos,eax |
1282 | mov ed_pos,eax |
1366 | call edit_box.draw_bg |
1283 | call edit_box.draw_bg |
1367 | mov ebp,dword shift_color |
1284 | mov ebp,shift_color |
1368 | mov ebx,dword ed_shift_pos |
1285 | mov ebx,ed_shift_pos |
1369 | call edit_box_key.sh_cl_ |
1286 | call edit_box_key.sh_cl_ |
1370 | or word ed_flags,ed_mous_adn_b ;ãáâ ®¢¨¬ ¡¨â, çâ® ¬ë ¢ë¤¥«¨«¨ +shift_on + |
1287 | or word ed_flags,ed_mous_adn_b |
1371 | edit_box_mouse.m_sh: |
1288 | edit_box_mouse.m_sh: |
1372 | call edit_box.draw_text |
1289 | call edit_box.draw_text |
1373 | call edit_box.draw_cursor |
- | |
1374 | ;---------------------------------------------------------- |
1290 | call edit_box.draw_cursor |
1375 | ;--- ¯à®æ¥¤ãà ãáâ ®¢ª¨ 䮪ãá --------------------------- |
- | |
1376 | ;---------------------------------------------------------- |
1291 | ; ¯à®æ¥¤ãà ãáâ ®¢ª¨ 䮪ãá |
- | 1292 | jmp edit_box_mouse.drc |
|
1377 | jmp edit_box_mouse.drc |
1293 | |
1378 | edit_box_mouse._blur: |
1294 | edit_box_mouse._blur: |
1379 | test word ed_flags,ed_always_focus |
1295 | test word ed_flags,ed_always_focus |
1380 | jne edit_box.editbox_exit |
1296 | jne edit_box.editbox_exit |
1381 | btr word ed_flags,1 ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
1297 | btr word ed_flags,1 ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
1382 | jnc edit_box.editbox_exit |
- | |
1383 | 1298 | jnc edit_box.editbox_exit |
|
1384 | mov ebp,ed_color |
1299 | mov ebp,ed_color |
- | 1300 | call edit_box.clear_cursor |
|
1385 | call edit_box.clear_cursor |
1301 | edit_box_mouse.drc: |
1386 | edit_box_mouse.drc: call edit_box.draw_border |
1302 | call edit_box.draw_border |
1387 | jmp edit_box.editbox_exit |
1303 | jmp edit_box.editbox_exit |
Line 1388... | Line -... | ||
1388 | } |
- | |
1389 | - | ||
1390 | - | ||
1391 | ; ªà®á ¢ë室 |
- | |
1392 | macro edit_ex |
- | |
1393 | { |
- | |
1394 | popad |
- | |
1395 | ret |
1304 | } |
1396 | } |
1305 | |
1397 | macro debug |
1306 | macro debug |
1398 | { |
1307 | { |
1399 | ;----------- ®â« ¤ª |
- | |
1400 | pushad |
- | |
1401 | ; mov dword [ed_buffer.2],0 |
1308 | ;----------- ®â« ¤ª |
1402 | ; mov eax,edi |
1309 | pushad |
1403 | mov eax,dword [ed_buffer.2] |
1310 | mov eax,dword [ed_buffer.2] |
1404 | mov edi,ed_buffer.3 |
1311 | mov edi,ed_buffer.3 |
1405 | call .str |
1312 | call .str |
Line 1439... | Line 1346... | ||
1439 | stosb ;§ ¯¨á âì í«¥¬¥â ¨§ ॣ¨áâà al ¢ ï祩ªã ¯ ¬ï⨠es:edi |
1346 | stosb ;§ ¯¨á âì í«¥¬¥â ¨§ ॣ¨áâà al ¢ ï祩ªã ¯ ¬ï⨠es:edi |
Line 1440... | Line 1347... | ||
1440 | 1347 | ||
1441 | ret ;¢¥àãâìáï ®ç¥ì ¨â¥à¥áë© å®¤, â.ª. ¯®ª ¢ á⥪¥ åà ¨âáï ª®«-¢® ¢ë§®¢®¢, â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï |
1348 | ret ;¢¥àãâìáï ®ç¥ì ¨â¥à¥áë© å®¤, â.ª. ¯®ª ¢ á⥪¥ åà ¨âáï ª®«-¢® ¢ë§®¢®¢, â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï |
Line 1442... | Line 1349... | ||
1442 | } |
1349 | } |