Rev 6087 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6087 | Rev 6256 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ; ¬ ªà®á ¤«ï á¨á⥬®© ¡¨¡«¨®â¥ª¨ box_lib.obj |
1 | ; ¬ ªà®á ¤«ï á¨á⥬®© ¡¨¡«¨®â¥ª¨ box_lib.obj |
2 | ; í«¥¬¥â TextEditor ¤«ï Kolibri OS |
2 | ; í«¥¬¥â TextEditor ¤«ï Kolibri OS |
3 | ; ä ©« ¯®á«¥¤¨© à § ¨§¬¥ï«áï 21.01.2016 IgorA |
3 | ; ä ©« ¯®á«¥¤¨© à § ¨§¬¥ï«áï 19.02.2016 IgorA |
4 | ; ª®¤ ¯à¨¬¥¥ GPL2 «¨æ¥§¨ï |
4 | ; ª®¤ ¯à¨¬¥¥ GPL2 «¨æ¥§¨ï |
Line 5... | Line 5... | ||
5 | 5 | ||
6 | ;input: |
6 | ;input: |
7 | ; edi = pointer to tedit struct |
7 | ; edi = pointer to tedit struct |
Line 1252... | Line 1252... | ||
1252 | ; edi = pointer to tedit struct |
1252 | ; edi = pointer to tedit struct |
1253 | ;output: |
1253 | ;output: |
1254 | ; ecx = position to inserted cell |
1254 | ; ecx = position to inserted cell |
1255 | align 4 |
1255 | align 4 |
1256 | ted_char_add: |
1256 | ted_char_add: |
1257 | - | ||
1258 | .loop_b: |
1257 | .loop_b: |
1259 | cmp ecx,ted_tex_end |
1258 | cmp ecx,ted_tex_end |
1260 | jge .end_f |
1259 | jge .end_f |
1261 | cmp dword[ecx+10],0 |
1260 | cmp dword[ecx+10],0 |
1262 | jne @f |
1261 | jne @f |
1263 | cmp dword[ecx+14],0 |
1262 | cmp dword[ecx+14],0 |
1264 | je .loop_e |
1263 | je .loop_e |
1265 | @@: |
1264 | @@: |
1266 | add ecx,sizeof.symbol |
1265 | add ecx,sizeof.symbol |
1267 | jmp .loop_b |
1266 | jmp .loop_b |
- | 1267 | align 4 |
|
1268 | .loop_e: |
1268 | .loop_e: |
Line 1269... | Line 1269... | ||
1269 | 1269 | ||
1270 | push eax ebx |
1270 | push eax ebx |
1271 | mov eax,ted_tim_ch |
1271 | mov eax,ted_tim_ch |
Line 1395... | Line 1395... | ||
1395 | 1395 | ||
1396 | ;output: |
1396 | ;output: |
1397 | ; bl = 0 - no delete |
1397 | ; bl = 0 - no delete |
1398 | ; bl = 1 - delete |
1398 | ; bl = 1 - delete |
1399 | align 4 |
1399 | align 4 |
1400 | proc ted_text_del, edit:dword, del_opt:dword |
- | |
1401 | push cx edx edi |
1400 | proc ted_text_del uses ecx edx edi, edit:dword, del_opt:dword |
1402 | mov edi,dword[edit] |
1401 | mov edi,dword[edit] |
Line 1403... | Line 1402... | ||
1403 | mov ebx,dword[del_opt] |
1402 | mov ebx,dword[del_opt] |
1404 | 1403 | ||
Line 1418... | Line 1417... | ||
1418 | @@: |
1417 | @@: |
1419 | m2m dword [edx+14], ted_tim_ch |
1418 | m2m dword[edx+14], ted_tim_ch |
1420 | mov cl,1 |
1419 | mov cl,1 |
1421 | .no_del: |
1420 | .no_del: |
1422 | mov bl,cl |
1421 | mov bl,cl |
1423 | pop edi edx cx |
- | |
1424 | ret |
1422 | ret |
1425 | endp |
1423 | endp |
Line 1426... | Line 1424... | ||
1426 | 1424 | ||
1427 | ;input: |
1425 | ;input: |
Line 1433... | Line 1431... | ||
1433 | align 4 |
1431 | align 4 |
1434 | proc ted_sel_text_del uses ebx ecx edx esi, del_opt:dword |
1432 | proc ted_sel_text_del uses ebx ecx edx esi, del_opt:dword |
1435 | call ted_is_select |
1433 | call ted_is_select |
1436 | cmp al,0 |
1434 | cmp al,0 |
1437 | je .end_f |
1435 | je .end_f |
1438 | - | ||
1439 | call ted_sel_normalize |
1436 | call ted_sel_normalize |
Line 1440... | Line 1437... | ||
1440 | 1437 | ||
1441 | mov esi,ted_seln_x1 |
1438 | mov esi,ted_seln_x1 |
1442 | mov ecx,ted_seln_y1 |
1439 | mov ecx,ted_seln_y1 |
Line 1459... | Line 1456... | ||
1459 | mov esi,ted_opt_ed_change_time |
1456 | mov esi,ted_opt_ed_change_time |
1460 | not esi |
1457 | not esi |
1461 | and dword[del_opt],esi ;n_tim=false; |
1458 | and dword[del_opt],esi ;n_tim=false; |
1462 | call ted_iterat_next |
1459 | call ted_iterat_next |
1463 | jmp @b |
1460 | jmp @b |
- | 1461 | align 4 |
|
1464 | @@: |
1462 | @@: |
1465 | test dword[del_opt],ted_opt_ed_change_time |
1463 | test dword[del_opt],ted_opt_ed_change_time |
1466 | jz @f |
1464 | jz @f |
1467 | dec ted_tim_ch |
1465 | dec ted_tim_ch |
1468 | xor al,al |
1466 | xor al,al |
Line 2984... | Line 2982... | ||
2984 | ;description: |
2982 | ;description: |
2985 | ; this function need to optimize output |
2983 | ; this function need to optimize output |
2986 | align 4 |
2984 | align 4 |
2987 | proc ted_draw_cursor_sumb |
2985 | proc ted_draw_cursor_sumb |
2988 | pushad |
2986 | pushad |
2989 | - | ||
2990 | mov eax,13 ;rect |
2987 | mov eax,SF_DRAW_RECT |
2991 | mov ebx,ted_wnd_l |
2988 | mov ebx,ted_wnd_l |
2992 | add ebx,ted_rec_l |
2989 | add ebx,ted_rec_l |
2993 | mov edx,ted_cur_x |
2990 | mov edx,ted_cur_x |
2994 | imul edx,ted_rec_w |
2991 | imul edx,ted_rec_w |
2995 | add ebx,edx |
2992 | add ebx,edx |
Line 3027... | Line 3024... | ||
3027 | add ecx,dword[esi+sb_offs_position] |
3024 | add ecx,dword[esi+sb_offs_position] |
3028 | cmp ecx,ted_seln_x0 |
3025 | cmp ecx,ted_seln_x0 |
3029 | jge @f |
3026 | jge @f |
3030 | mov edx,ted_color_wnd_work |
3027 | mov edx,ted_color_wnd_work |
3031 | @@: |
3028 | @@: |
3032 | - | ||
3033 | mov ecx,ted_cur_y |
3029 | mov ecx,ted_cur_y |
3034 | cmp ecx,ted_seln_y1 |
3030 | cmp ecx,ted_seln_y1 |
3035 | jne .no_cur_sel |
3031 | jne .no_cur_sel |
3036 | mov ecx,ted_cur_x |
3032 | mov ecx,ted_cur_x |
3037 | add ecx,dword[esi+sb_offs_position] |
3033 | add ecx,dword[esi+sb_offs_position] |
3038 | cmp ecx,ted_seln_x1 |
3034 | cmp ecx,ted_seln_x1 |
3039 | jl .no_cur_sel |
3035 | jl .no_cur_sel |
3040 | mov edx,ted_color_wnd_work |
3036 | mov edx,ted_color_wnd_work |
3041 | - | ||
3042 | .no_cur_sel: |
3037 | .no_cur_sel: |
3043 | pop ecx |
3038 | pop ecx |
3044 | int 0x40 ;à¨á®¢ ¨¥ ¯àאַ㣮«ì¨ª |
3039 | int 0x40 ;à¨á®¢ ¨¥ ¯àאַ㣮«ì¨ª |
Line 3045... | Line 3040... | ||
3045 | 3040 | ||
3046 | call ted_get_pos_by_cursor ;¡¥à¥¬ ¯®§¨æ¨î ᨬ¢®« |
3041 | call ted_get_pos_by_cursor ;¡¥à¥¬ ¯®§¨æ¨î ᨬ¢®« |
3047 | cmp ted_gp_opt,2 |
3042 | cmp ted_gp_opt,2 |
3048 | jne @f |
- | |
3049 | mov eax,4 |
3043 | jne @f |
3050 | mov esi,1 |
3044 | mov esi,1 |
3051 | ror ecx,16 |
3045 | ror ecx,16 |
3052 | mov bx,cx |
3046 | mov bx,cx |
3053 | add ebx,0x10001 |
3047 | add ebx,0x10001 |
3054 | call ted_get_symb_color |
3048 | call ted_get_symb_color |
3055 | call ted_convert_invis_symb |
3049 | call ted_convert_invis_symb |
3056 | int 0x40 ;à¨á®¢ ¨¥ ᨬ¢®« |
3050 | mcall SF_DRAW_TEXT ;à¨á®¢ ¨¥ ᨬ¢®« |
3057 | @@: |
- | |
3058 | 3051 | @@: |
|
3059 | popad |
3052 | popad |
3060 | ret |
3053 | ret |
Line 3061... | Line 3054... | ||
3061 | endp |
3054 | endp |
Line 3079... | Line 3072... | ||
3079 | cmp edx,ted_tex_1 |
3072 | cmp edx,ted_tex_1 |
3080 | jle .exit |
3073 | jle .exit |
3081 | .on_first: |
3074 | .on_first: |
3082 | xor eax,eax |
3075 | xor eax,eax |
3083 | mov al,byte[edx+1] |
3076 | mov al,byte[edx+1] |
3084 | cmp al,0 ;¥á«¨ al=0 ⮠梥⠥ ¬¥ï¥âáï |
3077 | or al,al ;¥á«¨ al=0 ⮠梥⠥ ¬¥ï¥âáï |
3085 | je @b |
3078 | jz @b |
Line 3086... | Line 3079... | ||
3086 | 3079 | ||
3087 | cmp eax,ted_colors_text_count |
3080 | cmp eax,ted_colors_text_count |
Line 3088... | Line 3081... | ||
3088 | jge .exit |
3081 | jge .exit |
3089 | 3082 | ||
3090 | shl ax,2 ;㬮¦ ¥¬ ¨¤¥ªá 梥â 4 ¡ ©â |
3083 | shl ax,2 ;㬮¦ ¥¬ ¨¤¥ªá 梥â 4 ¡ ©â |
3091 | mov ecx,ted_text_colors ;¯à¨¡ ¢«ï¥¬ ᬥ饨¥ 1-£® 梥â |
3084 | mov ecx,ted_text_colors ;¯à¨¡ ¢«ï¥¬ ᬥ饨¥ 1-£® 梥â |
3092 | add ecx,eax |
3085 | add ecx,eax |
- | 3086 | mov ecx,dword[ecx] ;ãáâ ¢«¨¢ ¥¬ ⥪ã騩 梥â ⥪áâ ¯® ᬥ饨î |
|
3093 | mov ecx,dword[ecx] ;ãáâ ¢«¨¢ ¥¬ ⥪ã騩 梥â ⥪áâ ¯® ᬥ饨î |
3087 | .exit: |
3094 | .exit: |
3088 | or ecx,ted_font_size |
Line 3095... | Line 3089... | ||
3095 | pop edx eax |
3089 | pop edx eax |
3096 | ret |
3090 | ret |
Line 3134... | Line 3128... | ||
3134 | line_num dd ? |
3128 | line_num dd ? |
3135 | endl |
3129 | endl |
3136 | pushad |
3130 | pushad |
3137 | mov edi,dword[edit] |
3131 | mov edi,dword[edit] |
Line 3138... | Line 3132... | ||
3138 | 3132 | ||
3139 | mov eax,4 ;draw text |
3133 | mov eax,SF_DRAW_TEXT |
3140 | mov ecx,ted_text_colors |
3134 | mov ecx,ted_text_colors |
Line 3141... | Line 3135... | ||
3141 | mov ecx,dword[ecx] |
3135 | mov ecx,dword[ecx] |
3142 | 3136 | ||
Line 3184... | Line 3178... | ||
3184 | ;optimized output \/ |
3178 | ;optimized output \/ |
3185 | mov eax,ted_wnd_h |
3179 | mov eax,ted_wnd_h |
3186 | add eax,ted_wnd_t |
3180 | add eax,ted_wnd_t |
3187 | cmp bx,ax |
3181 | cmp bx,ax |
3188 | jg .no_draw_text |
3182 | jg .no_draw_text |
3189 | mov eax,4 |
3183 | mov eax,SF_DRAW_TEXT |
3190 | ;optimized output /\ |
3184 | ;optimized output /\ |
3191 | and ebx,0xffff |
3185 | and ebx,0xffff |
3192 | ror ebx,16 |
3186 | ror ebx,16 |
3193 | add ebx,ted_wnd_l |
3187 | add ebx,ted_wnd_l |
3194 | add ebx,ted_rec_l |
3188 | add ebx,ted_rec_l |
Line 3196... | Line 3190... | ||
3196 | ror ebx,16 |
3190 | ror ebx,16 |
3197 | inc dword[line_num] ;increment line number |
3191 | inc dword[line_num] ;increment line number |
3198 | stdcall ted_clear_line_before_draw,edi,ebx,1,dword[line_num] |
3192 | stdcall ted_clear_line_before_draw,edi,ebx,1,dword[line_num] |
3199 | call ted_opt_draw_line_left |
3193 | call ted_opt_draw_line_left |
3200 | jmp @b |
3194 | jmp @b |
- | 3195 | align 4 |
|
3201 | .no_13: |
3196 | .no_13: |
Line 3202... | Line 3197... | ||
3202 | 3197 | ||
3203 | int 0x40 |
3198 | int 0x40 |
3204 | ror ebx,16 |
3199 | ror ebx,16 |
Line 3244... | Line 3239... | ||
3244 | mov ecx,ted_wnd_t |
3239 | mov ecx,ted_wnd_t |
3245 | add ecx,ted_wnd_h |
3240 | add ecx,ted_wnd_h |
3246 | shl ecx,16 |
3241 | shl ecx,16 |
3247 | mov cx,word[eax+sb_offs_size_y] |
3242 | mov cx,word[eax+sb_offs_size_y] |
3248 | inc cx |
3243 | inc cx |
3249 | mcall 13,,,ted_color_wnd_capt ;[sc.work] |
3244 | mcall SF_DRAW_RECT,,,ted_color_wnd_capt ;[sc.work] |
Line 3250... | Line 3245... | ||
3250 | 3245 | ||
3251 | ;right-bottom square |
3246 | ;right-bottom square |
3252 | mov ebx,ted_wnd_l |
3247 | mov ebx,ted_wnd_l |
3253 | add ebx,ted_wnd_w |
3248 | add ebx,ted_wnd_w |
Line 3272... | Line 3267... | ||
3272 | ; edi = pointer to tedit struct |
3267 | ; edi = pointer to tedit struct |
3273 | align 4 |
3268 | align 4 |
3274 | proc ted_draw_main_cursor |
3269 | proc ted_draw_main_cursor |
3275 | pushad |
3270 | pushad |
Line 3276... | Line 3271... | ||
3276 | 3271 | ||
3277 | mov eax,13 ;draw cursor |
3272 | mov eax,SF_DRAW_RECT ;draw cursor |
3278 | mov ecx,ted_wnd_t ;calc rect -> y0,y1 |
3273 | mov ecx,ted_wnd_t ;calc rect -> y0,y1 |
3279 | add ecx,ted_rec_t |
3274 | add ecx,ted_rec_t |
3280 | mov edx,ted_cur_y |
3275 | mov edx,ted_cur_y |
3281 | imul edx,ted_rec_h |
3276 | imul edx,ted_rec_h |
Line 3307... | Line 3302... | ||
3307 | int 0x40 ;¢ë¢®¤ ªãàá®à |
3302 | int 0x40 ;¢ë¢®¤ ªãàá®à |
Line 3308... | Line 3303... | ||
3308 | 3303 | ||
3309 | call ted_get_pos_by_cursor |
3304 | call ted_get_pos_by_cursor |
3310 | cmp ted_gp_opt,2 |
3305 | cmp ted_gp_opt,2 |
3311 | jne @f |
- | |
3312 | mov eax,4 ;draw text |
3306 | jne @f |
3313 | mov esi,1 |
3307 | mov esi,1 |
3314 | ror ecx,16 |
3308 | ror ecx,16 |
3315 | mov bx,cx |
3309 | mov bx,cx |
3316 | add ebx,0x10001 |
3310 | add ebx,0x10001 |
Line 3320... | Line 3314... | ||
3320 | inc cx ; 1->1, 3->2, 5->3, ... |
3314 | inc cx ; 1->1, 3->2, 5->3, ... |
3321 | shr cx,1 |
3315 | shr cx,1 |
3322 | sub bx,cx |
3316 | sub bx,cx |
3323 | .no_up_tetx: |
3317 | .no_up_tetx: |
3324 | mov ecx,ted_color_cur_text |
3318 | mov ecx,ted_color_cur_text |
- | 3319 | or ecx,ted_font_size |
|
3325 | call ted_convert_invis_symb |
3320 | call ted_convert_invis_symb |
3326 | int 0x40 |
3321 | mcall SF_DRAW_TEXT |
3327 | @@: |
3322 | @@: |
Line 3328... | Line -... | ||
3328 | - | ||
3329 | mov eax,4 |
3323 | |
3330 | mov ebx,ted_wnd_l |
3324 | mov ebx,ted_wnd_l |
3331 | add ebx,ted_rec_l |
3325 | add ebx,ted_rec_l |
3332 | shl ebx,16 |
3326 | shl ebx,16 |
3333 | add ebx,ted_wnd_t |
3327 | add ebx,ted_wnd_t |
3334 | add ebx,3 |
3328 | add ebx,3 |
3335 | mov ecx,ted_color_wnd_bord |
3329 | mov ecx,ted_color_wnd_bord |
3336 | or ecx,0x80000000 |
3330 | or ecx,0x80000000 |
3337 | lea edx,[txtRow] |
3331 | lea edx,[txtRow] |
Line 3338... | Line 3332... | ||
3338 | int 0x40 ;¢ë¢®¤ ¯®¤¯¨á¨ 'âப ' |
3332 | mcall SF_DRAW_TEXT ;¢ë¢®¤ ¯®¤¯¨á¨ 'âப ' |
3339 | 3333 | ||
3340 | add ebx,0x500000 |
3334 | add ebx,0x500000 |
Line 3425... | Line 3419... | ||
3425 | cmp eax,20 |
3419 | cmp eax,20 |
3426 | jle .crop_buf |
3420 | jle .crop_buf |
3427 | mov eax,20 ;®¡à¥§ª ¯®¤¯¨á¨ ¤® 20 ᨬ¢®«®¢ |
3421 | mov eax,20 ;®¡à¥§ª ¯®¤¯¨á¨ ¤® 20 ᨬ¢®«®¢ |
3428 | .crop_buf: |
3422 | .crop_buf: |
3429 | mov esi,eax |
3423 | mov esi,eax |
3430 | mov eax,4 |
- | |
3431 | int 0x40 ;¢ë¢®¤ ᮤ¥à¦¨¬®£® ¡ãä¥à |
3424 | mcall SF_DRAW_TEXT ;¢ë¢®¤ ᮤ¥à¦¨¬®£® ¡ãä¥à |
Line 3432... | Line 3425... | ||
3432 | 3425 | ||
3433 | sub ebx,50 shl 16 |
3426 | sub ebx,50 shl 16 |
3434 | lea edx,[txtBuf] |
3427 | lea edx,[txtBuf] |
3435 | mov esi,edx |
3428 | mov esi,edx |
3436 | call tl_strlen |
3429 | call tl_strlen |
3437 | mov esi,eax |
- | |
3438 | mov eax,4 |
3430 | mov esi,eax |
3439 | xor ecx,0x40000000 ;ã¡¨à ¥¬ 梥â ä® |
3431 | xor ecx,0x40000000 ;ã¡¨à ¥¬ 梥â ä® |
3440 | int 0x40 ;¢ë¢®¤ ¯®¤¯¨á¨ ¤«ï ¡ãä¥à |
3432 | mcall SF_DRAW_TEXT ;¢ë¢®¤ ¯®¤¯¨á¨ ¤«ï ¡ãä¥à |
3441 | @@: |
3433 | @@: |
3442 | popad |
3434 | popad |
3443 | ret |
3435 | ret |
Line 3457... | Line 3449... | ||
3457 | add ebx,ted_wnd_w |
3449 | add ebx,ted_wnd_w |
3458 | sub ebx,ted_rec_l |
3450 | sub ebx,ted_rec_l |
3459 | mov ecx,ted_wnd_t |
3451 | mov ecx,ted_wnd_t |
3460 | add ecx,13 |
3452 | add ecx,13 |
3461 | shl ecx,16 |
3453 | shl ecx,16 |
3462 | add ecx,ted_rec_h |
3454 | add ecx,9 ;9 - ¢ëá®â 0-£® èà¨äâ , áâ ¢¨âì ted_rec_h ¯®ª ¥é¥ à ® |
3463 | mcall 13,,,ted_color_wnd_capt |
3455 | mcall SF_DRAW_RECT,,,ted_color_wnd_capt |
Line 3464... | Line 3456... | ||
3464 | 3456 | ||
3465 | cmp ted_help_id,-1 |
3457 | cmp ted_help_id,-1 |
3466 | je @f |
3458 | je @f |
3467 | mov eax,ted_help_id |
3459 | mov eax,ted_help_id |
Line 3481... | Line 3473... | ||
3481 | mov ecx,ted_text_colors |
3473 | mov ecx,ted_text_colors |
3482 | add ecx,eax |
3474 | add ecx,eax |
3483 | mov ecx,dword[ecx] |
3475 | mov ecx,dword[ecx] |
3484 | or ecx,0xc0000000 ;SetTextStyles |
3476 | or ecx,0xc0000000 ;SetTextStyles |
3485 | mov esi,edi |
3477 | mov esi,edi |
3486 | mcall 4,,,,,ted_color_wnd_work |
3478 | mcall SF_DRAW_TEXT,,,,,ted_color_wnd_work |
3487 | mov edi,esi |
3479 | mov edi,esi |
Line 3488... | Line 3480... | ||
3488 | 3480 | ||
3489 | mov esi,edx |
3481 | mov esi,edx |
Line 3498... | Line 3490... | ||
3498 | add edx,ted_help_text_f1 |
3490 | add edx,ted_help_text_f1 |
3499 | inc eax |
3491 | inc eax |
3500 | imul eax,6 ;è¨à¨ ᨬ¢®« ¢ á¨áâ. èà¨ä⥠|
3492 | imul eax,6 ;è¨à¨ ᨬ¢®« ¢ á¨áâ. èà¨ä⥠|
3501 | shl eax,16 |
3493 | shl eax,16 |
3502 | add ebx,eax |
3494 | add ebx,eax |
3503 | mcall 4 |
3495 | mcall SF_DRAW_TEXT |
3504 | @@: |
3496 | @@: |
3505 | popad |
3497 | popad |
3506 | ret |
3498 | ret |
3507 | endp |
3499 | endp |
Line 3508... | Line 3500... | ||
3508 | 3500 | ||
3509 | ;input: |
3501 | ;input: |
3510 | ; edi = pointer to tedit struct |
3502 | ; edi = pointer to tedit struct |
3511 | align 4 |
3503 | align 4 |
3512 | proc ted_draw_line_numbers |
3504 | proc ted_draw_line_numbers |
3513 | pushad |
- | |
3514 | 3505 | pushad |
|
3515 | ;top panel with caption |
3506 | ;top panel with caption |
3516 | mov ebx,ted_wnd_l |
3507 | mov ebx,ted_wnd_l |
3517 | ; add ebx,ted_rec_l |
3508 | ; add ebx,ted_rec_l |
3518 | shl ebx,16 |
3509 | shl ebx,16 |
3519 | add ebx,ted_wnd_w |
3510 | add ebx,ted_wnd_w |
3520 | ; sub ebx,ted_rec_l |
3511 | ; sub ebx,ted_rec_l |
3521 | mov edx,ted_color_wnd_work |
3512 | mov edx,ted_color_wnd_work |
3522 | mov ecx,ted_wnd_t |
3513 | mov ecx,ted_wnd_t |
3523 | shl ecx,16 |
3514 | shl ecx,16 |
3524 | add ecx,ted_rec_t |
- | |
3525 | mov eax,13 |
3515 | add ecx,ted_rec_t |
3526 | mov edx,ted_color_wnd_capt |
3516 | mov edx,ted_color_wnd_capt |
Line 3527... | Line 3517... | ||
3527 | int 0x40 |
3517 | mcall SF_DRAW_RECT |
3528 | 3518 | ||
3529 | ;line numbers |
3519 | ;line numbers |
3530 | mov ebx,0x40000 ;format |
3520 | mov ebx,0x40000 ;format |
Line 3545... | Line 3535... | ||
3545 | add ebx,ted_rec_l |
3535 | add ebx,ted_rec_l |
3546 | mov ecx,ted_rec_h |
3536 | mov ecx,ted_rec_h |
3547 | rol ecx,16 |
3537 | rol ecx,16 |
3548 | mov cx,dx |
3538 | mov cx,dx |
3549 | rol ecx,16 |
3539 | rol ecx,16 |
3550 | mov eax,13 |
- | |
3551 | mov edx,ted_color_wnd_capt |
3540 | mov edx,ted_color_wnd_capt |
3552 | int 0x40 ;à¨á㥬 ¯àאַ㣮«ì¨ª ¯®¤ ®¬¥à®¬ áâப¨ |
3541 | mcall SF_DRAW_RECT ;à¨á㥬 ¯àאַ㣮«ì¨ª ¯®¤ ®¬¥à®¬ áâப¨ |
3553 | pop edx ecx ebx |
3542 | pop edx ecx ebx |
Line 3554... | Line 3543... | ||
3554 | 3543 | ||
3555 | mov eax,47 |
3544 | mov eax,47 |
3556 | mov esi,ted_color_wnd_bord |
3545 | mov esi,ted_color_wnd_bord |
Line 3562... | Line 3551... | ||
3562 | and esi,0xffff |
3551 | and esi,0xffff |
3563 | cmp esi,ted_wnd_h |
3552 | cmp esi,ted_wnd_h |
3564 | jge @f |
3553 | jge @f |
3565 | add edx,ted_wnd_t |
3554 | add edx,ted_wnd_t |
3566 | jmp @b |
3555 | jmp @b |
- | 3556 | align 4 |
|
3567 | @@: |
3557 | @@: |
3568 | - | ||
3569 | popad |
3558 | popad |
3570 | ret |
3559 | ret |
3571 | endp |
3560 | endp |
Line 3572... | Line 3561... | ||
3572 | 3561 | ||
Line 3609... | Line 3598... | ||
3609 | mov esi,dword[eax+sb_offs_position] |
3598 | mov esi,dword[eax+sb_offs_position] |
3610 | call ted_get_pos_by_coords |
3599 | call ted_get_pos_by_coords |
Line 3611... | Line 3600... | ||
3611 | 3600 | ||
3612 | cmp ted_gp_opt,2 |
3601 | cmp ted_gp_opt,2 |
3613 | jne .no_draw_text |
3602 | jne .no_draw_text |
3614 | ; mov eax,4 ;draw text |
3603 | ; mov eax,SF_DRAW_TEXT |
3615 | call ted_get_symb_color |
3604 | call ted_get_symb_color |
3616 | mov esi,1 ;draw 1 symbol |
3605 | mov esi,1 ;draw 1 symbol |
3617 | @@: |
3606 | @@: |
3618 | ;call ted_iterat_next |
3607 | ;call ted_iterat_next |
Line 3625... | Line 3614... | ||
3625 | cmp byte[edx+1],0 |
3614 | cmp byte[edx+1],0 |
3626 | je .no_col_change |
3615 | je .no_col_change |
3627 | call ted_get_symb_color |
3616 | call ted_get_symb_color |
3628 | .no_col_change: |
3617 | .no_col_change: |
Line 3629... | Line 3618... | ||
3629 | 3618 | ||
3630 | mov eax,4 ;draw text |
3619 | mov eax,SF_DRAW_TEXT |
3631 | cmp byte [edx],13 |
3620 | cmp byte [edx],13 |
3632 | jne .no_13 |
3621 | jne .no_13 |
3633 | cmp ted_mode_invis,1 |
3622 | cmp ted_mode_invis,1 |
3634 | jne .no_draw_text |
3623 | jne .no_draw_text |
Line 3751... | Line 3740... | ||
3751 | cmp ted_seln_y1,esi |
3740 | cmp ted_seln_y1,esi |
3752 | jl .no_select |
3741 | jl .no_select |
3753 | mov edx,ted_color_select ;draw selected line |
3742 | mov edx,ted_color_select ;draw selected line |
3754 | .no_select: |
3743 | .no_select: |
Line 3755... | Line -... | ||
3755 | - | ||
3756 | mov eax,13 ;rect |
3744 | |
Line 3757... | Line 3745... | ||
3757 | int 0x40 ;§ ªà ᪠¯®«®© áâப¨ 梥⮬ ä® ¨«¨ 梥⮬ ¢ë¤¥«¥¨ï |
3745 | mcall SF_DRAW_RECT ;§ ªà ᪠¯®«®© áâப¨ 梥⮬ ä® ¨«¨ 梥⮬ ¢ë¤¥«¥¨ï |
3758 | 3746 | ||
3759 | call ted_is_select |
3747 | call ted_is_select |
Line 3760... | Line 3748... | ||
3760 | cmp al,0 |
3748 | or al,al |
3761 | je .no_clear |
3749 | jz .no_clear |
3762 | 3750 | ||
3763 | mov al,13 ;rect |
3751 | mov al,SF_DRAW_RECT |
3764 | xor cx,cx |
3752 | xor cx,cx |
3765 | add ecx,ted_rec_h |
3753 | add ecx,ted_rec_h |
Line 3825... | Line 3813... | ||
3825 | jle @f |
3813 | jle @f |
3826 | cmp byte [edx],13 |
3814 | cmp byte[edx],13 |
3827 | jne @b |
3815 | jne @b |
3828 | inc ecx |
3816 | inc ecx |
3829 | jmp @b |
3817 | jmp @b |
- | 3818 | align 4 |
|
3830 | @@: |
3819 | @@: |
Line 3831... | Line 3820... | ||
3831 | 3820 | ||
3832 | cmp ecx,dword[eax+sb_offs_position] |
3821 | cmp ecx,dword[eax+sb_offs_position] |
3833 | je @f |
3822 | je @f |
Line 3848... | Line 3837... | ||
3848 | ; ecx = 梥â ᨬ¢®« |
3837 | ; ecx = 梥â ᨬ¢®« |
3849 | ; edx = 㪠§ â¥«ì ¯¥à¢ë© «¥¢ë© ᨬ¢®« |
3838 | ; edx = 㪠§ â¥«ì ¯¥à¢ë© «¥¢ë© ᨬ¢®« |
3850 | ;description: |
3839 | ;description: |
3851 | ; äãªæ¨ï 㦠¤«ï ®¯â¨¬¨§ 樨 ¢ë¢®¤ ⥪áâ |
3840 | ; äãªæ¨ï 㦠¤«ï ®¯â¨¬¨§ 樨 ¢ë¢®¤ ⥪áâ |
3852 | align 4 |
3841 | align 4 |
3853 | proc ted_opt_draw_line_left |
3842 | proc ted_opt_draw_line_left uses ebx |
3854 | push ebx |
- | |
3855 | - | ||
3856 | mov ebx,ted_scr_h |
3843 | mov ebx,ted_scr_h |
3857 | mov ebx,dword[ebx+sb_offs_position] |
3844 | mov ebx,dword[ebx+sb_offs_position] |
3858 | cmp ebx,0 |
3845 | or ebx,ebx |
3859 | je .ret_f |
3846 | jz .ret_f |
3860 | push eax |
3847 | push eax |
3861 | mov eax,edx |
3848 | mov eax,edx |
Line 3862... | Line 3849... | ||
3862 | 3849 | ||
3863 | cmp edx,ted_tex |
3850 | cmp edx,ted_tex |
3864 | jne @f |
3851 | jne @f |
3865 | call ted_iterat_next |
3852 | call ted_iterat_next |
3866 | jmp .beg_cycle |
3853 | jmp .beg_cycle |
Line 3867... | Line 3854... | ||
3867 | @@: |
3854 | @@: |
3868 | 3855 | ||
Line 3869... | Line 3856... | ||
3869 | cmp ebx,0 |
3856 | or ebx,ebx |
3870 | je @f |
3857 | jz @f |
3871 | 3858 | ||
3872 | cmp byte[edx],13 |
3859 | cmp byte[edx],13 |
3873 | jne @f |
3860 | jne @f |
3874 | call ted_iterat_next |
3861 | call ted_iterat_next |
3875 | .beg_cycle: |
3862 | .beg_cycle: |
3876 | @@: |
3863 | @@: |
3877 | cmp edx,ted_tex_1 |
3864 | cmp edx,ted_tex_1 |
3878 | jle @f |
3865 | jle @f |
3879 | cmp byte[edx],13 |
3866 | cmp byte[edx],13 |
3880 | je @f |
3867 | je @f |
3881 | cmp ebx,0 |
3868 | or ebx,ebx |
3882 | je @f |
3869 | jz @f |
3883 | ;-------------------------------------- |
3870 | ;-------------------------------------- |
3884 | xor eax,eax ;eax ¡ã¤¥â ¬¥ïâìáï |
3871 | xor eax,eax ;eax ¡ã¤¥â ¬¥ïâìáï |
3885 | mov al,byte[edx+1] |
3872 | mov al,byte[edx+1] |
3886 | cmp al,0 |
3873 | or al,al |
3887 | je .no_color |
3874 | jz .no_color |
3888 | cmp eax,ted_colors_text_count |
3875 | cmp eax,ted_colors_text_count |
3889 | jge .no_color |
3876 | jge .no_color |
Line 3896... | Line 3883... | ||
3896 | ;-------------------------------------- |
3883 | ;-------------------------------------- |
3897 | mov eax,edx |
3884 | mov eax,edx |
3898 | call ted_iterat_next |
3885 | call ted_iterat_next |
3899 | dec ebx |
3886 | dec ebx |
3900 | jmp @b |
3887 | jmp @b |
- | 3888 | align 4 |
|
3901 | @@: |
3889 | @@: |
3902 | mov edx,eax |
3890 | mov edx,eax |
3903 | pop eax |
3891 | pop eax |
3904 | .ret_f: |
3892 | .ret_f: |
3905 | call ted_get_symb_color |
3893 | call ted_get_symb_color |
3906 | pop ebx |
- | |
3907 | ret |
3894 | ret |
3908 | endp |
3895 | endp |
Line 3909... | Line 3896... | ||
3909 | 3896 | ||
3910 | ;input: |
3897 | ;input: |
Line 4036... | Line 4023... | ||
4036 | mov ebx,ted_el_focus |
4023 | mov ebx,ted_el_focus |
4037 | mov dword[ebx],edi ;áâ ¢¨¬ 䮪ãá |
4024 | mov dword[ebx],edi ;áâ ¢¨¬ 䮪ãá |
Line 4038... | Line 4025... | ||
4038 | 4025 | ||
4039 | push eax |
4026 | push eax |
4040 | shr eax,16 |
- | |
4041 | and eax,0xffff |
4027 | shr eax,16 |
4042 | sub eax,ted_wnd_l |
4028 | sub eax,ted_wnd_l |
Line 4043... | Line 4029... | ||
4043 | sub eax,ted_rec_l |
4029 | sub eax,ted_rec_l |
4044 | 4030 |