editbox font options support (sysfunc 4 format)

git-svn-id: svn://kolibrios.org@6675 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
pathoswithin 2016-11-05 04:15:05 +00:00
parent 695e658b9d
commit 038e72e9ee
2 changed files with 419 additions and 509 deletions

View File

@ -1,60 +1,61 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Basic macros for use EditBox ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ed_width equ [edi] ;è¨à¨­  ª®¬¯®­¥­â 
ed_left equ [edi+4] ;¯®«®¦¥­¨¥ ¯® ®á¨ å
ed_top equ [edi+8] ;¯®«®¦¥­¨¥ ¯® ®á¨ ã
ed_color equ [edi+12] ;梥â ä®­  ª®¬¯®­¥­â 
shift_color equ [edi+16] ;=0x6a9480 ¤«ï ¯à¨¬¥à  ¢®§ì¥¬ ¦¥«¥­ë© 梥⠡®ªá 
ed_focus_border_color equ [edi+20] ;梥â à ¬ª¨ ª®¬¯®­¥­â 
ed_blur_border_color equ [edi+24] ;梥⠭¥  ªâ¨¢­®£® ª®¬¯®­¥­â 
ed_text_color equ [edi+28] ;梥â ⥪áâ 
ed_max equ [edi+32] ;ª®«-¢® ᨬ¢®«®¢ ª®â®àë¥ ¬®¦­® ¬ ªá¨¬ «ì­® ¢¢¥áâ¨
ed_text equ [edi+36] ;㪠§ â¥«ì ­  ¡ãä¥à
ed_mouse_variable equ [edi+40] ; 㪠§ â¥«ì ­  ¯¥à¥¬¥­­ãî ¤«ï ¡®ªá /£à㯯ë
ed_flags equ [edi+44] ;ä« £¨
bp_flags equ [ebp+44] ;¢ ­¥ª®â®àëå ¯à®æ¥¤ãà å edi ¨á¯®«ì§ã¥âáï, ¢§ ¬¥­ 㪠§ â¥«ì åà ­¨âìáï ¢ ebp
ed_size equ [edi+48] ;ª®«-¢® ᨬ¢®«®¢
bp_size equ [ebp+48] ;ª®«-¢® ᨬ¢¯®«®¢, ¤«ï  ¤à¥á æ¨¨ ¨á¯«ì§ã¥âáï ebp¡ edi § ­ïâ
ed_pos equ [edi+52] ;¯®§¨æ¨ï ªãàá®à 
ed_offset equ [edi+56] ;ᬥ饭¨¥
cl_curs_x equ [edi+60] ;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® å
cl_curs_y equ [edi+64] ;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® ã
ed_shift_pos equ [edi+68] ;¯®«®¦¥­¨¥ ªãàá®à 
ed_shift_pos_old equ [edi+72] ;áâ à®¥ ¯®«®¦¥­¨¥ ªãàá®à 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; basic macros for EditBox ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ed_width equ [edi] ; field width
ed_left equ [edi+4] ; left border X
ed_top equ [edi+8] ; top border Y
ed_color equ [edi+12] ; field color
shift_color equ [edi+16] ; select color
ed_focus_border_color equ [edi+20] ; border color active
ed_blur_border_color equ [edi+24] ; border color inactive
ed_text_color equ [edi+28] ; color and font (as in sysfunc 4)
ed_max equ [edi+32] ; chars max
ed_text equ [edi+36] ; buffer pointer
ed_mouse_variable equ [edi+40] ; pointer
ed_flags equ [edi+44]
bp_flags equ [ebp+44]
ed_size equ [edi+48] ; chars currently
bp_size equ [ebp+48]
ed_pos equ [edi+52] ; carret current position
ed_offset equ [edi+56]
cl_curs_x equ [edi+60] ; previous cursor X
cl_curs_y equ [edi+64] ; previous cursor Y
ed_shift_pos equ [edi+68] ; selection current position
ed_shift_pos_old equ [edi+72] ; selection previous position
ed_height equ [edi+76]
ed_char_width equ [edi+80]
ed_struc_size=76
ed_struc_size = 84
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Bit mask from editbox
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ed_figure_only= 1000000000000000b ;®¤­¨ ᨬ¢®«ë
ed_always_focus= 100000000000000b
ed_focus= 10b ;䮪ãá ¯à¨«®¦¥­¨ï
ed_pass= 1b ;¯®«¥ á ¯ à®«¥¬
ed_shift_on= 1000b ;¥á«¨ ­¥ ãáâ ­®¢«¥­ -§­ ç¨â ¢¯¥à¢ë¥ ­ ¦ â shift,¥á«¨ ¡ë« ãáâ ­®¢«¥­, §­ ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift
ed_shift_on_off= not (ed_shift_on)
ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ­ ¦ â¨¨ ­  shift â.¥. ¥á«¨ ­ ¦¨¬ î
ed_shift_off= not (ed_shift)
ed_shift_bac= 10000b ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥­®£® shift â.¥. ¯à¨ ãáâ ­®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥­¨¥
ed_shift_bac_cl= not (ed_shift_bac)
ed_shift_cl= not (ed_shift or ed_shift_bac or ed_shift_on)
ed_shift_mcl= not (ed_shift)
ed_left_fl= 100000b
ed_right_fl= not (ed_left_fl)
ed_offset_fl= 1000000b
ed_offset_cl= not (ed_offset_fl)
ed_insert= 10000000b
ed_insert_cl= not (ed_insert)
ed_mouse_on = 100000000b
ed_mous_adn_b= 100011000b
ed_mouse_on_off= not (ed_mouse_on)
ed_ctrl_on = 1000000000b
ed_ctrl_off = not (ed_ctrl_on)
ed_alt_on = 10000000000b
ed_alt_off = not (ed_alt_on)
ed_disabled= 100000000000b
ed_height=14 ; ¢ëá®â 
;;;;;;;;;;;;;;;;;;;;;;;
;; flags for EditBox ;;
;;;;;;;;;;;;;;;;;;;;;;;
ed_pass = 1 ; password mode
ed_focus = 2 ; active
ed_shift = 4 ; shift holded
ed_shift_on = 8 ; selection active
ed_shift_bac = 16 ; clear selection
ed_left_fl = 32
ed_offset_fl = 64
ed_insert = 128
ed_mouse_on = 256
ed_ctrl_on = 512
ed_alt_on = 400h
ed_disabled = 800h
ed_always_focus = 4000h
ed_figure_only = 8000h
ed_mous_adn_b = ed_mouse_on or ed_shift_on or ed_shift_bac
ed_shift_off = not ed_shift
ed_shift_mcl = not ed_shift
ed_shift_on_off = not ed_shift_on
ed_shift_bac_cl = not ed_shift_bac
ed_shift_cl = not (ed_shift or ed_shift_on or ed_shift_bac)
ed_right_fl = not ed_left_fl
ed_offset_cl = not ed_offset_fl
ed_insert_cl = not ed_insert
ed_mouse_on_off = not ed_mouse_on
ed_ctrl_off = not ed_ctrl_on
ed_alt_off = not ed_alt_on
struc edit_box width,left,top,color,shift_color,focus_border_color,\
blur_border_color,text_color,max,text,mouse_variable,flags,size,pos
@ -70,14 +71,16 @@ struc edit_box width,left,top,color,shift_color,focus_border_color,\
.max dd max
.text dd text
.mouse_variable dd mouse_variable
.flags dd flags+0
.size dd size+0
.pos dd pos+0
.flags dd flags
.size dd size
.pos dd pos
.offset dd 0
.cl_curs_x dd 0
.cl_curs_y dd 0
.shift dd 0
.shift_old dd 0
.height dd 0
.char_width dd 0
}
macro edit_boxes_set_sys_color start,end,color_table

File diff suppressed because it is too large Load Diff