deleted file 'editbox_ex.mac' all programs
git-svn-id: svn://kolibrios.org@1373 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
64cdacca6e
commit
2aad33c4e5
@ -9,7 +9,7 @@ include '../proc32.inc'
|
||||
include '../macros.inc'
|
||||
include '../dll.inc'
|
||||
include '../libio.inc'
|
||||
include 'editbox_ex.mac'
|
||||
include '../../../../../programs/develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
|
||||
include '../network.inc'
|
||||
|
||||
|
@ -1,77 +0,0 @@
|
||||
ed_struc_size=72
|
||||
struc edit_box width,left,top,color,shift_color,focus_border_color,\
|
||||
blur_border_color,text_color,max,text,flags,size,pos
|
||||
{
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Bit mask from editbox
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
ed_figure_only= 1000000000000000b ;®¤¨ ᨬ¢®«ë
|
||||
ed_always_focus= 100000000000000b
|
||||
ed_focus= 10b ;䮪ãá ¯à¨«®¦¥¨ï
|
||||
ed_shift_on= 1000b ;¥á«¨ ¥ ãáâ ®¢«¥ -§ ç¨â ¢¯¥à¢ë¥ ¦ â shift,¥á«¨ ¡ë« ãáâ ®¢«¥, § ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift
|
||||
ed_shift_on_off=1111111111110111b
|
||||
ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ¦ ⨨ shift â.¥. ¥á«¨ ¦¨¬ î
|
||||
ed_shift_off= 1111111111111011b
|
||||
ed_shift_bac= 10000b ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥®£® shift â.¥. ¯à¨ ãáâ ®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥¨¥
|
||||
ed_shift_bac_cl=1111111111101111b ;®ç¨á⪠¯à¨ 㤠«¥¨¨ ¢ë¤¥«¥¨ï
|
||||
ed_shift_cl= 1111111111100011b
|
||||
ed_shift_mcl= 1111111111111011b
|
||||
ed_left_fl= 100000b
|
||||
ed_right_fl= 1111111111011111b
|
||||
ed_offset_fl= 1000000b
|
||||
ed_offset_cl= 1111111110111111b
|
||||
ed_insert= 10000000b
|
||||
ed_insert_cl= 1111111101111111b
|
||||
ed_mouse_on = 100000000b
|
||||
ed_mous_adn_b= 100011000b
|
||||
ed_mouse_on_off=1111111011111111b
|
||||
ed_height=14 ; ¢ëá®â
|
||||
|
||||
.width dd width
|
||||
.left dd left
|
||||
.top dd top
|
||||
.color dd color
|
||||
.shift_color dd shift_color
|
||||
.focus_border_color dd focus_border_color
|
||||
.blur_border_color dd blur_border_color
|
||||
.text_color dd text_color
|
||||
.max dd max
|
||||
.text dd text
|
||||
.flags dd flags+0
|
||||
.size dd size+0
|
||||
.pos dd pos+0
|
||||
.offset dd 0
|
||||
.cl_curs_x dd 0
|
||||
.cl_curs_y dd 0
|
||||
.shift dd 0
|
||||
.shift_old dd 0
|
||||
}
|
||||
struc check_box left,top,ch_text_margin,ch_size,color,border_color,text_color,text,ch_text_length,flags
|
||||
{ ;áâàãªâãà ¯ à ¬¥â஢ ¤«ï 祪 ¡®ªá
|
||||
ch_flag_en=10b
|
||||
.left: dw left ;+0 ;¯®«®¦¥¨¥ ¯® å
|
||||
.top: dw top ;¯®«®¦¥¨¥ ¯® ã
|
||||
.ch_text_margin: dd ch_text_margin ;à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨
|
||||
.ch_size: dd ch_size ;à §¬¥à ª¢ ¤à â 祪 ¡®ªá , ¤«ï ¯à¨¬¥à 12
|
||||
.color: dd color ;梥⠢ãâਠ祪¡®ªá
|
||||
.border_color: dd border_color ;梥â à ¬ª¨
|
||||
.text_color: dd text_color ;梥⠤¯¨á¨
|
||||
.text: dd text ; ¤à¥á ¢ ª®¤¥ ¯à®£à ¬¬ë £¤¥ à ᯮ«®¦¥ ⥪áâ
|
||||
.ch_text_length: dd ch_text_length ;¤«¨ áâப¨ á ᨬ¢®« ¬¨
|
||||
.flags: dd flags+0 ; ä« £¨
|
||||
}
|
||||
struc option_box point_gr,left,top,op_text_margin,op_size,color,border_color,text_color,text,op_text_length,flags
|
||||
{ ;áâàãªâãà ¯ à ¬¥â஢ ¤«ï 祪 ¡®ªá
|
||||
op_flag_en=10b
|
||||
.option_group: dd point_gr
|
||||
.left: dw left ;+0 ;¯®«®¦¥¨¥ ¯® å
|
||||
.top: dw top ;¯®«®¦¥¨¥ ¯® ã
|
||||
.ch_text_margin: dd op_text_margin ;à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨
|
||||
.ch_size: dd op_size ;à §¬¥à ª¢ ¤à â 祪 ¡®ªá , ¤«ï ¯à¨¬¥à 12
|
||||
.color: dd color ;梥⠢ãâਠ祪¡®ªá
|
||||
.border_color: dd border_color ;梥â à ¬ª¨
|
||||
.text_color: dd text_color ;梥⠤¯¨á¨
|
||||
.text: dd text ; ¤à¥á ¢ ª®¤¥ ¯à®£à ¬¬ë £¤¥ à ᯮ«®¦¥ ⥪áâ
|
||||
.ch_text_length: dd op_text_length ;¤«¨ áâப¨ á ᨬ¢®« ¬¨
|
||||
.flags: dd flags+0 ; ä« £¨
|
||||
}
|
@ -36,9 +36,9 @@ include '..\..\..\macros.inc'
|
||||
purge add,sub ; macros.inc does incorrect substitution
|
||||
include 'fasm.inc'
|
||||
|
||||
include '..\..\..\develop\libraries\box_lib\trunk\editbox.mac'
|
||||
include '..\..\..\develop\libraries\box_lib\trunk\checkbox.mac'
|
||||
;include '..\..\..\develop\libraries\box_lib\asm\trunk\editbox_ex.mac'
|
||||
include '..\..\..\develop\libraries\box_lib\trunk\box_lib.mac'
|
||||
;include '..\..\..\develop\libraries\box_lib\trunk\editbox.mac'
|
||||
;include '..\..\..\develop\libraries\box_lib\trunk\checkbox.mac'
|
||||
include '..\..\..\develop\libraries\box_lib\load_lib.mac'
|
||||
@use_library
|
||||
|
||||
|
@ -221,7 +221,7 @@ use32 ;
|
||||
dd 0x0 ; óêàçàòåëü íà ñòðîêó ñ ïàðàìåòðàìè.
|
||||
dd cur_dir_path
|
||||
include 'macros.inc'
|
||||
include 'editbox_ex.mac'
|
||||
include 'box_lib.mac'
|
||||
include 'load_lib.mac'
|
||||
@use_library ;use load lib macros
|
||||
start:
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,19 +1,19 @@
|
||||
;§ £®«®¢®ª ¯à¨«®¦¥¨ï
|
||||
use32 ; âà á«ïâ®à, ¨á¯®«ì§ãî騩 32 à §àï¤ëå ª®¬ ¤ë
|
||||
org 0x0 ; ¡ §®¢ë© ¤à¥á ª®¤ , ¢á¥£¤ 0x0
|
||||
db 'MENUET01' ; ¨¤¥â¨ä¨ª â®à ¨á¯®«ï¥¬®£® ä ©« (8 ¡ ©â)
|
||||
dd 0x1 ; ¢¥àá¨ï ä®à¬ â § £®«®¢ª ¨á¯®«ï¥¬®£® ä ©«
|
||||
dd start ; ¤à¥á, ª®â®àë© á¨á⥬ ¯¥à¥¤ ñâ ã¯à ¢«¥¨¥
|
||||
; ¯®á«¥ § £à㧪¨ ¯à¨«®¦¥¨ï ¢ ¯ ¬ïâì
|
||||
dd i_end ; à §¬¥à ¯à¨«®¦¥¨ï
|
||||
dd mem ; Ž¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪ ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢¨¬ £à¨æã 4 ¡ ©â
|
||||
dd mem ; à ᯮ«®¦¨¬ ¯®§¨æ¨î á⥪ ¢ ®¡« á⨠¯ ¬ïâ¨, áà §ã § ⥫®¬ ¯à®£à ¬¬ë. ‚¥àè¨ á⥪ ¢ ¤¨ ¯ §®¥ ¯ ¬ïâ¨, 㪠§ ®¬ ¢ëè¥
|
||||
dd 0x0 ; 㪠§ ⥫ì áâபã á ¯ à ¬¥âà ¬¨.
|
||||
use32 ; âà á«ïâ®à, ¨á¯®«ì§ãî騩 32 à §àï¤ëå ª®¬ ¤ë
|
||||
org 0x0 ; ¡ §®¢ë© ¤à¥á ª®¤ , ¢á¥£¤ 0x0
|
||||
db 'MENUET01' ; ¨¤¥â¨ä¨ª â®à ¨á¯®«ï¥¬®£® ä ©« (8 ¡ ©â)
|
||||
dd 0x1 ; ¢¥àá¨ï ä®à¬ â § £®«®¢ª ¨á¯®«ï¥¬®£® ä ©«
|
||||
dd start ; ¤à¥á, ª®â®àë© á¨á⥬ ¯¥à¥¤ ñâ ã¯à ¢«¥¨¥
|
||||
; ¯®á«¥ § £à㧪¨ ¯à¨«®¦¥¨ï ¢ ¯ ¬ïâì
|
||||
dd i_end ; à §¬¥à ¯à¨«®¦¥¨ï
|
||||
dd mem ; Ž¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪ ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢¨¬ £à¨æã 4 ¡ ©â
|
||||
dd mem ; à ᯮ«®¦¨¬ ¯®§¨æ¨î á⥪ ¢ ®¡« á⨠¯ ¬ïâ¨, áà §ã § ⥫®¬ ¯à®£à ¬¬ë. ‚¥àè¨ á⥪ ¢ ¤¨ ¯ §®¥ ¯ ¬ïâ¨, 㪠§ ®¬ ¢ëè¥
|
||||
dd 0x0 ; 㪠§ ⥫ì áâபã á ¯ à ¬¥âà ¬¨.
|
||||
dd cur_dir_path
|
||||
|
||||
|
||||
include '../../../../../macros.inc'
|
||||
include 'editbox_ex.mac'
|
||||
include '../../trunk/box_lib.mac'
|
||||
include '../../load_lib.mac'
|
||||
@use_library ;use load lib macros
|
||||
start:
|
||||
@ -21,129 +21,129 @@ start:
|
||||
sys_load_library library_name, cur_dir_path, library_path, system_path, \
|
||||
err_message_found_lib, head_f_l, myimport, err_message_import, head_f_i
|
||||
;if return code =-1 then exit, else nornary work
|
||||
cmp eax,-1
|
||||
jz exit
|
||||
mcall 40,0x27 ;ãáâ ®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
|
||||
cmp eax,-1
|
||||
jz exit
|
||||
mcall 40,0x27 ;ãáâ ®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
|
||||
red_win:
|
||||
call draw_window ;¯¥à¢® ç «ì® ¥®¡å®¤¨¬® à¨á®¢ âì ®ª®
|
||||
call draw_window ;¯¥à¢® ç «ì® ¥®¡å®¤¨¬® à¨á®¢ âì ®ª®
|
||||
align 4
|
||||
still: ;®á®¢®© ®¡à ¡®â稪
|
||||
mcall 10 ;Ž¦¨¤ âì ᮡëâ¨ï
|
||||
dec eax
|
||||
jz red_win
|
||||
dec eax
|
||||
jz key
|
||||
dec eax
|
||||
jz button
|
||||
still: ;®á®¢®© ®¡à ¡®â稪
|
||||
mcall 10 ;Ž¦¨¤ âì ᮡëâ¨ï
|
||||
dec eax
|
||||
jz red_win
|
||||
dec eax
|
||||
jz key
|
||||
dec eax
|
||||
jz button
|
||||
|
||||
push dword edit1
|
||||
call [edit_box_mouse]
|
||||
push dword edit1
|
||||
call [edit_box_mouse]
|
||||
|
||||
push dword edit2
|
||||
call [edit_box_mouse]
|
||||
push dword edit2
|
||||
call [edit_box_mouse]
|
||||
|
||||
push dword check1
|
||||
call [check_box_mouse]
|
||||
push dword check1
|
||||
call [check_box_mouse]
|
||||
|
||||
push dword check2
|
||||
call [check_box_mouse]
|
||||
push dword check2
|
||||
call [check_box_mouse]
|
||||
|
||||
push dword Option_boxs
|
||||
call [option_box_mouse]
|
||||
push dword Option_boxs
|
||||
call [option_box_mouse]
|
||||
|
||||
push dword Option_boxs2
|
||||
call [option_box_mouse]
|
||||
push dword Option_boxs2
|
||||
call [option_box_mouse]
|
||||
|
||||
jmp still ;¥á«¨ ¨ç¥£® ¨§ ¯¥à¥ç¨á«¥®£® ⮠ᮢ ¢ 横«
|
||||
jmp still ;¥á«¨ ¨ç¥£® ¨§ ¯¥à¥ç¨á«¥®£® ⮠ᮢ ¢ 横«
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
button:
|
||||
mcall 17 ;¯®«ãç¨âì ¨¤¥â¨ä¨ª â®à ¦ ⮩ ª« ¢¨è¨
|
||||
test ah,ah ;¥á«¨ ¢ ah 0, â® ¯¥à¥©â¨ ®¡à ¡®â稪 ᮡë⨩ still
|
||||
jz still
|
||||
exit: mcall -1
|
||||
mcall 17 ;¯®«ãç¨âì ¨¤¥â¨ä¨ª â®à ¦ ⮩ ª« ¢¨è¨
|
||||
test ah,ah ;¥á«¨ ¢ ah 0, â® ¯¥à¥©â¨ ®¡à ¡®â稪 ᮡë⨩ still
|
||||
jz still
|
||||
exit: mcall -1
|
||||
key:
|
||||
mcall 2 ;§ £à㧨¬ § 票¥ 2 ¢ ॣ¨áâ®à eax ¨ ¯®«ã稬 ª®¤ ¦ ⮩ ª« ¢¨è¨
|
||||
mcall 2 ;§ £à㧨¬ § 票¥ 2 ¢ ॣ¨áâ®à eax ¨ ¯®«ã稬 ª®¤ ¦ ⮩ ª« ¢¨è¨
|
||||
|
||||
push dword edit1
|
||||
call [edit_box_key]
|
||||
push dword edit1
|
||||
call [edit_box_key]
|
||||
|
||||
push dword edit2
|
||||
call [edit_box_key]
|
||||
push dword edit2
|
||||
call [edit_box_key]
|
||||
|
||||
jmp still
|
||||
jmp still
|
||||
|
||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
align 4
|
||||
draw_window: ;à¨á®¢ ¨¥ ®ª ¯à¨«®¦¥¨ï
|
||||
mcall 12,1
|
||||
mcall 0,(50*65536+390),(30*65536+200),0x33AABBCC,0x805080DD,hed
|
||||
draw_window: ;à¨á®¢ ¨¥ ®ª ¯à¨«®¦¥¨ï
|
||||
mcall 12,1
|
||||
mcall 0,(50*65536+390),(30*65536+200),0x33AABBCC,0x805080DD,hed
|
||||
|
||||
push dword edit1
|
||||
call [edit_box_draw]
|
||||
push dword edit1
|
||||
call [edit_box_draw]
|
||||
|
||||
push dword edit2
|
||||
call [edit_box_draw]
|
||||
push dword edit2
|
||||
call [edit_box_draw]
|
||||
|
||||
push dword check1
|
||||
call [check_box_draw]
|
||||
push dword check1
|
||||
call [check_box_draw]
|
||||
|
||||
push dword check2
|
||||
call [check_box_draw]
|
||||
push dword check2
|
||||
call [check_box_draw]
|
||||
|
||||
push dword Option_boxs
|
||||
call [option_box_draw]
|
||||
push dword Option_boxs
|
||||
call [option_box_draw]
|
||||
|
||||
push dword Option_boxs2
|
||||
call [option_box_draw]
|
||||
push dword Option_boxs2
|
||||
call [option_box_draw]
|
||||
|
||||
mcall 12,2
|
||||
mcall 12,2
|
||||
ret
|
||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
;DATA ¤ ë¥
|
||||
;‚ᥣ¤ ᮡ«î¤ âì ¯®á«¥¤®¢ ⥫ì®áâì ¢ ¨¬¥¨.
|
||||
system_path db '/sys/lib/'
|
||||
library_name db 'box_lib.obj',0
|
||||
system_path db '/sys/lib/'
|
||||
library_name db 'box_lib.obj',0
|
||||
; …᫨ ¥áâì ¦¥« ¨¥ à §ê¥¤¨¨âì, ⮠㦮 ¨á¯®«ì§®¢ âì á«¥¤ãîé¨î ª®áâàãªæ¨î
|
||||
;system_path db '/sys/lib/box_lib.obj',0
|
||||
;... «î¡ ï ¯®á«¥¤®¢ ⥫ì®áâì ¤àã£¨å ª®¬ ¤ ¨ ®¯à¥¤¥«¥¨©.
|
||||
;library_name db 'box_lib.obj',0
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0
|
||||
err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
err_message_import db 'Error on load import library box_lib.obj',0
|
||||
head_f_l db 'System error',0
|
||||
err_message_import db 'Error on load import library box_lib.obj',0
|
||||
|
||||
myimport:
|
||||
|
||||
edit_box_draw dd aEdit_box_draw
|
||||
edit_box_key dd aEdit_box_key
|
||||
edit_box_mouse dd aEdit_box_mouse
|
||||
version_ed dd aVersion_ed
|
||||
edit_box_draw dd aEdit_box_draw
|
||||
edit_box_key dd aEdit_box_key
|
||||
edit_box_mouse dd aEdit_box_mouse
|
||||
version_ed dd aVersion_ed
|
||||
|
||||
check_box_draw dd aCheck_box_draw
|
||||
check_box_mouse dd aCheck_box_mouse
|
||||
version_ch dd aVersion_ch
|
||||
check_box_draw dd aCheck_box_draw
|
||||
check_box_mouse dd aCheck_box_mouse
|
||||
version_ch dd aVersion_ch
|
||||
|
||||
option_box_draw dd aOption_box_draw
|
||||
option_box_mouse dd aOption_box_mouse
|
||||
version_op dd aVersion_op
|
||||
option_box_draw dd aOption_box_draw
|
||||
option_box_mouse dd aOption_box_mouse
|
||||
version_op dd aVersion_op
|
||||
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
aEdit_box_mouse db 'edit_box_mouse',0
|
||||
aVersion_ed db 'version_ed',0
|
||||
aVersion_ed db 'version_ed',0
|
||||
|
||||
aCheck_box_draw db 'check_box_draw',0
|
||||
aCheck_box_mouse db 'check_box_mouse',0
|
||||
aVersion_ch db 'version_ch',0
|
||||
aVersion_ch db 'version_ch',0
|
||||
|
||||
aOption_box_draw db 'option_box_draw',0
|
||||
aOption_box_mouse db 'option_box_mouse',0
|
||||
aVersion_op db 'version_op',0
|
||||
aVersion_op db 'version_op',0
|
||||
|
||||
|
||||
|
||||
@ -161,30 +161,30 @@ op11 option_box option_group2,120,90,6,12,0xffffff,0,0,op_text.1,op_text.e1-op_t
|
||||
op12 option_box option_group2,120,105,6,12,0xffffff,0,0,op_text.2,op_text.e2-op_text.2
|
||||
op13 option_box option_group2,120,120,6,12,0xffffff,0,0,op_text.3,op_text.e3-op_text.3
|
||||
|
||||
option_group1 dd op1 ;㪠§ ⥫¨, ®¨ ®â®¡à ¦ îâáï ¯® 㬮«ç ¨î, ª®£¤ ¢ë¢®¤¨âáï
|
||||
option_group2 dd op12 ;¯à¨«®¦¥¨¥
|
||||
Option_boxs dd op1,op2,op3,0
|
||||
Option_boxs2 dd op11,op12,op13,0
|
||||
hed db 'BOXs load from lib <Lrz> date 27.04.2009',0
|
||||
option_group1 dd op1 ;㪠§ ⥫¨, ®¨ ®â®¡à ¦ îâáï ¯® 㬮«ç ¨î, ª®£¤ ¢ë¢®¤¨âáï
|
||||
option_group2 dd op12 ;¯à¨«®¦¥¨¥
|
||||
Option_boxs dd op1,op2,op3,0
|
||||
Option_boxs2 dd op11,op12,op13,0
|
||||
hed db 'BOXs load from lib <Lrz> date 27.04.2009',0
|
||||
hed_end:
|
||||
rb 256
|
||||
check_text db 'First checkbox'
|
||||
check_text2 db 'Second checkbox'
|
||||
op_text: ; ‘®¯à®¢®¦¤ î騩 ⥪áâ ¤«ï 祪 ¡®ªá®¢
|
||||
op_text: ; ‘®¯à®¢®¦¤ î騩 ⥪áâ ¤«ï 祪 ¡®ªá®¢
|
||||
.1 db 'Option_Box #1'
|
||||
.e1:
|
||||
.2 db 'Option_Box #2'
|
||||
.e2:
|
||||
.3 db 'Option_Box #3'
|
||||
.e3:
|
||||
ed_buffer rb 100
|
||||
ed_buffer rb 100
|
||||
;-----------------------
|
||||
;sc system_colors
|
||||
|
||||
mouse_dd rd 1
|
||||
p_info process_information
|
||||
cur_dir_path rb 4096
|
||||
library_path rb 4096
|
||||
p_info process_information
|
||||
cur_dir_path rb 4096
|
||||
library_path rb 4096
|
||||
i_end:
|
||||
rb 1024
|
||||
mem:
|
@ -1,21 +0,0 @@
|
||||
include '../../trunk/editbox.mac'
|
||||
include '../../trunk/checkbox.mac'
|
||||
include '../../trunk/optionbox.mac'
|
||||
|
||||
macro get_sys_colors col_buf
|
||||
{
|
||||
;mov eax,48
|
||||
push 48
|
||||
pop eax
|
||||
;mov ebx,3
|
||||
push 3
|
||||
pop ebx
|
||||
;mov ecx,col_buf
|
||||
push col_buf
|
||||
pop ecx
|
||||
;mov edx,40
|
||||
push 40
|
||||
pop edx
|
||||
mcall
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
;Checkbox
|
||||
|
||||
ch_struc_size=36
|
||||
ch_flag_en=10b
|
||||
ch_flag_en=10b ;ýëåìåíò âûáðàí
|
||||
|
||||
ch_left equ [edi] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® å
|
||||
ch_top equ [edi+2] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® ã
|
||||
@ -18,38 +18,28 @@ ch_flags equ [edi+32] ;䫠
|
||||
|
||||
macro check_boxes_set_sys_color start,end,color_table
|
||||
{
|
||||
ch_left equ [edi] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® å
|
||||
ch_top equ [edi+2] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® ã
|
||||
ch_text_margin equ [edi+4] ;=4 à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨
|
||||
ch_size equ [edi+8] ;12 à §¬¥à ª¢ ¤à â 祪 ¡®ªá
|
||||
ch_color equ [edi+12] ;梥⠢ãâਠcheckbox
|
||||
ch_border_color equ [edi+16] ; or [edi+4] ;梥â à ¬ª¨ checkbox ¥¥ ¬®¦® § ¤ âì á ¬®áâ®ï⥫ì®
|
||||
ch_text_color equ [edi+20];[edi+4] ;梥â ⥪áâ
|
||||
ch_text_ptr equ [edi+24] ;㪠§ ⥫ì ç «® ⥪á⮢®© áâப¨
|
||||
ch_text_length equ [edi+28]
|
||||
ch_flags equ [edi+32] ;ä« £¨
|
||||
|
||||
mov edi,start
|
||||
mov ecx,((end-start)/ch_struc_size)
|
||||
mov esi,color_table
|
||||
mov edi,start
|
||||
mov ecx,((end-start)/ch_struc_size)
|
||||
mov esi,color_table
|
||||
@@:
|
||||
push dword [esi+32]
|
||||
pop dword ch_text_color
|
||||
push dword [esi+36]
|
||||
pop dword ch_border_color
|
||||
add edi,ch_struc_size
|
||||
loop @b
|
||||
; push dword [esi+20] ;梥â à ¡®ç¥© ®¡« á⨠®ª
|
||||
; pop dword ch_color
|
||||
push dword [esi+32] ;梥â ⥪áâ ¢ à ¡®ç¥© ®¡« á⨠®ª
|
||||
pop dword ch_text_color
|
||||
push dword [esi+36] ;梥⠣à 䨪¨ ¢ ®ª¥ (à §¤¥«¨â¥«ìë¥ «¨¨¨ ¨ â.¯.)
|
||||
pop dword ch_border_color
|
||||
add edi,ch_struc_size
|
||||
loop @b
|
||||
}
|
||||
struc check_box left,top,ch_text_margin,ch_size,color,border_color,text_color,text,ch_text_length,flags
|
||||
{ ;áâàãªâãà ¯ à ¬¥â஢ ¤«ï 祪 ¡®ªá
|
||||
ch_flag_en=10b
|
||||
.left: dw left ;+0 ;¯®«®¦¥¨¥ ¯® å
|
||||
.top: dw top ;¯®«®¦¥¨¥ ¯® ã
|
||||
.left: dw left ;+0 ¯®«®¦¥¨¥ ¯® å
|
||||
.top: dw top ;+2 ¯®«®¦¥¨¥ ¯® ã
|
||||
.ch_text_margin: dd ch_text_margin ;à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨
|
||||
.ch_size: dd ch_size ;à §¬¥à ª¢ ¤à â 祪 ¡®ªá , ¤«ï ¯à¨¬¥à 12
|
||||
.color: dd color ;梥⠢ãâਠ祪¡®ªá
|
||||
.color: dd color ;梥⠢ãâਠ祪¡®ªá
|
||||
.border_color: dd border_color ;梥â à ¬ª¨
|
||||
.text_color: dd text_color ;梥⠤¯¨á¨
|
||||
.text_color: dd text_color ;梥⠤¯¨á¨
|
||||
.text: dd text ; ¤à¥á ¢ ª®¤¥ ¯à®£à ¬¬ë £¤¥ à ᯮ«®¦¥ ⥪áâ
|
||||
.ch_text_length: dd ch_text_length ;¤«¨ áâப¨ á ᨬ¢®« ¬¨
|
||||
.flags: dd flags+0 ; ä« £¨
|
||||
|
71
programs/develop/libraries/box_lib/trunk/doc/box_lib.htm
Normal file
71
programs/develop/libraries/box_lib/trunk/doc/box_lib.htm
Normal file
@ -0,0 +1,71 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>áèáëèîòåêà boxlib</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=WINDOWS-1251">
|
||||
<style>
|
||||
body
|
||||
{
|
||||
font-size: 15px;
|
||||
font-family: "Bookman Old Style";
|
||||
color: black;
|
||||
text-align: justify;
|
||||
}
|
||||
h1 { color: green; font-size: 23px; }
|
||||
h2 { color: green; font-size: 21px; }
|
||||
h3 { color: green; font-size: 19px; }
|
||||
h4 { color: #803f00; font-size: 17px; }
|
||||
i { color: #0099cc; }
|
||||
b { color: #0099cc; }
|
||||
p {
|
||||
text-indent: 1em;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 2px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
ol, ul, dl{
|
||||
margin-top: 3px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
pre
|
||||
{
|
||||
padding: 2px;
|
||||
padding-left: 20px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
font-family: "Courier New";
|
||||
font-size: 15px;
|
||||
color: #004000;
|
||||
background-color: #ffd0ff;
|
||||
}
|
||||
table { font-size: 15px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Îãëàâëåíèå</h1>
|
||||
<p><a href="#vveden">Ââåäåíèå</a></p>
|
||||
<p><a href="#elements">Ýëåìåíòû áèáëèîòåêè</a></p>
|
||||
|
||||
<h1><a name="vveden">Ââåäåíèå</a></h1>
|
||||
<p>Áèáëèîòåêà <b>box_lib.obj</b> ñîäåðæèò ðàçíûå ýëåìåíòû óïðàâëåíèÿ, êîòîðûå ìîæíî
|
||||
èñïîëüçîâàòü ïðè íàïèñàíèè ïðèëîæåíèé. Ôàéë <b>box_lib.mac</b> ïîäêëþ÷àåò ìàêðîñû
|
||||
äëÿ êîìïèëÿöèè áèáëèîòåêè è äëÿ èñïîëüçîâàíèÿ ýëåìåíòîâ.</p>
|
||||
|
||||
<h1><a name="elements">Ýëåìåíòû áèáëèîòåêè</a></h1>
|
||||
<ul>
|
||||
<li><a href="editbox\info_editbox.htm">editbox</a></li>
|
||||
<li>checkbox</li>
|
||||
<li>optionbox</li>
|
||||
<li>scrollbar</li>
|
||||
<li>d_button</li>
|
||||
<li>menubar</li>
|
||||
<li>filebrowser</li>
|
||||
<li><a href="tree_list\info_treelist.htm">tree_list</a></li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<p>Äîêóìåíòàöèÿ îáíîâëÿëàñü ïîñëåäíèé ðàç 09.01.10.</p>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,109 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>ýëåìåíò Edit Box</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=WINDOWS-1251">
|
||||
<style>
|
||||
body
|
||||
{
|
||||
font-size: 15px;
|
||||
font-family: "Bookman Old Style";
|
||||
color: black;
|
||||
text-align: justify;
|
||||
}
|
||||
h1 { color: green; font-size: 23px; }
|
||||
h2 { color: green; font-size: 21px; }
|
||||
h3 { color: green; font-size: 19px; }
|
||||
h4 { color: #803f00; font-size: 17px; }
|
||||
i { color: #0099cc; }
|
||||
b { color: #0099cc; }
|
||||
p {
|
||||
text-indent: 1em;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 2px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
ol, ul, dl{
|
||||
margin-top: 3px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
pre
|
||||
{
|
||||
padding: 2px;
|
||||
padding-left: 20px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
font-family: "Courier New";
|
||||
font-size: 15px;
|
||||
color: #004000;
|
||||
background-color: #ffd0ff;
|
||||
}
|
||||
table { font-size: 15px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Îãëàâëåíèå</h1>
|
||||
<p><a href="#vveden">Ââåäåíèå</a></p>
|
||||
<p><a href="#funct">Ôóíêöèè</a></p>
|
||||
<ul>
|
||||
<li><a href="#fun_key">edit_box_key</a></li>
|
||||
<li><a href="#fun_mouse">edit_box_mouse</a></li>
|
||||
<li><a href="#version">version_ed</a></li>
|
||||
</ul>
|
||||
<p><a href="#struc_editbox">Ñòðóêòóðà editbox</a></p>
|
||||
<p><a href="#editbox_styles">Ñòèëè ýëåìåíòà</a></p>
|
||||
|
||||
<h1><a name="vveden">Ââåäåíèå</a></h1>
|
||||
<p>Òåêñòîâîå ïîëå, èñïîëüçóåòñÿ ïðè ââîäå òåêñòîâîé/÷èñëîâîé èíôîðìàöèè.</p>
|
||||
|
||||
<h1><a name="funct">Ôóíêöèè</a></h1>
|
||||
|
||||
<h2><a name="fun_key">edit_box_key</a></h2>
|
||||
<p>Ýòà ôóíêöèÿ äîëæíà âûçûâàòñÿ ïðè ââîäå èíôîðìàöèè ñ êëàâèàòóðû.</p>
|
||||
|
||||
<h2><a name="fun_mouse">edit_box_mouse</a></h2>
|
||||
<p>Ýòà ôóíêöèÿ äîëæíà âûçûâàòñÿ ïðè ââîäå èíôîðìàöèè ñ ìûøè.</p>
|
||||
|
||||
<h2><a name="version">version_ed</a></h2>
|
||||
<p>Âåðñèÿ ýëåìåíòà</p>
|
||||
|
||||
<h1><a name="struc_editbox">Ñòðóêòóðà editbox</a></h1>
|
||||
<pre>struc edit_box width,left,top,color,shift_color,focus_border_color,\
|
||||
blur_border_color,text_color,max,text,mouse_variable,flags,size,pos
|
||||
{
|
||||
.width dd width
|
||||
.left dd left
|
||||
.top dd top
|
||||
.color dd color
|
||||
.shift_color dd shift_color
|
||||
.focus_border_color dd focus_border_color
|
||||
.blur_border_color dd blur_border_color
|
||||
.text_color dd text_color
|
||||
.max dd max
|
||||
.text dd text
|
||||
.mouse_variable dd mouse_variable
|
||||
.flags dd flags+0
|
||||
.size dd size+0
|
||||
.pos dd pos+0
|
||||
.offset dd 0
|
||||
.cl_curs_x dd 0
|
||||
.cl_curs_y dd 0
|
||||
.shift dd 0
|
||||
.shift_old dd 0
|
||||
}</pre>
|
||||
<p><b>width</b> - øèðèíà ýëåìåíòà.</p>
|
||||
<p><b>left</b> - îòñòóï ñëåâà.</p>
|
||||
|
||||
<h1><a name="editbox_styles">Ñòèëè ýëåìåíòà</a></h1>
|
||||
|
||||
<h2>ed_figure_only</h2>
|
||||
<p>Ðàçðåøàåòñÿ ââîä ÷èñåë îò 0 äî 9.</p>
|
||||
<h2>ed_focus</h2>
|
||||
<p>Òåêñòîâîå ïîëå â ôîêóñå.</p>
|
||||
|
||||
<hr>
|
||||
<p>Äîêóìåíòàöèÿ îáíîâëÿëàñü ïîñëåäíèé ðàç 09.01.10.</p>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
Before Width: | Height: | Size: 9.5 KiB |
@ -1,271 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>элемент Tree List</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=WINDOWS-1251">
|
||||
<style>
|
||||
body
|
||||
{
|
||||
font-size: 15px;
|
||||
font-family: "Bookman Old Style";
|
||||
color: black;
|
||||
text-align: justify;
|
||||
}
|
||||
h1 { color: green; font-size: 23px; }
|
||||
h2 { color: green; font-size: 21px; }
|
||||
h3 { color: green; font-size: 19px; }
|
||||
h4 { color: #803f00; font-size: 17px; }
|
||||
i { color: #0099cc; }
|
||||
b { color: #0099cc; }
|
||||
p {
|
||||
text-indent: 1em;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 2px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
ol, ul, dl{
|
||||
margin-top: 3px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
pre
|
||||
{
|
||||
padding: 2px;
|
||||
padding-left: 20px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
font-family: "Courier New";
|
||||
font-size: 15px;
|
||||
color: #004000;
|
||||
background-color: #ffd0ff;
|
||||
}
|
||||
table { font-size: 15px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Оглавление</h1>
|
||||
<p><a href="#vveden">Введение</a></p>
|
||||
<p><a href="#funct">Функции</a></p>
|
||||
<ul>
|
||||
<li><a href="#fun_init">tl_data_init</a></li>
|
||||
<li><a href="#fun_clear1">tl_data_clear</a></li>
|
||||
<li><a href="#fun_clear2">tl_info_clear</a></li>
|
||||
<li><a href="#fun_key">tl_key</a></li>
|
||||
<li><a href="#fun_mouse">tl_mouse</a></li>
|
||||
<li><a href="#fun_draw">tl_draw</a></li>
|
||||
<li><a href="#fun_undo">tl_info_undo</a></li>
|
||||
<li><a href="#fun_redo">tl_info_redo</a></li>
|
||||
<li><a href="#fun_add">tl_node_add</a></li>
|
||||
<li><a href="#fun_set_d">tl_node_set_data</a></li>
|
||||
<li><a href="#fun_get_d">tl_node_get_data</a></li>
|
||||
<li><a href="#fun_delete">tl_node_delete</a></li>
|
||||
<li>tl_cur_beg</li>
|
||||
<li>tl_cur_next</li>
|
||||
<li>tl_cur_perv</li>
|
||||
<li>tl_node_close_open</li>
|
||||
<li>tl_node_lev_inc</li>
|
||||
<li>tl_node_lev_dec</li>
|
||||
<li>tl_node_move_up</li>
|
||||
<li>tl_node_move_down</li>
|
||||
<li>tl_node_poi_get_info</li>
|
||||
<li>tl_node_poi_get_next_info</li>
|
||||
<li>tl_node_poi_get_data</li>
|
||||
<li><a href="#fun_sme">tl_save_mem</a></li>
|
||||
<li><a href="#fun_lme">tl_load_mem</a></li>
|
||||
<li><a href="#fun_gme">tl_get_mem_size</a></li>
|
||||
<li><a href="#version">version_tree_list</a></li>
|
||||
</ul>
|
||||
<p><a href="#struc_tree_list">Структура tree_list</a></p>
|
||||
<p><a href="#tree_list_styles">Стили элемента</a></p>
|
||||
|
||||
<h1><a name="vveden">Введение</a></h1>
|
||||
<p>Внешний вид элемента управления TreeList:</p>
|
||||
<p><img src="window_tree_list.png"></p>
|
||||
<p>Рис. 1. Окно программы с элементом TreeList</p>
|
||||
|
||||
<h1><a name="funct">Функции</a></h1>
|
||||
|
||||
<h2><a name="fun_init">tl_data_init</a></h2>
|
||||
<p>Конструктор элемента, нужно вызывать перед использованием элемента для выделения памяти и других настроек.</p>
|
||||
<h2><a name="fun_clear1">tl_data_clear</a></h2>
|
||||
<p>Деструктор элемента, чистит память по указателям: <b>data_info</b>, <b>data_nodes</b>, <b>data_img</b> и <b>data_img_sys</b>. Если в программе используется <i>несколько элементов с одинаковыми иконками</i>, то указатели data_img и data_img_sys нужно приравнять к 0 в других элементах, так что-бы при вызове деструкторов не было повторного удаления одних и тех же иконок.</p>
|
||||
|
||||
<h2><a name="fun_clear2">tl_info_clear</a></h2>
|
||||
<p>Очистка списка от всех узлов. Это действие нельзя отменить функцией <b>tl_info_undo</b>.</p>
|
||||
|
||||
<h2><a name="fun_key">tl_key</a></h2>
|
||||
<p>Функция которую нужно вызывать при нажатии на клавиатуру.
|
||||
Кнопки, которые не доступны если есть стиль <i>tl_key_no_edit</i>: [<b>Enter</b>], [<b>Delete</b>], [<b>←</b>], [<b>→</b>].
|
||||
Всегда доступны: [<b>↑</b>], [<b>↓</b>], [<b>Page Up</b>], [<b>Page Dn</b>], [<b>Space</b>].
|
||||
Функция проверяет включен ли режим scan кодов, и в случае необходимости сама преобразует коды.</p>
|
||||
|
||||
<h2><a name="fun_mouse">tl_mouse</a></h2>
|
||||
<p>Функция для событий от мыши.</p>
|
||||
|
||||
<h2><a name="fun_draw">tl_draw</a></h2>
|
||||
<p>Полная перерисовка окна элемента.</p>
|
||||
|
||||
<h2><a name="fun_undo">tl_info_undo</a></h2>
|
||||
<p>Отменяет добавление узлов. Действует только на весь узел целиком, не учитывая изменения внутри узлов. Т. е. нельзя отменить действия выполненные например функциями: <b>tl_node_set_data</b>, <b>tl_node_lev_inc</b> и им подобным.</p>
|
||||
|
||||
<h2><a name="fun_redo">tl_info_redo</a></h2>
|
||||
<p>Повтор отмененных действий. Обратная функция по отношению к <b>tl_info_undo</b>.</p>
|
||||
|
||||
<h2><a name="fun_add">tl_node_add</a></h2>
|
||||
<p>Добавляет узел, в позицию указанную курсором. Пример добавления узла:</p>
|
||||
<pre> push dword tree1
|
||||
push dword 0x10002
|
||||
push dword data_buffer
|
||||
call dword[tl_node_add]</pre>
|
||||
<p>где: <b>tree1</b> - структура tree_list;
|
||||
<b>0x10002</b> - параметры узла (старшие байты 0x0001 - индекс иконки, отображаемой возле узла; меньший байт 0x02 - уровень вложености узла); <b>data_buffer</b> - указатель на дынные, добавляемые в узел.</p>
|
||||
|
||||
<h2><a name="fun_set_d">tl_node_set_data</a></h2>
|
||||
<p>Устанавливает новые данные (пользовательские и подпись) в узел под курсором.</p>
|
||||
|
||||
<h2><a name="fun_get_d">tl_node_get_data</a></h2>
|
||||
<p>Берет указатель на данные (пользовательские и подпись) из узла под курсором.</p>
|
||||
|
||||
<h2><a name="fun_delete">tl_node_delete</a></h2>
|
||||
<p>Удаляет узел, но не окончательно, при необходимости узел можно вернуть функцией <b>tl_info_undo</b>.</p>
|
||||
|
||||
<h2>tl_cur_beg</h2>
|
||||
<p>Ставит курсор в начало списка, перематывает скроллинг если нужно.</p>
|
||||
<h2>tl_cur_next</h2>
|
||||
<p>Переносит курсор ниже.</p>
|
||||
<h2>tl_cur_perv</h2>
|
||||
<p>Переносит курсор выше.</p>
|
||||
<h2>tl_node_close_open</h2>
|
||||
<p>Открывает или закрывает родительский узел. Если у узла нет дочерних элементов,
|
||||
то ничего не делает. Автоматически перерисовывает окно если состояние узла изменилось.</p>
|
||||
<h2>tl_node_lev_inc</h2>
|
||||
<p>Добавить уровень узла под курсором. Делает узел дочерним.</p>
|
||||
<h2>tl_node_lev_dec</h2>
|
||||
<p>Уменьшает уровень узла под курсором. Делает узел родительским.</p>
|
||||
|
||||
<h2>tl_node_move_up</h2>
|
||||
<p>Перемещает вверх узел под курсором. Вместе с узлом двигается также и курсор. Пример использования функции:</p>
|
||||
<pre> push dword tree1
|
||||
call dword[tl_node_move_up] ;переместить узел</pre>
|
||||
<p>где: <b>tree1</b> - структура tree_list</p>
|
||||
|
||||
<h2>tl_node_move_down</h2>
|
||||
<p>Перемещает вниз узел под курсором. Вместе с узлом двигается также и курсор. Пример использования функции:</p>
|
||||
<pre> push dword tree1
|
||||
call dword[tl_node_move_down] ;переместить узел</pre>
|
||||
<p>где: <b>tree1</b> - структура tree_list</p>
|
||||
|
||||
<h2>tl_node_poi_get_info</h2>
|
||||
<p>Берет внутренний указатель на структуру описывающую узел.</p>
|
||||
<h2>tl_node_poi_get_next_info</h2>
|
||||
<p>Берет указатель на следующий элемент в цепи, без учета открытия/закрытия дочерних узлов.</p>
|
||||
<h2>tl_node_poi_get_data</h2>
|
||||
<p>Берет указатель на данные (пользовательские и подпись) из узла указанного в указателе.</p>
|
||||
|
||||
<p>Функциями tl_node_poi_get_info, tl_node_poi_get_next_info и tl_node_poi_get_data можно считывать информацию о узлах элемента, при этом не меняя текущего положения курсора. Т. е. можно организовать доступ к даным элемента в "фоновом режиме".</p>
|
||||
|
||||
<h2><a name="fun_sme">tl_save_mem</a></h2>
|
||||
<p>Сохраняет информацию об узлах элемента в память. Пример использования функции:</p>
|
||||
<pre> MEM_SIZE equ 5000
|
||||
node_data rb MEM_SIZE
|
||||
.........
|
||||
push dword tree1
|
||||
push dword 0
|
||||
push dword node_data
|
||||
push dword MEM_SIZE
|
||||
call dword[tl_save_mem]
|
||||
pop eax</pre>
|
||||
<p>где: <b>tree1</b> - структура tree_list;
|
||||
<b>0</b> - опция сохранения в начало блока памяти (если = 1, то добавляет элемент после других сохраненных ранее);
|
||||
<b>node_data</b> - указатель на блок памяти;
|
||||
<b>MEM_SIZE</b> - размер блока памяти для сохранения.
|
||||
В регистр <b>eax</b> пишется значение 0 или записываются коды ошибок сохранения.</p>
|
||||
|
||||
<h2><a name="fun_lme">tl_load_mem</a></h2>
|
||||
<p>Загружает информацию об узлах элемента из памяти. Пример использования функции:</p>
|
||||
<pre> MEM_SIZE equ 5000
|
||||
node_data rb MEM_SIZE
|
||||
.........
|
||||
push dword tree1
|
||||
push dword 0
|
||||
push dword node_data
|
||||
push dword MEM_SIZE
|
||||
call dword[tl_load_mem]
|
||||
pop eax</pre>
|
||||
<p>где: <b>tree1</b> - структура tree_list;
|
||||
<b>0</b> - индекс считываемого элемента;
|
||||
<b>node_data</b> - указатель на блок памяти;
|
||||
<b>MEM_SIZE</b> - размер блока памяти для сохранения.
|
||||
В регистр <b>eax</b> пишется значение 0 или записываются коды ошибок считывания.</p>
|
||||
|
||||
<h2><a name="fun_gme">tl_get_mem_size</a></h2>
|
||||
<p>Вычисляет размер блока памяти (в который были раньше сохранены элементы).</p>
|
||||
|
||||
<h2><a name="version">version_tree_list</a></h2>
|
||||
<p>Версия элемента</p>
|
||||
|
||||
<h1><a name="struc_tree_list">Структура tree_list</a></h1>
|
||||
<pre>struc tree_list info_size,info_max_count,style, img_cx,img_cy,\
|
||||
col_bkg,col_zag,col_txt, box_l,box_t,box_w,box_h, capt_cy,info_capt_offs,\
|
||||
info_capt_len,el_focus, p_scrol,on_press {
|
||||
.data_info dd 0
|
||||
.info_size dw info_size
|
||||
.info_max_count dd info_max_count
|
||||
.style dd style
|
||||
.data_nodes dd 0
|
||||
.data_img dd 0
|
||||
.img_cx dw img_cx
|
||||
.img_cy dw img_cy
|
||||
.data_img_sys dd 0
|
||||
.ch_tim dd 0
|
||||
.ls_tim dd 0
|
||||
.tim_undo dd 0
|
||||
.cur_pos dd 0
|
||||
.col_bkg dd col_bkg
|
||||
.col_zag dd col_zag
|
||||
.col_txt dd col_txt
|
||||
.box_left dd box_l
|
||||
.box_top dd box_t
|
||||
.box_width dd box_w
|
||||
.box_height dd box_h
|
||||
.capt_cy dw capt_cy
|
||||
.info_capt_offs dw info_capt_offs
|
||||
.info_capt_len dw info_capt_len
|
||||
.el_focus dd el_focus
|
||||
.p_scrol dd p_scrol
|
||||
rb 4
|
||||
.on_activate dd 0
|
||||
.on_press dd on_press
|
||||
}</pre>
|
||||
<p><b>info_size</b> - количество байт, которое будет выделено для каждого узла. Часть этой памяти пользователь может использовать для своих целей (регулируется через <i>info_capt_offs</i> и <i>info_capt_len</i> см. рис. 2) а остальная часть будет использована как подпись узла.</p>
|
||||
<p><b>info_max_count</b> - максимальное количество узлов, которые можно добавить в элемент.</p>
|
||||
<p><b>style</b> - стили элемента.</p>
|
||||
<p><b>data_nodes</b> - указатель на внутренние структуры узлов (<i>TreeList</i>).</p>
|
||||
<p><b>data_img</b> - указатель на изображения с иконками узлов.</p>
|
||||
<p><b>data_img_sys</b> - указатель на системные изображения (курсор, плюсики, линии, ... все кроме иконок узлов).</p>
|
||||
<p><b>capt_cy</b> - высота строки для подписи вверху элемента, если меньше 9 подпись не выводится.</p>
|
||||
<p><b>info_capt_len</b> - длинна текста для подписи. Если равно 0, то длинна считается так: <i>info_size - info_capt_offs</i>.</p>
|
||||
<p><b>p_scrol</b> - указатель на структуру скроллинга, связанного с данным элементом.</p>
|
||||
<p><b>on_press</b> - указатель на функцию, которая будет вызвана при нажитии [<b>Enter</b>]. Если указатель равен 0 то ничего не будет вызыватся.</p>
|
||||
|
||||
<p><img src="info_size.png"></p>
|
||||
<p>Рис. 2. Параметры <i>info_size</i>, <i>info_capt_offs</i> и <i>info_capt_len</i> в узле</p>
|
||||
|
||||
<p>Пример создания структуры:</p>
|
||||
<pre>tree1 tree_list 24,500, tl_draw_par_line+tl_list_box_mode, 16,16,\
|
||||
0x8080ff,0x0000ff,0xffffff, 10,35,200-16,285, 14,4,0,\
|
||||
el_focus, wScr,fun_on_enter</pre>
|
||||
|
||||
<h1><a name="tree_list_styles">Стили элемента</a></h1>
|
||||
<h2>tl_key_no_edit</h2>
|
||||
<p>Элемент нельзя редактировать на клавиатуре (изменять уровни, удалять). Ставьте этот стиль если нужно создать элемент только для просмотра данных.</p>
|
||||
<h2>tl_draw_par_line</h2>
|
||||
<p>Рисовать линии к родительскому узлу.</p>
|
||||
<h2>tl_list_box_mode</h2>
|
||||
<p>Стиль не отображает уровни (как в ListBox все узлы одного уровня).</p>
|
||||
|
||||
<hr>
|
||||
<p>Документация обновлялась последний раз 23.12.09.</p>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
@ -25,113 +25,113 @@
|
||||
;*****************************************************************************
|
||||
|
||||
;§ £®«®¢®ª ¯à¨«®¦¥¨ï
|
||||
use32 ; âà á«ïâ®à, ¨á¯®«ì§ãî騩 32 à §àï¤ëå ª®¬ ¤ë
|
||||
org 0x0 ; ¡ §®¢ë© ¤à¥á ª®¤ , ¢á¥£¤ 0x0
|
||||
db 'MENUET01' ; ¨¤¥â¨ä¨ª â®à ¨á¯®«ï¥¬®£® ä ©« (8 ¡ ©â)
|
||||
dd 0x1 ; ¢¥àá¨ï ä®à¬ â § £®«®¢ª ¨á¯®«ï¥¬®£® ä ©«
|
||||
dd start ; ¤à¥á, ª®â®àë© á¨á⥬ ¯¥à¥¤ ñâ ã¯à ¢«¥¨¥
|
||||
; ¯®á«¥ § £à㧪¨ ¯à¨«®¦¥¨ï ¢ ¯ ¬ïâì
|
||||
dd mem ; à §¬¥à ¯à¨«®¦¥¨ï
|
||||
dd mem ; Ž¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪ ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢¨¬ £à¨æã 4 ¡ ©â
|
||||
dd mem ; à ᯮ«®¦¨¬ ¯®§¨æ¨î á⥪ ¢ ®¡« á⨠¯ ¬ïâ¨, áà §ã § ⥫®¬ ¯à®£à ¬¬ë. ‚¥àè¨ á⥪ ¢ ¤¨ ¯ §®¥ ¯ ¬ïâ¨, 㪠§ ®¬ ¢ëè¥
|
||||
dd 0x0 ; 㪠§ ⥫ì áâபã á ¯ à ¬¥âà ¬¨.
|
||||
use32 ; âà á«ïâ®à, ¨á¯®«ì§ãî騩 32 à §àï¤ëå ª®¬ ¤ë
|
||||
org 0x0 ; ¡ §®¢ë© ¤à¥á ª®¤ , ¢á¥£¤ 0x0
|
||||
db 'MENUET01' ; ¨¤¥â¨ä¨ª â®à ¨á¯®«ï¥¬®£® ä ©« (8 ¡ ©â)
|
||||
dd 0x1 ; ¢¥àá¨ï ä®à¬ â § £®«®¢ª ¨á¯®«ï¥¬®£® ä ©«
|
||||
dd start ; ¤à¥á, ª®â®àë© á¨á⥬ ¯¥à¥¤ ñâ ã¯à ¢«¥¨¥
|
||||
; ¯®á«¥ § £à㧪¨ ¯à¨«®¦¥¨ï ¢ ¯ ¬ïâì
|
||||
dd mem ; à §¬¥à ¯à¨«®¦¥¨ï
|
||||
dd mem ; Ž¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪ ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢¨¬ £à¨æã 4 ¡ ©â
|
||||
dd mem ; à ᯮ«®¦¨¬ ¯®§¨æ¨î á⥪ ¢ ®¡« á⨠¯ ¬ïâ¨, áà §ã § ⥫®¬ ¯à®£à ¬¬ë. ‚¥àè¨ á⥪ ¢ ¤¨ ¯ §®¥ ¯ ¬ïâ¨, 㪠§ ®¬ ¢ëè¥
|
||||
dd 0x0 ; 㪠§ ⥫ì áâபã á ¯ à ¬¥âà ¬¨.
|
||||
dd way_of_ini
|
||||
include '../../../../macros.inc'
|
||||
include '../../box_lib/asm/trunk/editbox_ex.mac'
|
||||
include '../../box_lib/trunk/box_lib.mac'
|
||||
include '../../box_lib/load_lib.mac'
|
||||
@use_library ;use load lib macros
|
||||
@use_library ;use load lib macros
|
||||
start:
|
||||
;universal load library/librarys
|
||||
sys_load_libraries l_libs_start,end_l_libs
|
||||
;if return code =-1 then exit, else nornary work
|
||||
cmp eax,-1
|
||||
jz exit
|
||||
mcall 40,0x27 ;ãáâ ®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
|
||||
cmp eax,-1
|
||||
jz exit
|
||||
mcall 40,0x27 ;ãáâ ®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
|
||||
|
||||
mov eax,48
|
||||
mov ebx,3
|
||||
mov ecx,sc
|
||||
mov edx,sizeof.system_colors
|
||||
mcall
|
||||
mov eax,dword [sc.work]
|
||||
mov dword [con_colors+4],eax
|
||||
mov eax,48
|
||||
mov ebx,3
|
||||
mov ecx,sc
|
||||
mov edx,sizeof.system_colors
|
||||
mcall
|
||||
mov eax,dword [sc.work]
|
||||
mov dword [con_colors+4],eax
|
||||
|
||||
; mcall 66,1,0
|
||||
call [initialization_font] ; ¨¨æ¨ «¨§ æ¨ï ᯨ᪠èà¨ä⮢
|
||||
push dword (8 shl 16 +16) ; ¯®¨áª 㦮£® èà¨äâ ¢ ¡®à¥ èà¨ä⮢ (¯®ª ¤®áâ㯥 ⮫쪮 8å16)
|
||||
call [initialization_font] ; ¨¨æ¨ «¨§ æ¨ï ᯨ᪠èà¨ä⮢
|
||||
push dword (8 shl 16 +16) ; ¯®¨áª 㦮£® èà¨äâ ¢ ¡®à¥ èà¨ä⮢ (¯®ª ¤®áâ㯥 ⮫쪮 8å16)
|
||||
call [get_font]
|
||||
test eax,eax ; 諨 ?
|
||||
jnz exit
|
||||
test eax,eax ; 諨 ?
|
||||
jnz exit
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
mcall 40,0x27 ;ãáâ ®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
|
||||
mcall 40,0x27 ;ãáâ ®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
|
||||
red_win:
|
||||
call draw_window ;¯¥à¢® ç «ì® ¥®¡å®¤¨¬® à¨á®¢ âì ®ª®
|
||||
call draw_window ;¯¥à¢® ç «ì® ¥®¡å®¤¨¬® à¨á®¢ âì ®ª®
|
||||
align 4
|
||||
still: ;®á®¢®© ®¡à ¡®â稪
|
||||
mcall 10 ;Ž¦¨¤ âì ᮡëâ¨ï
|
||||
dec eax
|
||||
jz red_win
|
||||
dec eax
|
||||
jz key
|
||||
dec eax
|
||||
jz button
|
||||
still: ;®á®¢®© ®¡à ¡®â稪
|
||||
mcall 10 ;Ž¦¨¤ âì ᮡëâ¨ï
|
||||
dec eax
|
||||
jz red_win
|
||||
dec eax
|
||||
jz key
|
||||
dec eax
|
||||
jz button
|
||||
|
||||
push dword edit1
|
||||
call [edit_box_mouse]
|
||||
push dword edit1
|
||||
call [edit_box_mouse]
|
||||
|
||||
jmp still ;¥á«¨ ¨ç¥£® ¨§ ¯¥à¥ç¨á«¥®£® ⮠ᮢ ¢ 横«
|
||||
jmp still ;¥á«¨ ¨ç¥£® ¨§ ¯¥à¥ç¨á«¥®£® ⮠ᮢ ¢ 横«
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
button:
|
||||
mcall 17 ;¯®«ãç¨âì ¨¤¥â¨ä¨ª â®à ¦ ⮩ ª« ¢¨è¨
|
||||
test ah,ah ;¥á«¨ ¢ ah 0, â® ¯¥à¥©â¨ ®¡à ¡®â稪 ᮡë⨩ still
|
||||
jz still
|
||||
exit:
|
||||
call [free_fulder_info]
|
||||
call [free_font]
|
||||
mcall -1
|
||||
mcall 17 ;¯®«ãç¨âì ¨¤¥â¨ä¨ª â®à ¦ ⮩ ª« ¢¨è¨
|
||||
test ah,ah ;¥á«¨ ¢ ah 0, â® ¯¥à¥©â¨ ®¡à ¡®â稪 ᮡë⨩ still
|
||||
jz still
|
||||
exit:
|
||||
call [free_fulder_info]
|
||||
call [free_font]
|
||||
mcall -1
|
||||
key:
|
||||
mcall 2 ;§ £à㧨¬ § 票¥ 2 ¢ ॣ¨áâ®à eax ¨ ¯®«ã稬 ª®¤ ¦ ⮩ ª« ¢¨è¨
|
||||
mcall 2 ;§ £à㧨¬ § 票¥ 2 ¢ ॣ¨áâ®à eax ¨ ¯®«ã稬 ª®¤ ¦ ⮩ ª« ¢¨è¨
|
||||
|
||||
push dword edit1
|
||||
call [edit_box_key]
|
||||
push dword edit1
|
||||
call [edit_box_key]
|
||||
|
||||
|
||||
mcall 13,<20,650>,<40,16>, dword[con_colors+4]
|
||||
mcall 13,<20,650>,<40,16>, dword[con_colors+4]
|
||||
|
||||
|
||||
push dword 20 shl 16 + 40 ; esp+12= dd x shl 16 + y x- ª®®à¤¨ â ¯® •, y - ª®®à¤¨ â ¯® Y
|
||||
push dword con_colors ; esp+8 = dd point to color of background and font
|
||||
push dword text ; esp+4 = dd point to ASCIIZ
|
||||
push dword 20 shl 16 + 40 ; esp+12= dd x shl 16 + y x- ª®®à¤¨ â ¯® •, y - ª®®à¤¨ â ¯® Y
|
||||
push dword con_colors ; esp+8 = dd point to color of background and font
|
||||
push dword text ; esp+4 = dd point to ASCIIZ
|
||||
; esp+0 = dd back
|
||||
call [font_draw_on_string] ; ¢ë¢¥á⨠¯® £«¨ä ¬ áâà®çªã
|
||||
call [font_draw_on_string] ; ¢ë¢¥á⨠¯® £«¨ä ¬ áâà®çªã
|
||||
|
||||
|
||||
jmp still
|
||||
jmp still
|
||||
|
||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
align 4
|
||||
draw_window: ;à¨á®¢ ¨¥ ®ª ¯à¨«®¦¥¨ï
|
||||
mcall 12,1
|
||||
xor eax,eax ;®¡ã«¨âì eax
|
||||
mov ebx,50*65536+680 ;[ª®®à¤¨ â ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ x]
|
||||
mov ecx,30*65536+200 ;[ª®®à¤¨ â ¯® ®á¨ y]*65536 + [à §¬¥à ¯® ®á¨ y]
|
||||
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
|
||||
or edx,0x34000000
|
||||
mov edi,hed
|
||||
mcall ; à¨á®¢ âì ®ª® ¯à¨«®¦¥¨ï
|
||||
|
||||
push dword edit1
|
||||
call [edit_box_draw]
|
||||
draw_window: ;à¨á®¢ ¨¥ ®ª ¯à¨«®¦¥¨ï
|
||||
mcall 12,1
|
||||
xor eax,eax ;®¡ã«¨âì eax
|
||||
mov ebx,50*65536+680 ;[ª®®à¤¨ â ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ x]
|
||||
mov ecx,30*65536+200 ;[ª®®à¤¨ â ¯® ®á¨ y]*65536 + [à §¬¥à ¯® ®á¨ y]
|
||||
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
|
||||
or edx,0x34000000
|
||||
mov edi,hed
|
||||
mcall ; à¨á®¢ âì ®ª® ¯à¨«®¦¥¨ï
|
||||
|
||||
push dword edit1
|
||||
call [edit_box_draw]
|
||||
;
|
||||
push dword 20 shl 16 + 40 ; esp+12= dd x shl 16 + y x- ª®®à¤¨ â ¯® •, y - ª®®à¤¨ â ¯® Y
|
||||
push dword con_colors ; esp+8 = dd point to color of background and font
|
||||
push dword text; esp+4 = dd point to ASCIIZ
|
||||
push dword 20 shl 16 + 40 ; esp+12= dd x shl 16 + y x- ª®®à¤¨ â ¯® •, y - ª®®à¤¨ â ¯® Y
|
||||
push dword con_colors ; esp+8 = dd point to color of background and font
|
||||
push dword text; esp+4 = dd point to ASCIIZ
|
||||
; esp+0 = dd back
|
||||
call [font_draw_on_string] ; ¢ë¢¥á⨠¯® £«¨ä ¬ áâà®çªã
|
||||
mov eax,12 ;”ãªæ¨ï 12 - ç âì/§ ª®ç¨âì ¯¥à¥à¨á®¢ªã ®ª .
|
||||
mov ebx,2 ;<3B>®¤äãªæ¨ï 2 - § ª®ç¨âì ¯¥à¥à¨á®¢ªã ®ª .
|
||||
mcall
|
||||
ret
|
||||
call [font_draw_on_string] ; ¢ë¢¥á⨠¯® £«¨ä ¬ áâà®çªã
|
||||
mov eax,12 ;”ãªæ¨ï 12 - ç âì/§ ª®ç¨âì ¯¥à¥à¨á®¢ªã ®ª .
|
||||
mov ebx,2 ;<3B>®¤äãªæ¨ï 2 - § ª®ç¨âì ¯¥à¥à¨á®¢ªã ®ª .
|
||||
mcall
|
||||
ret
|
||||
;;;;;;;;;;;;
|
||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
;DATA ¤ ë¥
|
||||
@ -143,53 +143,53 @@ library02 l_libs library_name1, way_of_ini, library_path, system_path1, err_mess
|
||||
end_l_libs:
|
||||
|
||||
;
|
||||
system_path db '/sys/lib/'
|
||||
library_name db 'fonts_lib.obj',0
|
||||
system_path db '/sys/lib/'
|
||||
library_name db 'fonts_lib.obj',0
|
||||
|
||||
system_path1 db '/sys/lib/'
|
||||
library_name1 db 'box_lib.obj',0
|
||||
system_path1 db '/sys/lib/'
|
||||
library_name1 db 'box_lib.obj',0
|
||||
|
||||
err_message_found_lib db 'Sorry I cannot load library fonts_lib.obj',0
|
||||
err_message_found_lib1 db 'Sorry I cannot load library box_lib.obj',0
|
||||
err_message_found_lib db 'Sorry I cannot load library fonts_lib.obj',0
|
||||
err_message_found_lib1 db 'Sorry I cannot load library box_lib.obj',0
|
||||
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
err_message_import db 'Error on load import library fonts_lib.obj',0
|
||||
err_message_import1 db 'Error on load import library box_lib.obj',0
|
||||
head_f_l db 'System error',0
|
||||
err_message_import db 'Error on load import library fonts_lib.obj',0
|
||||
err_message_import1 db 'Error on load import library box_lib.obj',0
|
||||
|
||||
align 4
|
||||
import_box_lib:
|
||||
|
||||
edit_box_draw dd aEdit_box_draw
|
||||
edit_box_key dd aEdit_box_key
|
||||
edit_box_mouse dd aEdit_box_mouse
|
||||
version_ed dd aVersion_ed
|
||||
edit_box_draw dd aEdit_box_draw
|
||||
edit_box_key dd aEdit_box_key
|
||||
edit_box_mouse dd aEdit_box_mouse
|
||||
version_ed dd aVersion_ed
|
||||
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
aEdit_box_mouse db 'edit_box_mouse',0
|
||||
aVersion_ed db 'version_ed',0
|
||||
aVersion_ed db 'version_ed',0
|
||||
|
||||
font_import:
|
||||
initialization_font dd a_initialization_font
|
||||
get_font dd a_get_font
|
||||
free_fulder_info dd a_free_fulder_info
|
||||
free_font dd a_free_font
|
||||
font_draw_on_string dd a_font_draw_on_string
|
||||
show_all_glif dd a_show_all_glif
|
||||
Version_fn dd a_Version_fn
|
||||
dd 0,0
|
||||
initialization_font dd a_initialization_font
|
||||
get_font dd a_get_font
|
||||
free_fulder_info dd a_free_fulder_info
|
||||
free_font dd a_free_font
|
||||
font_draw_on_string dd a_font_draw_on_string
|
||||
show_all_glif dd a_show_all_glif
|
||||
Version_fn dd a_Version_fn
|
||||
dd 0,0
|
||||
|
||||
a_initialization_font db 'initialization_font',0
|
||||
a_get_font db 'get_font',0
|
||||
a_free_fulder_info db 'free_fulder_info',0
|
||||
a_free_font db 'free_font',0
|
||||
a_font_draw_on_string db 'font_draw_on_string',0
|
||||
a_show_all_glif db 'show_all_glif',0
|
||||
a_Version_fn db 'version_fn',0
|
||||
a_initialization_font db 'initialization_font',0
|
||||
a_get_font db 'get_font',0
|
||||
a_free_fulder_info db 'free_fulder_info',0
|
||||
a_free_font db 'free_font',0
|
||||
a_font_draw_on_string db 'font_draw_on_string',0
|
||||
a_show_all_glif db 'show_all_glif',0
|
||||
a_Version_fn db 'version_fn',0
|
||||
|
||||
|
||||
|
||||
@ -200,17 +200,17 @@ text_end:
|
||||
rb 256
|
||||
test_leght = ($-text)-1
|
||||
|
||||
hed db "Font's demo <Lrz>",0
|
||||
hed db "Font's demo <Lrz>",0
|
||||
align 4
|
||||
con_colors dd 0x1E1EFF, 0x96FFCF
|
||||
con_colors dd 0x1E1EFF, 0x96FFCF
|
||||
|
||||
align 4
|
||||
sc system_colors
|
||||
way_of_ini rb 4096
|
||||
library_path rb 4096
|
||||
way_of_ini rb 4096
|
||||
library_path rb 4096
|
||||
|
||||
align 4
|
||||
i_end:
|
||||
rb 1024
|
||||
mem:
|
||||
;ª®¥æ ª®¤
|
||||
;ª®¥æ ª®¤
|
File diff suppressed because it is too large
Load Diff
@ -8,103 +8,103 @@
|
||||
;
|
||||
|
||||
use32
|
||||
org 0x0
|
||||
org 0x0
|
||||
STACK_SIZE=1024
|
||||
offset_y=22 ; Correction for skin
|
||||
offset_x=5
|
||||
db 'MENUET01' ; 8 byte id
|
||||
dd 0x01 ; header version
|
||||
dd START ; start of code
|
||||
dd I_END ; size of image
|
||||
dd U_END+STACK_SIZE ; memory for app
|
||||
dd U_END+STACK_SIZE ; esp
|
||||
dd 0x0 , 0x0 ; I_Param , I_Icon
|
||||
db 'MENUET01' ; 8 byte id
|
||||
dd 0x01 ; header version
|
||||
dd START ; start of code
|
||||
dd I_END ; size of image
|
||||
dd U_END+STACK_SIZE ; memory for app
|
||||
dd U_END+STACK_SIZE ; esp
|
||||
dd 0x0 , 0x0 ; I_Param , I_Icon
|
||||
|
||||
include 'lang.inc'
|
||||
include '../../../macros.inc'
|
||||
include '../../../develop/libraries/box_lib/asm/trunk/editbox_ex.mac'
|
||||
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../../develop/libraries/box_lib/load_lib.mac'
|
||||
display_processes=32 ; number of processes to show
|
||||
display_processes=32 ; number of processes to show
|
||||
@use_library ;use load lib macros
|
||||
START: ; start of execution
|
||||
START: ; start of execution
|
||||
|
||||
sys_load_library library_name, cur_dir_path, library_path, system_path, \
|
||||
err_message_found_lib, head_f_l, myimport, err_message_import, head_f_i
|
||||
inc eax
|
||||
jz close
|
||||
inc eax
|
||||
jz close
|
||||
; calculate window position
|
||||
; at the center of the screen
|
||||
mcall 40,0x27 ;set event
|
||||
call calculate_window_pos
|
||||
|
||||
;main loop when process name isn't edited.
|
||||
red:
|
||||
mcall 48,3,sc,40
|
||||
edit_boxes_set_sys_color edit1,edit1_end,sc ;set color
|
||||
check_boxes_set_sys_color check1,check1_end,sc ;set color
|
||||
red:
|
||||
mcall 48,3,sc,40
|
||||
edit_boxes_set_sys_color edit1,edit1_end,sc ;set color
|
||||
check_boxes_set_sys_color check1,check1_end,sc ;set color
|
||||
xor ebp,ebp
|
||||
inc ebp
|
||||
; mov ebp,1
|
||||
call draw_window ; redraw all window
|
||||
call draw_window ; redraw all window
|
||||
still:
|
||||
mov eax,23 ; wait here for event
|
||||
mov ebx,100 ; 1 sec.
|
||||
mov eax,23 ; wait here for event
|
||||
mov ebx,100 ; 1 sec.
|
||||
mcall
|
||||
|
||||
dec eax ; redraw request ?
|
||||
jz red
|
||||
dec eax ; key in buffer ?
|
||||
jz key
|
||||
dec eax ; button in buffer ?
|
||||
jz button
|
||||
dec eax ; redraw request ?
|
||||
jz red
|
||||
dec eax ; key in buffer ?
|
||||
jz key
|
||||
dec eax ; button in buffer ?
|
||||
jz button
|
||||
|
||||
sub eax,3 ; If not use mouse - show
|
||||
sub eax,3 ; If not use mouse - show
|
||||
jnz still_end
|
||||
push dword edit1
|
||||
call [edit_box_mouse]
|
||||
push dword edit1
|
||||
call [edit_box_mouse]
|
||||
push dword check1
|
||||
call [check_box_mouse]
|
||||
jmp still
|
||||
|
||||
still_end:
|
||||
xor ebp,ebp ; draw new state of processes
|
||||
xor ebp,ebp ; draw new state of processes
|
||||
call draw_window
|
||||
jmp still
|
||||
|
||||
|
||||
key: ; key
|
||||
mov eax,2
|
||||
key: ; key
|
||||
mov eax,2
|
||||
mcall
|
||||
|
||||
cmp ah,184 ; PageUp
|
||||
jz pgdn
|
||||
cmp ah,184 ; PageUp
|
||||
jz pgdn
|
||||
cmp ah,183
|
||||
jz pgup ; PageDown
|
||||
jz pgup ; PageDown
|
||||
cmp ah,27
|
||||
jz close ; Esc
|
||||
jz close ; Esc
|
||||
|
||||
push dword edit1
|
||||
call [edit_box_key]
|
||||
push dword edit1
|
||||
call [edit_box_key]
|
||||
; Check ENTER with ed_focus edit_box
|
||||
lea edi,[edit1]
|
||||
test word ed_flags,ed_focus
|
||||
jz still_end
|
||||
sub ah,13 ; ENTER?
|
||||
jz program_start ; RUN a program
|
||||
jz still_end
|
||||
sub ah,13 ; ENTER?
|
||||
jz program_start ; RUN a program
|
||||
|
||||
jmp still
|
||||
|
||||
button:
|
||||
button:
|
||||
; get button id
|
||||
mov eax,17
|
||||
mov eax,17
|
||||
mcall
|
||||
shr eax,8
|
||||
shr eax,8
|
||||
|
||||
;id in [10,50] corresponds to terminate buttons.
|
||||
cmp eax,10
|
||||
jb noterm
|
||||
jb noterm
|
||||
cmp eax,50
|
||||
jg noterm
|
||||
jg noterm
|
||||
|
||||
;calculate button index
|
||||
sub eax,11
|
||||
@ -125,18 +125,18 @@ still_end:
|
||||
|
||||
;special buttons
|
||||
dec eax
|
||||
jz close
|
||||
jz close
|
||||
|
||||
sub eax,50
|
||||
jz pgdn ;51
|
||||
jz pgdn ;51
|
||||
dec eax
|
||||
jz pgup ;52
|
||||
jz pgup ;52
|
||||
; dec eax
|
||||
; jz read_string
|
||||
dec eax
|
||||
jz program_start ;53
|
||||
jz program_start ;53
|
||||
dec eax
|
||||
jz reboot ;54
|
||||
jz reboot ;54
|
||||
jmp still_end
|
||||
|
||||
;buttons handlers
|
||||
@ -166,7 +166,7 @@ still_end:
|
||||
;close program if we going to reboot
|
||||
|
||||
close:
|
||||
or eax,-1 ; close this program
|
||||
or eax,-1 ; close this program
|
||||
mcall
|
||||
|
||||
draw_next_process:
|
||||
@ -198,7 +198,7 @@ draw_next_process:
|
||||
mov esi,0xaabbcc
|
||||
;contrast
|
||||
test dword [index],1
|
||||
jz .change_color_button
|
||||
jz .change_color_button
|
||||
mov esi,0x8899aa
|
||||
|
||||
.change_color_button:
|
||||
@ -211,7 +211,7 @@ draw_next_process:
|
||||
mov edx,0x88ff88
|
||||
;contrast
|
||||
test dword [index],1
|
||||
jz .change_color_info
|
||||
jz .change_color_info
|
||||
mov edx,0xddffdd
|
||||
|
||||
.change_color_info:
|
||||
@ -220,7 +220,7 @@ draw_next_process:
|
||||
;nothing else should be done
|
||||
;if there is no process for this button
|
||||
test edi,edi
|
||||
jl .ret
|
||||
jl .ret
|
||||
|
||||
;find process
|
||||
.return_1:
|
||||
@ -244,7 +244,7 @@ draw_next_process:
|
||||
;if current slot greater than maximal slot,
|
||||
;there is no more proccesses.
|
||||
cmp ecx,eax
|
||||
jg .no_processes
|
||||
jg .no_processes
|
||||
|
||||
;if slot state is equal to 9, it is empty.
|
||||
cmp [process_info_buffer+process_information.slot_state],9
|
||||
@ -254,7 +254,7 @@ draw_next_process:
|
||||
jmp .find_loop
|
||||
|
||||
.no_processes:
|
||||
or edi,-1
|
||||
or edi,-1
|
||||
ret
|
||||
|
||||
.process_found:
|
||||
@ -265,11 +265,11 @@ draw_next_process:
|
||||
pop edi
|
||||
jnz @f
|
||||
cmp dword [process_info_buffer+10],'ICON'
|
||||
jz .return_1
|
||||
jz .return_1
|
||||
cmp dword [process_info_buffer+10],'OS/I'
|
||||
jz .return_1
|
||||
jz .return_1
|
||||
cmp byte [process_info_buffer+10],'@'
|
||||
jz .return_1
|
||||
jz .return_1
|
||||
|
||||
|
||||
@@: mov edi,ecx
|
||||
@ -307,7 +307,7 @@ draw_next_process:
|
||||
|
||||
.no_black:
|
||||
cmp eax,80
|
||||
ja .no_green
|
||||
ja .no_green
|
||||
mov dword [tcolor],0x107a30
|
||||
jmp .color_set
|
||||
|
||||
@ -316,7 +316,7 @@ draw_next_process:
|
||||
.color_set:
|
||||
|
||||
;show slot number
|
||||
mov eax,47
|
||||
mov eax,47
|
||||
mov ebx,2*65536+1*256
|
||||
;ecx haven't changed since .process_found
|
||||
; mov ecx,edi
|
||||
@ -377,11 +377,11 @@ draw_next_process:
|
||||
add ecx,[process_info_buffer.box.top]
|
||||
add edx,60*65536
|
||||
mcall
|
||||
|
||||
|
||||
.ret:
|
||||
;build index->slot map for terminating processes.
|
||||
mov eax,[index]
|
||||
mov [tasklist+4*eax],edi
|
||||
mov [tasklist+4*eax],edi
|
||||
ret
|
||||
|
||||
;read_string:
|
||||
@ -535,33 +535,33 @@ draw_window:
|
||||
;ebp=0 - redraw only process information
|
||||
|
||||
test ebp,ebp
|
||||
jz .show_process_info
|
||||
jz .show_process_info
|
||||
|
||||
mov eax,12 ; function 12:tell os about windowdraw
|
||||
mov eax,12 ; function 12:tell os about windowdraw
|
||||
; mov ebx,1 ; 1, start of draw
|
||||
xor ebx,ebx
|
||||
xor ebx,ebx
|
||||
inc ebx
|
||||
mcall
|
||||
mcall
|
||||
|
||||
; DRAW WINDOW
|
||||
xor eax,eax ; function 0 : define and draw window
|
||||
mov ebx,[winxpos] ; [x start] *65536 + [x size]
|
||||
mov ecx,[winypos] ; [y start] *65536 + [y size]
|
||||
; DRAW WINDOW
|
||||
xor eax,eax ; function 0 : define and draw window
|
||||
mov ebx,[winxpos] ; [x start] *65536 + [x size]
|
||||
mov ecx,[winypos] ; [y start] *65536 + [y size]
|
||||
mov edx,0x34ddffdd ;ffffff ; color of work area RRGGBB,8->color
|
||||
mov edi,title ; WINDOW CAPTION;
|
||||
mov edi,title ; WINDOW CAPTION;
|
||||
mcall
|
||||
|
||||
|
||||
add eax,4 ; function 4 : write text to window
|
||||
mov ebx,(22-offset_x)*65536+35-offset_y ; draw info text with function 4
|
||||
|
||||
add eax,4 ; function 4 : write text to window
|
||||
mov ebx,(22-offset_x)*65536+35-offset_y ; draw info text with function 4
|
||||
xor ecx,ecx
|
||||
mov edx,text
|
||||
mov esi,text_len
|
||||
mcall
|
||||
|
||||
push dword edit1
|
||||
call [edit_box_draw]
|
||||
push dword check1
|
||||
push dword edit1
|
||||
call [edit_box_draw]
|
||||
push dword check1
|
||||
call [check_box_draw]
|
||||
|
||||
align 16
|
||||
@ -576,37 +576,37 @@ align 16
|
||||
inc dword [index]
|
||||
add dword [curposy],10
|
||||
cmp [index],display_processes
|
||||
jl .loop_draw
|
||||
jl .loop_draw
|
||||
|
||||
test ebp,ebp
|
||||
jz .end_redraw
|
||||
jz .end_redraw
|
||||
mov eax,8
|
||||
mov esi,0xaabbcc
|
||||
|
||||
|
||||
; previous page button
|
||||
mov ebx,(30-offset_x)*65536+96
|
||||
mov ecx,(380-offset_y)*65536+10
|
||||
mov edx,51
|
||||
mcall
|
||||
|
||||
|
||||
; next page button 52
|
||||
mov ebx,(130-offset_x)*65536+96
|
||||
inc edx
|
||||
mcall
|
||||
|
||||
|
||||
; ">" (text enter) button
|
||||
; mov ebx,30*65536+20
|
||||
add ecx,20 shl 16
|
||||
; inc edx
|
||||
; mcall
|
||||
|
||||
|
||||
; run button 53
|
||||
mov ebx,(456-offset_x)*65536+50
|
||||
inc edx
|
||||
mcall
|
||||
|
||||
; reboot button
|
||||
sub ebx,120*65536
|
||||
sub ebx,120*65536
|
||||
add ebx,60
|
||||
sub ecx,20 shl 16
|
||||
inc edx
|
||||
@ -639,8 +639,8 @@ align 16
|
||||
;print application name in text box
|
||||
; call print_text
|
||||
|
||||
mov eax,12 ; function 12:tell os about windowdraw
|
||||
mov ebx,2 ; 2, end of draw
|
||||
mov eax,12 ; function 12:tell os about windowdraw
|
||||
mov ebx,2 ; 2, end of draw
|
||||
mcall
|
||||
|
||||
.end_redraw:
|
||||
@ -648,35 +648,35 @@ align 16
|
||||
|
||||
|
||||
; DATA AREA
|
||||
system_path db '/sys/lib/'
|
||||
library_name db 'box_lib.obj',0
|
||||
system_path db '/sys/lib/'
|
||||
library_name db 'box_lib.obj',0
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0
|
||||
err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
err_message_import db 'Error on load import library box_lib.obj',0
|
||||
head_f_l db 'System error',0
|
||||
err_message_import db 'Error on load import library box_lib.obj',0
|
||||
|
||||
myimport:
|
||||
|
||||
edit_box_draw dd aEdit_box_draw
|
||||
edit_box_key dd aEdit_box_key
|
||||
edit_box_mouse dd aEdit_box_mouse
|
||||
edit_box_draw dd aEdit_box_draw
|
||||
edit_box_key dd aEdit_box_key
|
||||
edit_box_mouse dd aEdit_box_mouse
|
||||
;version_ed dd aVersion_ed
|
||||
|
||||
check_box_draw dd aCheck_box_draw
|
||||
check_box_mouse dd aCheck_box_mouse
|
||||
check_box_draw dd aCheck_box_draw
|
||||
check_box_mouse dd aCheck_box_mouse
|
||||
;version_ch dd aVersion_ch
|
||||
|
||||
;option_box_draw dd aOption_box_draw
|
||||
;option_box_mouse dd aOption_box_mouse
|
||||
;version_op dd aVersion_op
|
||||
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
aEdit_box_mouse db 'edit_box_mouse',0
|
||||
;aVersion_ed db 'version_ed',0
|
||||
|
||||
@ -694,12 +694,12 @@ edit1_end:
|
||||
list_start dd 0
|
||||
|
||||
sys_reboot:
|
||||
dd 7
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
db '/sys/end',0
|
||||
dd 7
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
db '/sys/end',0
|
||||
|
||||
if lang eq de
|
||||
text:
|
||||
@ -707,10 +707,10 @@ text:
|
||||
db 'SPEICHER START/NUTZUNG W-STACK W-SIZE'
|
||||
text_len = $-text
|
||||
|
||||
tbts: db 'SEITE ZURUECK SEITE VOR REBOOT SYSTEM'
|
||||
tbts: db 'SEITE ZURUECK SEITE VOR REBOOT SYSTEM'
|
||||
tbte:
|
||||
;tbts_2 db '>'
|
||||
tbts_3 db 'START'
|
||||
tbts_3 db 'START'
|
||||
tbte_2:
|
||||
check_text db '@ gehoren/aus'
|
||||
check_t_e=$-check_text
|
||||
@ -724,7 +724,7 @@ text_len = $-text
|
||||
|
||||
tbts: db 'EELMINE LEHT JÄRGMINE LEHT REBOODI SÜSTEEM'
|
||||
tbte:
|
||||
;tbts_2 db '>'
|
||||
;tbts_2 db '>'
|
||||
tbts_3 db 'START'
|
||||
tbte_2:
|
||||
check_text db '@ on/off'
|
||||
@ -737,10 +737,10 @@ text:
|
||||
db 'MEMORY START/USAGE W-STACK W-SIZE'
|
||||
text_len = $-text
|
||||
|
||||
tbts: db 'PREV PAGE NEXT PAGE REBOOT SYSTEM'
|
||||
tbts: db 'PREV PAGE NEXT PAGE REBOOT SYSTEM'
|
||||
tbte:
|
||||
;tbts_2 db '>'
|
||||
tbts_3 db 'RUN'
|
||||
tbts_3 db 'RUN'
|
||||
tbte_2:
|
||||
check_text db '@ on/off'
|
||||
check_t_e=$-check_text
|
||||
@ -748,7 +748,7 @@ title db 'Processes - Ctrl/Alt/Del',0
|
||||
|
||||
end if
|
||||
file_start: dd 7
|
||||
dd 0,0,0,0
|
||||
dd 0,0,0,0
|
||||
start_application: db '/sys/LAUNCHER',0
|
||||
start_application_e=$-start_application-1
|
||||
; times 60 db 0
|
||||
@ -761,13 +761,13 @@ winxpos rd 1
|
||||
winypos rd 1
|
||||
mouse_dd rd 1
|
||||
cpu_percent rd 1
|
||||
tcolor rd 1
|
||||
tcolor rd 1
|
||||
list_add rd 1
|
||||
curposy rd 1
|
||||
index rd 1
|
||||
index rd 1
|
||||
tasklist rd display_processes
|
||||
process_info_buffer process_information
|
||||
cur_dir_path rb 1024
|
||||
library_path rb 1024
|
||||
cur_dir_path rb 1024
|
||||
library_path rb 1024
|
||||
|
||||
U_END:
|
||||
|
@ -13,21 +13,21 @@ include '..\..\..\macros.inc'
|
||||
appname equ 'RDsave '
|
||||
version equ '1.2'
|
||||
|
||||
use32 ; ¢ª«îç¨âì 32-¡¨âë© à¥¦¨¬ áᥬ¡«¥à
|
||||
org 0x0 ; ¤à¥á æ¨ï á ã«ï
|
||||
use32 ; ¢ª«îç¨âì 32-¡¨âë© à¥¦¨¬ áᥬ¡«¥à
|
||||
org 0x0 ; ¤à¥á æ¨ï á ã«ï
|
||||
|
||||
db 'MENUET01' ; 8-¡ ©âë© ¨¤¥â¨ä¨ª â®à MenuetOS
|
||||
dd 0x01 ; ¢¥àá¨ï § £®«®¢ª (¢á¥£¤ 1)
|
||||
dd START ; ¤à¥á ¯¥à¢®© ª®¬ ¤ë
|
||||
dd I_END ; à §¬¥à ¯à®£à ¬¬ë
|
||||
dd I_END ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
|
||||
dd I_END ; ¤à¥á ¢¥àè¨ë áâíª
|
||||
dd 0x0 ; ¤à¥á ¡ãä¥à ¤«ï ¯ à ¬¥â஢ (¥ ¨á¯®«ì§ã¥âáï)
|
||||
db 'MENUET01' ; 8-¡ ©âë© ¨¤¥â¨ä¨ª â®à MenuetOS
|
||||
dd 0x01 ; ¢¥àá¨ï § £®«®¢ª (¢á¥£¤ 1)
|
||||
dd START ; ¤à¥á ¯¥à¢®© ª®¬ ¤ë
|
||||
dd I_END ; à §¬¥à ¯à®£à ¬¬ë
|
||||
dd I_END ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
|
||||
dd I_END ; ¤à¥á ¢¥àè¨ë áâíª
|
||||
dd 0x0 ; ¤à¥á ¡ãä¥à ¤«ï ¯ à ¬¥â஢ (¥ ¨á¯®«ì§ã¥âáï)
|
||||
dd cur_dir_path
|
||||
|
||||
;include '..\..\..\develop\examples\editbox\trunk\editbox.inc'
|
||||
include '../../../develop/libraries/box_lib/load_lib.mac'
|
||||
include '../../../develop/libraries/box_lib/asm/trunk/editbox_ex.mac'
|
||||
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
@use_library
|
||||
|
||||
;use_edit_box
|
||||
@ -41,21 +41,21 @@ align 4
|
||||
START:
|
||||
sys_load_library library_name, cur_dir_path, library_path, system_path, \
|
||||
err_message_found_lib, head_f_l, myimport, err_message_import, head_f_i
|
||||
cmp eax,-1
|
||||
jz close
|
||||
cmp eax,-1
|
||||
jz close
|
||||
|
||||
|
||||
mov eax, 40
|
||||
mov ebx, 100111b
|
||||
mcall
|
||||
red: ; ¯¥à¥à¨á®¢ âì ®ª®
|
||||
mov eax,48
|
||||
mov ebx,3
|
||||
mov ecx,sc
|
||||
mov edx,sizeof.system_colors
|
||||
red: ; ¯¥à¥à¨á®¢ âì ®ª®
|
||||
mov eax,48
|
||||
mov ebx,3
|
||||
mov ecx,sc
|
||||
mov edx,sizeof.system_colors
|
||||
mcall
|
||||
edit_boxes_set_sys_color editbox,editbox_end,sc
|
||||
call draw_window ; ¢ë§ë¢ ¥¬ ¯à®æ¥¤ãàã ®âà¨á®¢ª¨ ®ª
|
||||
edit_boxes_set_sys_color editbox,editbox_end,sc
|
||||
call draw_window ; ¢ë§ë¢ ¥¬ ¯à®æ¥¤ãàã ®âà¨á®¢ª¨ ®ª
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
;--- –ˆŠ‹ Ž<><C5BD>€<EFBFBD>Ž’Šˆ ‘Ž<E28098>›’ˆ‰ ----------------------------------------
|
||||
@ -64,99 +64,99 @@ red: ;
|
||||
still:
|
||||
mcall 10
|
||||
|
||||
dec eax ; ¯¥à¥à¨á®¢ âì ®ª®?
|
||||
jz red ; ¥á«¨ ¤ - ¬¥âªã red
|
||||
dec eax ; ¯¥à¥à¨á®¢ âì ®ª®?
|
||||
jz red ; ¥á«¨ ¤ - ¬¥âªã red
|
||||
dec eax
|
||||
jz key
|
||||
jz key
|
||||
dec eax
|
||||
jz button
|
||||
jz button
|
||||
|
||||
mouse:
|
||||
; mouse_edit_box editbox
|
||||
push dword editbox
|
||||
call [edit_box_mouse]
|
||||
push dword editbox
|
||||
call [edit_box_mouse]
|
||||
|
||||
jmp still
|
||||
jmp still
|
||||
|
||||
button:
|
||||
mov al,17 ; ¯®«ãç¨âì ¨¤¥â¨ä¨ª â®à ¦ ⮩ ª®¯ª¨
|
||||
mov al,17 ; ¯®«ãç¨âì ¨¤¥â¨ä¨ª â®à ¦ ⮩ ª®¯ª¨
|
||||
mcall
|
||||
|
||||
cmp ah,1 ; ª®¯ª á id=1("§ ªàëâì")?
|
||||
cmp ah,1 ; ª®¯ª á id=1("§ ªàëâì")?
|
||||
jne noclose
|
||||
close:
|
||||
or eax,-1 ; äãªæ¨ï -1: § ¢¥àè¨âì ¯à®£à ¬¬ã
|
||||
or eax,-1 ; äãªæ¨ï -1: § ¢¥àè¨âì ¯à®£à ¬¬ã
|
||||
mcall
|
||||
|
||||
noclose:
|
||||
push eax
|
||||
call clear_err
|
||||
pop eax
|
||||
push 16
|
||||
xor ebx, ebx
|
||||
inc ebx ; 16.1 = save to /FD/1
|
||||
cmp ah, 2
|
||||
je doit
|
||||
inc ebx ; 16.2 = save to /FD/2
|
||||
cmp ah, 3
|
||||
je doit
|
||||
pop ebx
|
||||
push 18
|
||||
mov bl, 6 ; 18.6 = save to specified folder
|
||||
mov ecx, path3
|
||||
cmp ah, 4
|
||||
je doit
|
||||
mov ecx, path4
|
||||
push eax
|
||||
call clear_err
|
||||
pop eax
|
||||
push 16
|
||||
xor ebx, ebx
|
||||
inc ebx ; 16.1 = save to /FD/1
|
||||
cmp ah, 2
|
||||
je doit
|
||||
inc ebx ; 16.2 = save to /FD/2
|
||||
cmp ah, 3
|
||||
je doit
|
||||
pop ebx
|
||||
push 18
|
||||
mov bl, 6 ; 18.6 = save to specified folder
|
||||
mov ecx, path3
|
||||
cmp ah, 4
|
||||
je doit
|
||||
mov ecx, path4
|
||||
doit:
|
||||
pop eax
|
||||
mcall
|
||||
call check_for_error
|
||||
jmp still
|
||||
pop eax
|
||||
mcall
|
||||
call check_for_error
|
||||
jmp still
|
||||
|
||||
key:
|
||||
key:
|
||||
mov al,2
|
||||
mcall
|
||||
; key_edit_box editbox
|
||||
push dword editbox
|
||||
call [edit_box_key]
|
||||
push dword editbox
|
||||
call [edit_box_key]
|
||||
|
||||
jmp still
|
||||
|
||||
|
||||
check_for_error: ;Ž¡à ¡®â稪 ®è¨¡®ª
|
||||
mov ecx, [sc.work_text]
|
||||
mov edx, ok
|
||||
test eax, eax
|
||||
jz print
|
||||
mov ecx, 0xdd2222
|
||||
add edx, error3 - ok
|
||||
dec eax
|
||||
dec eax
|
||||
jz print
|
||||
add edx, error5 - error3
|
||||
dec eax
|
||||
dec eax
|
||||
jz print
|
||||
add edx, error8 - error5
|
||||
dec eax
|
||||
dec eax
|
||||
dec eax
|
||||
jz print
|
||||
add edx, error9 - error8
|
||||
dec eax
|
||||
jz print
|
||||
add edx, error10 - error9
|
||||
dec eax
|
||||
jz print
|
||||
add edx, error11 - error10
|
||||
dec eax
|
||||
jz print
|
||||
add edx, aUnknownError - error11
|
||||
check_for_error: ;Ž¡à ¡®â稪 ®è¨¡®ª
|
||||
mov ecx, [sc.work_text]
|
||||
mov edx, ok
|
||||
test eax, eax
|
||||
jz print
|
||||
mov ecx, 0xdd2222
|
||||
add edx, error3 - ok
|
||||
dec eax
|
||||
dec eax
|
||||
jz print
|
||||
add edx, error5 - error3
|
||||
dec eax
|
||||
dec eax
|
||||
jz print
|
||||
add edx, error8 - error5
|
||||
dec eax
|
||||
dec eax
|
||||
dec eax
|
||||
jz print
|
||||
add edx, error9 - error8
|
||||
dec eax
|
||||
jz print
|
||||
add edx, error10 - error9
|
||||
dec eax
|
||||
jz print
|
||||
add edx, error11 - error10
|
||||
dec eax
|
||||
jz print
|
||||
add edx, aUnknownError - error11
|
||||
|
||||
print:
|
||||
mov eax,4 ; ¤¯¨á¨
|
||||
mov eax,4 ; ¤¯¨á¨
|
||||
mov ebx,20 shl 16 + 148
|
||||
or ecx,0x80000000
|
||||
or ecx,0x80000000
|
||||
mcall
|
||||
ret
|
||||
|
||||
@ -174,25 +174,25 @@ clear_err:
|
||||
|
||||
draw_window:
|
||||
|
||||
mov eax,12 ; äãªæ¨ï 12: á®®¡é¨âì Ž‘ ®¡ ®âà¨á®¢ª¥ ®ª
|
||||
mov bl,1 ; 1 - ç¨ ¥¬ à¨á®¢ âì
|
||||
mov eax,12 ; äãªæ¨ï 12: á®®¡é¨âì Ž‘ ®¡ ®âà¨á®¢ª¥ ®ª
|
||||
mov bl,1 ; 1 - ç¨ ¥¬ à¨á®¢ âì
|
||||
mcall
|
||||
|
||||
; ‘Ž‡„€ðŒ ŽŠ<C5BD>Ž
|
||||
xor eax,eax ; äãªæ¨ï 0 : ®¯à¥¤¥«¨âì ¨ ®âà¨á®¢ âì ®ª®
|
||||
mov ebx,200 shl 16 + 270 ; [x áâ àâ] *65536 + [x à §¬¥à]
|
||||
mov ecx,200 shl 16 + 190 ; [y áâ àâ] *65536 + [y à §¬¥à]
|
||||
mov edx,[sc.work] ; 梥â à ¡®ç¥© ®¡« á⨠RRGGBB,8->color gl
|
||||
; ‘Ž‡„€ðŒ ŽŠ<C5BD>Ž
|
||||
xor eax,eax ; äãªæ¨ï 0 : ®¯à¥¤¥«¨âì ¨ ®âà¨á®¢ âì ®ª®
|
||||
mov ebx,200 shl 16 + 270 ; [x áâ àâ] *65536 + [x à §¬¥à]
|
||||
mov ecx,200 shl 16 + 190 ; [y áâ àâ] *65536 + [y à §¬¥à]
|
||||
mov edx,[sc.work] ; 梥â à ¡®ç¥© ®¡« á⨠RRGGBB,8->color gl
|
||||
or edx,0x34000000
|
||||
mov edi,title ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ<C5BD>€
|
||||
mov edi,title ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ<C5BD>€
|
||||
mcall
|
||||
|
||||
push dword editbox
|
||||
call [edit_box_draw]
|
||||
push dword editbox
|
||||
call [edit_box_draw]
|
||||
|
||||
;draw_edit_box editbox ;à¨á®¢ ¨¥ edit box
|
||||
|
||||
mov al,13 ;®âà¨á®¢ª ⥥© ª®¯®ª
|
||||
mov al,13 ;®âà¨á®¢ª ⥥© ª®¯®ª
|
||||
mov ebx,194 shl 16 + 60
|
||||
mov ecx,34 shl 16 +15
|
||||
mov edx,0x444444
|
||||
@ -207,7 +207,7 @@ draw_window:
|
||||
add ecx,40 shl 16
|
||||
mcall
|
||||
|
||||
mov eax,8 ;®âà¨á®¢ª ª®¯®ª
|
||||
mov eax,8 ;®âà¨á®¢ª ª®¯®ª
|
||||
sub ebx,4 shl 16
|
||||
sub ecx,4 shl 16
|
||||
mov edx,5
|
||||
@ -226,7 +226,7 @@ draw_window:
|
||||
dec edx
|
||||
mcall
|
||||
|
||||
mov al,4 ; ¤¯¨á¨
|
||||
mov al,4 ; ¤¯¨á¨
|
||||
mov ebx,45 shl 16 + 12
|
||||
mov ecx,[sc.work_text]
|
||||
or ecx,0x80000000
|
||||
@ -268,11 +268,11 @@ draw_window:
|
||||
add ebx,40
|
||||
mcall
|
||||
|
||||
mov al,12 ; äãªæ¨ï 12: á®®¡é¨âì Ž‘ ®¡ ®âà¨á®¢ª¥ ®ª
|
||||
mov ebx,2 ; 2, § ª®ç¨«¨ à¨á®¢ âì
|
||||
mov al,12 ; äãªæ¨ï 12: á®®¡é¨âì Ž‘ ®¡ ®âà¨á®¢ª¥ ®ª
|
||||
mov ebx,2 ; 2, § ª®ç¨«¨ à¨á®¢ âì
|
||||
mcall
|
||||
|
||||
ret ; ¢ë室¨¬ ¨§ ¯à®æ¥¤ãàë
|
||||
ret ; ¢ë室¨¬ ¨§ ¯à®æ¥¤ãàë
|
||||
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
@ -286,42 +286,42 @@ edit1 edit_box 170,10,113,0xffffff,0xaabbcc,0,0,0,512,path4,mouse_dd,ed_focus,26
|
||||
editbox_end:
|
||||
|
||||
if lang eq ru
|
||||
save db '‘®åà ¨âì',0
|
||||
label1 db '‚ë¡¥à¨â¥ ®¤¨ ¨§ ¢ ਠ⮢:',0
|
||||
label2 db 'ˆ«¨ ¢¢¥¤¨â¥ ¯®«ë© ¯ãâì ª ä ©«ã:',0
|
||||
label3 db '‚ᥠ¯ ¯ª¨ ¤®«¦ë áãé¥á⢮¢ âì',0
|
||||
ok db 'RAM-¤¨áª á®åà ¥ ãᯥè®',0
|
||||
error3 db '<27>¥¨§¢¥áâ ï ä ©«®¢ ï á¨á⥬ ',0
|
||||
error5 db '<27>¥áãé¥áâ¢ãî騩 ¯ãâì',0
|
||||
error8 db '<27>¥â ¬¥áâ ¤¨áª¥',0
|
||||
error9 db '’ ¡«¨æ FAT à §àãè¥ ',0
|
||||
save db '‘®åà ¨âì',0
|
||||
label1 db '‚ë¡¥à¨â¥ ®¤¨ ¨§ ¢ ਠ⮢:',0
|
||||
label2 db 'ˆ«¨ ¢¢¥¤¨â¥ ¯®«ë© ¯ãâì ª ä ©«ã:',0
|
||||
label3 db '‚ᥠ¯ ¯ª¨ ¤®«¦ë áãé¥á⢮¢ âì',0
|
||||
ok db 'RAM-¤¨áª á®åà ¥ ãᯥè®',0
|
||||
error3 db '<27>¥¨§¢¥áâ ï ä ©«®¢ ï á¨á⥬ ',0
|
||||
error5 db '<27>¥áãé¥áâ¢ãî騩 ¯ãâì',0
|
||||
error8 db '<27>¥â ¬¥áâ ¤¨áª¥',0
|
||||
error9 db '’ ¡«¨æ FAT à §àãè¥ ',0
|
||||
error10 db '„®áâ㯠§ ¯à¥é¥',0
|
||||
error11 db 'Žè¨¡ª ãáâனá⢠',0
|
||||
aUnknownError db '<27>¥¨§¢¥áâ ï ®è¨¡ª ',0
|
||||
else if lang eq et
|
||||
save db 'Salvesta',0
|
||||
label1 db 'Vali üks variantidest:',0
|
||||
label2 db 'Või sisesta teekond failinimeni:',0
|
||||
label3 db 'Kõik kataloogid peavad eksisteerima',0
|
||||
ok db 'RAM-ketas salvestatud edukalt',0
|
||||
error3 db 'Tundmatu failisüsteem',0
|
||||
error5 db 'Vigane teekond',0
|
||||
error8 db 'Ketas täis',0
|
||||
error9 db 'FAT tabel vigane',0
|
||||
save db 'Salvesta',0
|
||||
label1 db 'Vali üks variantidest:',0
|
||||
label2 db 'Või sisesta teekond failinimeni:',0
|
||||
label3 db 'Kõik kataloogid peavad eksisteerima',0
|
||||
ok db 'RAM-ketas salvestatud edukalt',0
|
||||
error3 db 'Tundmatu failisüsteem',0
|
||||
error5 db 'Vigane teekond',0
|
||||
error8 db 'Ketas täis',0
|
||||
error9 db 'FAT tabel vigane',0
|
||||
error10 db 'Juurdepääs keelatud',0
|
||||
error11 db 'Seadme viga',0
|
||||
aUnknownError db 'Tundmatu viga',0
|
||||
|
||||
else
|
||||
save db ' Save',0
|
||||
label1 db 'Select one of the variants:',0
|
||||
label2 db ' Or enter full path to file:',0
|
||||
label3 db ' All folders must exist',0
|
||||
ok db 'RAM-drive was saved successfully',0
|
||||
error3 db 'Unknown file system',0
|
||||
error5 db 'Incorrect path',0
|
||||
error8 db 'Disk is full',0
|
||||
error9 db 'FAT table corrupted',0
|
||||
save db ' Save',0
|
||||
label1 db 'Select one of the variants:',0
|
||||
label2 db ' Or enter full path to file:',0
|
||||
label3 db ' All folders must exist',0
|
||||
ok db 'RAM-drive was saved successfully',0
|
||||
error3 db 'Unknown file system',0
|
||||
error5 db 'Incorrect path',0
|
||||
error8 db 'Disk is full',0
|
||||
error9 db 'FAT table corrupted',0
|
||||
error10 db 'Access denied',0
|
||||
error11 db 'Device error',0
|
||||
aUnknownError db 'Unknown error',0
|
||||
@ -330,37 +330,37 @@ end if
|
||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
;DATA ¤ ë¥
|
||||
;‚ᥣ¤ ᮡ«î¤ âì ¯®á«¥¤®¢ ⥫ì®áâì ¢ ¨¬¥¨.
|
||||
system_path db '/sys/lib/'
|
||||
library_name db 'box_lib.obj',0
|
||||
system_path db '/sys/lib/'
|
||||
library_name db 'box_lib.obj',0
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0
|
||||
err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
err_message_import db 'Error on load import library box_lib.obj',0
|
||||
head_f_l db 'System error',0
|
||||
err_message_import db 'Error on load import library box_lib.obj',0
|
||||
align 4
|
||||
myimport:
|
||||
|
||||
edit_box_draw dd aEdit_box_draw
|
||||
edit_box_key dd aEdit_box_key
|
||||
edit_box_mouse dd aEdit_box_mouse
|
||||
edit_box_draw dd aEdit_box_draw
|
||||
edit_box_key dd aEdit_box_key
|
||||
edit_box_mouse dd aEdit_box_mouse
|
||||
;version_ed dd aVersion_ed
|
||||
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
aEdit_box_mouse db 'edit_box_mouse',0
|
||||
;aVersion_ed db 'version_ed',0
|
||||
|
||||
|
||||
;mouse_flag: dd 0x0
|
||||
|
||||
path1 db '/fd/1/',0
|
||||
path2 db '/fd/2/',0
|
||||
path3 db '/hd0/1/kolibri.img',0
|
||||
path4 db '/hd0/1/kolibri/kolibri.img',0 ;¤«ï १¥à¢®£® á®åà ¥¨ï
|
||||
path1 db '/fd/1/',0
|
||||
path2 db '/fd/2/',0
|
||||
path3 db '/hd0/1/kolibri.img',0
|
||||
path4 db '/hd0/1/kolibri/kolibri.img',0 ;¤«ï १¥à¢®£® á®åà ¥¨ï
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
@ -368,8 +368,8 @@ rb 514
|
||||
|
||||
sc system_colors
|
||||
mouse_dd rd 1
|
||||
cur_dir_path rb 1096
|
||||
library_path rb 1096
|
||||
cur_dir_path rb 1096
|
||||
library_path rb 1096
|
||||
align 4
|
||||
rb 0x100 ; for stack
|
||||
I_END: ; ¬¥âª ª®æ ¯à®£à ¬¬ë
|
||||
rb 0x100 ; for stack
|
||||
I_END: ; ¬¥âª ª®æ ¯à®£à ¬¬ë
|
||||
|
@ -8,14 +8,14 @@ window_x=640
|
||||
;--- ¤à㣨¥ ¬ ªà®áë ---
|
||||
;include '../../../develop/examples/editbox/trunk/editbox.inc'
|
||||
include '../../../develop/libraries/box_lib/load_lib.mac'
|
||||
include '../../../develop/libraries/box_lib/asm/trunk/editbox_ex.mac'
|
||||
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
;include 'editbox.inc'
|
||||
include 'txtbut.inc'
|
||||
include '../../../macros.inc'
|
||||
;include 'macros.inc'
|
||||
include 'run.mac'
|
||||
include 'lang.inc'
|
||||
use32
|
||||
use32
|
||||
org 0x0
|
||||
db 'MENUET01'
|
||||
dd 0x1
|
||||
@ -30,212 +30,212 @@ use32
|
||||
; meos_app_start
|
||||
; use_edit_box
|
||||
@use_library
|
||||
use_txt_button
|
||||
use_txt_button
|
||||
; code
|
||||
;load system lib
|
||||
align 4
|
||||
start:
|
||||
sys_load_library library_name, cur_dir_path, library_path, system_path, \
|
||||
err_message_found_lib, head_f_l, myimport, err_message_import, head_f_i
|
||||
cmp eax,-1
|
||||
jz close
|
||||
cmp eax,-1
|
||||
jz close
|
||||
|
||||
cmp [par],byte 0
|
||||
jne read_par
|
||||
mcall 40,EVM_MOUSE+EVM_BUTTON+EVM_KEY+EVM_REDRAW
|
||||
cmp [par],byte 0
|
||||
jne read_par
|
||||
mcall 40,EVM_MOUSE+EVM_BUTTON+EVM_KEY+EVM_REDRAW
|
||||
red:
|
||||
mcall 48,3,sc,40
|
||||
edit_boxes_set_sys_color input_fn,input_fn_end,sc
|
||||
set_sys_colors_txt_button run_but,sc
|
||||
push dword [sc.work_graph]
|
||||
pop [input_fn.focus_border_color]
|
||||
call draw_window
|
||||
still: ;®á®¢®© ®¡à ¡®â稪
|
||||
mcall 10 ;Ž¦¨¤ âì ᮡëâ¨ï
|
||||
dec eax
|
||||
jz red
|
||||
dec eax
|
||||
jz key
|
||||
dec eax
|
||||
jz button
|
||||
mcall 48,3,sc,40
|
||||
edit_boxes_set_sys_color input_fn,input_fn_end,sc
|
||||
set_sys_colors_txt_button run_but,sc
|
||||
push dword [sc.work_graph]
|
||||
pop [input_fn.focus_border_color]
|
||||
call draw_window
|
||||
still: ;®á®¢®© ®¡à ¡®â稪
|
||||
mcall 10 ;Ž¦¨¤ âì ᮡëâ¨ï
|
||||
dec eax
|
||||
jz red
|
||||
dec eax
|
||||
jz key
|
||||
dec eax
|
||||
jz button
|
||||
; mouse_edit_box input_fn
|
||||
push dword input_fn
|
||||
call [edit_box_mouse]
|
||||
push dword input_fn
|
||||
call [edit_box_mouse]
|
||||
|
||||
jmp still ;¥á«¨ ¨ç¥£® ¨§ ¯¥à¥ç¨á«¥®£® ⮠ᮢ ¢ 横«
|
||||
jmp still ;¥á«¨ ¨ç¥£® ¨§ ¯¥à¥ç¨á«¥®£® ⮠ᮢ ¢ 横«
|
||||
key:
|
||||
mcall 2
|
||||
cmp ah,13
|
||||
je run
|
||||
mcall 2
|
||||
cmp ah,13
|
||||
je run
|
||||
; key_edit_box input_fn
|
||||
push dword input_fn
|
||||
call [edit_box_key]
|
||||
push dword input_fn
|
||||
call [edit_box_key]
|
||||
|
||||
jmp still
|
||||
jmp still
|
||||
button:
|
||||
mcall 17
|
||||
dec ah
|
||||
jz close
|
||||
dec ah
|
||||
jz run
|
||||
jmp still
|
||||
mcall 17
|
||||
dec ah
|
||||
jz close
|
||||
dec ah
|
||||
jz run
|
||||
jmp still
|
||||
|
||||
read_par:
|
||||
mov esi,par
|
||||
mov edi,fn
|
||||
mov ecx,256
|
||||
rep movsb
|
||||
mov esi,par
|
||||
mov edi,fn
|
||||
mov ecx,256
|
||||
rep movsb
|
||||
run:
|
||||
xor eax,eax
|
||||
mov edi,file_info.name
|
||||
mov ecx,512
|
||||
rep stosb
|
||||
mov edi,run_par
|
||||
mov ecx,256
|
||||
rep stosb
|
||||
xor eax,eax
|
||||
mov edi,file_info.name
|
||||
mov ecx,512
|
||||
rep stosb
|
||||
mov edi,run_par
|
||||
mov ecx,256
|
||||
rep stosb
|
||||
|
||||
mov esi,fn
|
||||
mov edi,file_info.name
|
||||
cmp [esi],byte '"'
|
||||
je copy_fn_with_spaces
|
||||
mov esi,fn
|
||||
mov edi,file_info.name
|
||||
cmp [esi],byte '"'
|
||||
je copy_fn_with_spaces
|
||||
copy_fn:
|
||||
cmp [esi],byte ' '
|
||||
je .stop
|
||||
cmp [esi],byte 0
|
||||
je .stop
|
||||
mov al,[esi]
|
||||
mov [edi],al
|
||||
inc esi
|
||||
inc edi
|
||||
jmp copy_fn
|
||||
cmp [esi],byte ' '
|
||||
je .stop
|
||||
cmp [esi],byte 0
|
||||
je .stop
|
||||
mov al,[esi]
|
||||
mov [edi],al
|
||||
inc esi
|
||||
inc edi
|
||||
jmp copy_fn
|
||||
.stop:
|
||||
|
||||
jmp copy_par
|
||||
jmp copy_par
|
||||
|
||||
copy_fn_with_spaces:
|
||||
inc esi
|
||||
inc esi
|
||||
@@:
|
||||
cmp [esi],byte '"'
|
||||
je .stop
|
||||
cmp [esi],byte 0
|
||||
je .stop
|
||||
mov al,[esi]
|
||||
mov [edi],al
|
||||
inc esi
|
||||
inc edi
|
||||
jmp @b
|
||||
cmp [esi],byte '"'
|
||||
je .stop
|
||||
cmp [esi],byte 0
|
||||
je .stop
|
||||
mov al,[esi]
|
||||
mov [edi],al
|
||||
inc esi
|
||||
inc edi
|
||||
jmp @b
|
||||
.stop:
|
||||
|
||||
copy_par:
|
||||
@@:
|
||||
inc esi
|
||||
cmp [esi],byte ' '
|
||||
je @b
|
||||
mov edi,run_par
|
||||
inc esi
|
||||
cmp [esi],byte ' '
|
||||
je @b
|
||||
mov edi,run_par
|
||||
@@:
|
||||
cmp [esi],byte 0
|
||||
je .stop
|
||||
mov al,[esi]
|
||||
mov [edi],al
|
||||
inc esi
|
||||
inc edi
|
||||
jmp @b
|
||||
cmp [esi],byte 0
|
||||
je .stop
|
||||
mov al,[esi]
|
||||
mov [edi],al
|
||||
inc esi
|
||||
inc edi
|
||||
jmp @b
|
||||
.stop:
|
||||
mcall 70,file_info
|
||||
mcall 70,file_info
|
||||
|
||||
cmp eax,0
|
||||
jl error
|
||||
mov [status],run_ok
|
||||
call draw_status
|
||||
jmp still
|
||||
cmp eax,0
|
||||
jl error
|
||||
mov [status],run_ok
|
||||
call draw_status
|
||||
jmp still
|
||||
close:
|
||||
mcall -1
|
||||
mcall -1
|
||||
|
||||
error:
|
||||
neg eax
|
||||
cmp_err 3,bad_file_sys
|
||||
cmp_err 5,file_not_find
|
||||
cmp_err 9,bad_fat_table
|
||||
cmp_err 10,acces_denyied
|
||||
cmp_err 11,device_error
|
||||
cmp_err 30,out_of_memory
|
||||
cmp_err 31,file_not_executable
|
||||
cmp_err 32,many_processes
|
||||
neg eax
|
||||
cmp_err 3,bad_file_sys
|
||||
cmp_err 5,file_not_find
|
||||
cmp_err 9,bad_fat_table
|
||||
cmp_err 10,acces_denyied
|
||||
cmp_err 11,device_error
|
||||
cmp_err 30,out_of_memory
|
||||
cmp_err 31,file_not_executable
|
||||
cmp_err 32,many_processes
|
||||
|
||||
call draw_status
|
||||
jmp still
|
||||
call draw_status
|
||||
jmp still
|
||||
|
||||
draw_window:
|
||||
mcall 48,5
|
||||
mov si,bx
|
||||
mcall 48,5
|
||||
mov si,bx
|
||||
|
||||
mcall 12,1
|
||||
mcall 48,4
|
||||
mov dx,ax
|
||||
mcall 14
|
||||
xor ecx,ecx
|
||||
sub cx,window_y+2
|
||||
sub cx,dx
|
||||
add cx,si
|
||||
shl ecx,16
|
||||
mov cx,dx
|
||||
add cx,window_y
|
||||
shr eax,16
|
||||
mov bx,ax
|
||||
sub bx,window_x
|
||||
shl ebx,15
|
||||
mov bx,window_x
|
||||
mov edx,[sc.work]
|
||||
or edx,0x33000000
|
||||
xor esi,esi
|
||||
mov edi,grab_text
|
||||
mcall 0
|
||||
mcall 12,1
|
||||
mcall 48,4
|
||||
mov dx,ax
|
||||
mcall 14
|
||||
xor ecx,ecx
|
||||
sub cx,window_y+2
|
||||
sub cx,dx
|
||||
add cx,si
|
||||
shl ecx,16
|
||||
mov cx,dx
|
||||
add cx,window_y
|
||||
shr eax,16
|
||||
mov bx,ax
|
||||
sub bx,window_x
|
||||
shl ebx,15
|
||||
mov bx,window_x
|
||||
mov edx,[sc.work]
|
||||
or edx,0x33000000
|
||||
xor esi,esi
|
||||
mov edi,grab_text
|
||||
mcall 0
|
||||
|
||||
mcall 9,procinfo,-1
|
||||
mcall 9,procinfo,-1
|
||||
|
||||
mov eax,[procinfo.box.width]
|
||||
sub eax,20
|
||||
mov [input_fn.width],eax
|
||||
mov [run_but.width],ax
|
||||
mov eax,[procinfo.box.width]
|
||||
sub eax,20
|
||||
mov [input_fn.width],eax
|
||||
mov [run_but.width],ax
|
||||
|
||||
xor bx,bx
|
||||
shl ebx,16
|
||||
mov bx,ax
|
||||
add bx,10
|
||||
mov cx,45
|
||||
push cx
|
||||
shl ecx,16
|
||||
pop cx
|
||||
mov edx,[sc.work_graph]
|
||||
mcall 38
|
||||
xor bx,bx
|
||||
shl ebx,16
|
||||
mov bx,ax
|
||||
add bx,10
|
||||
mov cx,45
|
||||
push cx
|
||||
shl ecx,16
|
||||
pop cx
|
||||
mov edx,[sc.work_graph]
|
||||
mcall 38
|
||||
; draw_edit_box input_fn
|
||||
push dword input_fn
|
||||
call [edit_box_draw]
|
||||
push dword input_fn
|
||||
call [edit_box_draw]
|
||||
|
||||
draw_txt_button run_but
|
||||
draw_txt_button run_but
|
||||
|
||||
call draw_status_text
|
||||
call draw_status_text
|
||||
|
||||
mcall 12,2
|
||||
mcall 12,2
|
||||
ret
|
||||
|
||||
draw_status:
|
||||
mov ebx,[procinfo.box.width]
|
||||
sub bx,10
|
||||
mov ecx,(50)*65536+12
|
||||
mov edx,[sc.work]
|
||||
mcall 13
|
||||
mov ebx,[procinfo.box.width]
|
||||
sub bx,10
|
||||
mov ecx,(50)*65536+12
|
||||
mov edx,[sc.work]
|
||||
mcall 13
|
||||
draw_status_text:
|
||||
mov edx,[status]
|
||||
xor esi,esi
|
||||
mov edx,[status]
|
||||
xor esi,esi
|
||||
@@:
|
||||
cmp [edx+esi],byte 0
|
||||
je @f
|
||||
inc esi
|
||||
jmp @b
|
||||
cmp [edx+esi],byte 0
|
||||
je @f
|
||||
inc esi
|
||||
jmp @b
|
||||
@@:
|
||||
mov ecx,[sc.work_text]
|
||||
mcall 4,5*65536+(50)
|
||||
mov ecx,[sc.work_text]
|
||||
mcall 4,5*65536+(50)
|
||||
ret
|
||||
|
||||
run_but txt_button 0,5,15,25,2,0,0,run_but_text,
|
||||
@ -245,26 +245,26 @@ input_fn_end:
|
||||
if lang eq ru
|
||||
hello db '‚¢¥¤¨â¥ ¯®«ë© ¯ãâì ª ä ©«ã ¨ ¦¬¨â¥ Enter',0
|
||||
bad_file_sys db '<27>¥¨§¢¥áâ ï ä ©«®¢ ï á¨á⥬ ',0 ; 3
|
||||
file_not_find db '” ©« ¥ ©¤¥',0 ; 5
|
||||
bad_fat_table db '’ ¡«¨æ FAT à §àãè¥ ',0 ; 9
|
||||
acces_denyied db '„®áâ㯠§ ¯à¥é¥',0 ; 10
|
||||
device_error db 'Žè¨¡ª ãáâனá⢠',0 ; 11
|
||||
out_of_memory db '<27>¥¤®áâ â®ç® ¯ ¬ïâ¨',0 ; 30
|
||||
file_not_find db '” ©« ¥ ©¤¥',0 ; 5
|
||||
bad_fat_table db '’ ¡«¨æ FAT à §àãè¥ ',0 ; 9
|
||||
acces_denyied db '„®áâ㯠§ ¯à¥é¥',0 ; 10
|
||||
device_error db 'Žè¨¡ª ãáâனá⢠',0 ; 11
|
||||
out_of_memory db '<27>¥¤®áâ â®ç® ¯ ¬ïâ¨',0 ; 30
|
||||
file_not_executable db '” ©« ¥ ï¥âáï ¨á¯®«ï¥¬ë¬',0 ; 31
|
||||
many_processes db '‘«¨èª®¬ ¬®£® ¯à®æ¥áᮢ',0 ; 32
|
||||
many_processes db '‘«¨èª®¬ ¬®£® ¯à®æ¥áᮢ',0 ; 32
|
||||
run_ok db '<27>à®£à ¬¬ ãá¯¥è® § ¯ãé¥ ',0
|
||||
grab_text db '‡€<E280A1>“‘Š <20><>Žƒ<C5BD>€ŒŒ›',0
|
||||
run_but_text db '‡€<E280A1>“‘’ˆ’œ',0
|
||||
else
|
||||
hello db 'Enter full path to file and press <Enter>',0
|
||||
bad_file_sys db 'Unknown file system',0 ; 3
|
||||
file_not_find db 'File not found',0 ; 5
|
||||
bad_fat_table db 'FAT table corrupted',0 ; 9
|
||||
acces_denyied db 'Access denied',0 ; 10
|
||||
device_error db 'Device error',0 ; 11
|
||||
out_of_memory db 'Out of memory',0 ; 30
|
||||
bad_file_sys db 'Unknown file system',0 ; 3
|
||||
file_not_find db 'File not found',0 ; 5
|
||||
bad_fat_table db 'FAT table corrupted',0 ; 9
|
||||
acces_denyied db 'Access denied',0 ; 10
|
||||
device_error db 'Device error',0 ; 11
|
||||
out_of_memory db 'Out of memory',0 ; 30
|
||||
file_not_executable db 'File is not executable',0 ; 31
|
||||
many_processes db 'Too many processes',0 ; 32
|
||||
many_processes db 'Too many processes',0 ; 32
|
||||
run_ok db 'The program was started successfully',0
|
||||
grab_text db 'RUN',0
|
||||
run_but_text db 'RUN',0
|
||||
@ -274,29 +274,36 @@ status dd hello
|
||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
;DATA ¤ ë¥
|
||||
;‚ᥣ¤ ᮡ«î¤ âì ¯®á«¥¤®¢ ⥫ì®áâì ¢ ¨¬¥¨.
|
||||
system_path db '/sys/lib/'
|
||||
library_name db 'box_lib.obj',0
|
||||
system_path db '/sys/lib/'
|
||||
library_name db 'box_lib.obj',0
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0
|
||||
if lang eq ru
|
||||
err_message_found_lib db 'Žè¨¡ª ¯à¨ ¯®¨áª¥ box_lib.obj',0
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
err_message_import db 'Error on load import library box_lib.obj',0
|
||||
head_f_l db '‘¨á⥬ ï ®è¨¡ª ',0
|
||||
err_message_import db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠box_lib.obj',0
|
||||
else
|
||||
err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
err_message_import db 'Error on load import library box_lib.obj',0
|
||||
end if
|
||||
|
||||
myimport:
|
||||
|
||||
edit_box_draw dd aEdit_box_draw
|
||||
edit_box_key dd aEdit_box_key
|
||||
edit_box_mouse dd aEdit_box_mouse
|
||||
version_ed dd aVersion_ed
|
||||
edit_box_draw dd aEdit_box_draw
|
||||
edit_box_key dd aEdit_box_key
|
||||
edit_box_mouse dd aEdit_box_mouse
|
||||
version_ed dd aVersion_ed
|
||||
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
aEdit_box_mouse db 'edit_box_mouse',0
|
||||
aVersion_ed db 'version_ed',0
|
||||
aVersion_ed db 'version_ed',0
|
||||
|
||||
|
||||
|
||||
@ -319,8 +326,8 @@ par rb 256
|
||||
fn rb 512
|
||||
mouse_dd rd 1
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
cur_dir_path rb 4096
|
||||
library_path rb 4096
|
||||
cur_dir_path rb 4096
|
||||
library_path rb 4096
|
||||
i_end:
|
||||
rb 1024
|
||||
mem:
|
||||
|
Loading…
Reference in New Issue
Block a user