/programs/develop/libGUI/examples/bookmarks/bookmark.asm |
---|
56,10 → 56,10 |
call _ksys_cofflib_getproc |
mov [resize_component],eax |
push fnRemoveComponent |
push fnMoveComponent |
push [myexport] |
call _ksys_cofflib_getproc |
mov [remove_component],eax |
mov [move_component],eax |
push fnCraeteButton |
push [myexport] |
235,7 → 235,7 |
;init bookmark |
mov ecx,[ColorsTable+8] |
mov [Bookmark.type],byte 10000001b |
mov [Bookmark.type],byte 10100001b |
mov [Bookmark.x],10 |
mov [Bookmark.y],10 |
mov [Bookmark.sizex],350 |
302,7 → 302,7 |
push 340;270 |
push 120;250 |
push ebx |
call [remove_component] |
call [move_component] |
;send message 1 for redrawing ALL controls |
mov [Message],dword 1 |
540,7 → 540,7 |
fnDestroyControl db 'DestroyControl',0 |
fnSendMessage db 'SendMessage',0 |
fnResizeComponent db 'ResizeComponent',0 |
fnRemoveComponent db 'RemoveComponent',0 |
fnMoveComponent db 'MoveComponent',0 |
fnCraeteButton db 'CraeteButton',0 |
fnCraeteScroller db 'CraeteScroller',0 |
fnCraeteBookmark db 'CraeteBookmark',0 |
556,7 → 556,7 |
destroy_control dd 0 |
send_message dd 0 |
resize_component dd 0 |
remove_component dd 0 |
move_component dd 0 |
craete_button dd 0 |
craete_scroller dd 0 |
craete_bookmark dd 0 |
/programs/develop/libGUI/examples/progress_bar/progress_bar.asm |
---|
51,6 → 51,11 |
call _ksys_cofflib_getproc |
mov [send_message],eax |
push fnActivateTrapForSpecializedMessage |
push [myexport] |
call _ksys_cofflib_getproc |
mov [activate_trap_for_specialized_message],eax |
push fnCraeteButton |
push [myexport] |
call _ksys_cofflib_getproc |
125,9 → 130,11 |
mov ebx,[progress] |
mov eax,[PointerToControlForProgressBar] |
mov [eax+44],byte 1b |
mov [eax+44+26],ebx |
push eax |
call [activate_trap_for_specialized_message] |
fld [progress_step] |
fld [progress] |
fadd st0,st1 |
139,9 → 146,11 |
mov [progress],0.02 |
mov eax,[PointerToControlForProgressBar] |
mov [eax+44],byte 10000001b |
mov [eax+44+26],dword 0.02 |
push eax |
call [activate_trap_for_specialized_message] |
mov [Message],dword 1 |
push Message |
push Parend |
345,6 → 354,7 |
fnSendMessage db 'SendMessage',0 |
fnCraeteButton db 'CraeteButton',0 |
fnCraeteProgressbar db 'CraeteProgressbar',0 |
fnActivateTrapForSpecializedMessage db 'ActivateTrapForSpecializedMessage',0 |
myexport dd 0 |
354,6 → 364,8 |
craete_progress_bar dd 0 |
activate_trap_for_specialized_message dd 0 |
PointerToControlForButtonExit dd 0 |
PointerToControlForProgressBar dd 0 |
/programs/develop/libGUI/src/remove_component.inc |
---|
File deleted |
/programs/develop/libGUI/src/VERSION.INC |
---|
11,6 → 11,6 |
get_version: |
xor eax,eax |
mov eax,dword 071014 ;07.10.13 |
mov eax,dword 071119 ;07.11.19 |
ret |
/programs/develop/libGUI/src/activate_trap.inc |
---|
0,0 → 1,16 |
;******************************************************* |
;*Function activate a trap for the specialized message.* |
;******************************************************* |
;IN |
;void ActivateTrapForSpecializedMessage(dword *control) |
activate_trap_for_specialized_message: |
mov ebx,[esp+4] |
xor eax,eax |
mov al,[ebx+control_header_size] |
or al,activate_trap |
mov [ebx+control_header_size],al |
ret 4 |
/programs/develop/libGUI/src/bookmark.inc |
---|
1,6 → 1,6 |
zk_redraw_all_Bookmark = 1000000b |
zk_redraw_all_Bookmark_off = 10111111b |
zk_redraw_all_Bookmark = 00100000b |
zk_redraw_all_Bookmark_off = 11011111b |
zk_init_Bookmark = 10000000b |
zk_init_Bookmark_off = 01111111b |
zk_child_button_type = 10001001b |
/programs/develop/libGUI/src/button.inc |
---|
1,16 → 1,16 |
;button's types |
bt_check_text_type = 1b |
bt_check_picture_type = 10b |
bt_check_picture_text_type = 100b |
bt_no_draw = 1000b |
bt_check_3D_type = 10000b |
bt_check_text_type = 00000001b |
bt_check_picture_type = 00000010b |
bt_check_picture_text_type = 00000100b |
bt_no_draw = 00001000b |
bt_check_3D_type = 00010000b |
bt_check_full_redraw = 10000000b |
bt_full_redraw_off = 1111111b |
bt_full_redraw_off = 01111111b |
;button's flags |
bt_crossing = 1b |
bt_crossing_pressing = 11b |
bt_crossing = 00000001b |
bt_crossing_pressing = 00000011b |
bt_crossing_pressing_off = 11111100b |
bt_control_data_size = 50 |
/programs/develop/libGUI/src/check_box.inc |
---|
136,6 → 136,9 |
no_redraw_all_check_box: |
cmp [eax],dword 3 |
je exit_check_box |
cmp [eax],dword 6 |
jne no_mouse_check_box |
/programs/develop/libGUI/src/edit_box.inc |
---|
182,6 → 182,9 |
.no_keys_edit_box: |
cmp [eax],dword 3 |
je exit_edit_box |
;events of mouse for EditBox |
cmp [eax],dword 6 |
/programs/develop/libGUI/src/image.inc |
---|
2,8 → 2,8 |
im_control_data_size = 26 |
im_redraw_all = 10000000b |
im_redraw_all_off = 01111111b |
im_special_redraw_on = 1b |
im_special_redraw_off = 11111110b |
;im_special_redraw_on = 00000001b |
;im_special_redraw_off = 11111110b |
;**************************************************** |
;*******************craete Image********************** |
87,11 → 87,11 |
xor eax,eax |
mov al,[Image.type] |
and al,im_special_redraw_on |
and al,activate_trap |
test al,al |
jz no_activate_redraw_image |
and [Image.type],im_special_redraw_off |
and [Image.type],deactivate_trap |
or [Image.type],im_redraw_all |
no_activate_redraw_image: |
/programs/develop/libGUI/src/libGUI.asm |
---|
1,7 → 1,7 |
;********************************************************************** |
; library of Graphics Universal Interface for Kolibri operation system |
; |
; version 071001 |
; version 071119 |
; 2007 year |
; |
;autors: |
8,8 → 8,9 |
; |
;andrew_programmer polynki@mail.ru |
; |
;menegement of controls : destroy_control, send_message |
;GUI components : button,scroller,Bookmark,text,image,number,progres bar |
;menegement of controls : destroy_control, send_message,move_component |
; resize_component,activate_trap_for_specialized_message |
;GUI components : button,scroller,Bookmark,text,image,number,progres_bar |
; |
;<Lrz> and Maxxxx32 |
; |
25,6 → 26,9 |
border_width = 5 |
activate_trap = 01000000b |
deactivate_trap = 10111111b |
section '.flat' code readable align 16 |
include 'macros.inc' |
70,9 → 74,12 |
;function for resize GUI component |
include 'resize_component.inc' |
;function for remove GUI component |
include 'remove_component.inc' |
;function for move GUI component |
include 'move_component.inc' |
;function for activate trap for specialized messages |
include 'activate_trap.inc' |
align 16 |
EXPORTS: |
dd szDestroyControl,destroy_control |
79,7 → 86,8 |
dd szSendMessage,send_message |
dd szVersion,get_version |
dd szResizeComponent,resize_component |
dd szRemoveComponent,remove_component |
dd szMoveComponent,move_component |
dd szActivateTrap,activate_trap_for_specialized_message |
dd szcraeteButton,craete_button |
dd szcraeteScroller,craete_scroller |
dd szcraeteBookmark,craete_Bookmark |
95,7 → 103,8 |
szSendMessage db 'SendMessage',0 |
szVersion db 'Version',0 |
szResizeComponent db 'ResizeComponent',0 |
szRemoveComponent db 'RemoveComponent',0 |
szMoveComponent db 'MoveComponent',0 |
szActivateTrap db 'ActivateTrapForSpecializedMessage',0 |
szcraeteButton db 'CraeteButton',0 |
szcraeteScroller db 'CraeteScroller',0 |
szcraeteBookmark db 'CraeteBookmark',0 |
/programs/develop/libGUI/src/move_component.inc |
---|
0,0 → 1,24 |
;**************************************************** |
;*****************move of GUI component************** |
;**************************************************** |
;IN |
;MoveComponent(dword Parend,dword Control,dword newx,dword newy) |
;newy |
;newx |
;Control |
;Parend |
;OUT |
;not |
align 4 |
move_component: |
mov ebx,[esp+4] ;Control |
mov ecx,[esp+8] ;new x |
mov edx,[esp+12] ;new y |
mov [ebx+24],ecx |
mov [ebx+28],edx |
ret 12 |
/programs/develop/libGUI/src/number.inc |
---|
2,10 → 2,10 |
nm_control_data_size = 22 |
nm_redraw_all = 10000000b |
nm_redraw_off = 01111111b |
nm_special_redraw_on = 100b |
nm_special_redraw_off = 11111011b |
nm_integer_type = 10b |
nm_no_show_number = 1b |
;nm_special_redraw_on = 00000100b |
;nm_special_redraw_off = 11111011b |
nm_integer_type = 00000010b |
nm_no_show_number = 00000001b |
;**************************************************** |
;********************craete Number********************** |
92,12 → 92,12 |
xor ebx,ebx |
mov bl,[Number.type] |
and bl,nm_special_redraw_on |
and bl,activate_trap |
test bl,bl |
jz no_special_message_for_number |
or [Number.type],nm_redraw_all |
and [Number.type],nm_special_redraw_off |
and [Number.type],deactivate_trap |
no_special_message_for_number: |
/programs/develop/libGUI/src/progress_bar.inc |
---|
2,8 → 2,8 |
pb_control_data_size = 34 |
pb_redraw_all = 10000000b |
pb_redraw_all_off = 01111111b |
pb_special_progress_on = 1b |
pb_special_progress_off = 11111110b |
;pb_special_progress_on = 00000001b |
;pb_special_progress_off = 11111110b |
;**************************************************** |
;****************craete ProgressBar******************** |
109,8 → 109,19 |
cmp [eax],dword 3 |
jne no_special_message_progress_bar |
or [ProgressBar.type],pb_special_progress_on |
xor eax,eax |
mov al,[ProgressBar.type] |
and al,activate_trap |
test al,al |
jz no_draw_progress_bar |
and [ProgressBar.type],deactivate_trap |
call draw_progress |
no_draw_progress_bar: |
jmp exit_progress_bar |
no_special_message_progress_bar: |
xor eax,eax |
127,18 → 138,7 |
no_draw_all_progress_bar: |
xor eax,eax |
mov al,[ProgressBar.type] |
and al,pb_special_progress_on |
test al,al |
jz no_draw_progress_bar |
and [ProgressBar.type],pb_special_progress_off |
call draw_progress |
no_draw_progress_bar: |
exit_progress_bar: |
ret 8 |
/programs/develop/libGUI/src/scroller.inc |
---|
1,20 → 1,21 |
;scroller's flags |
sc_check_vertical = 1b |
sc_check_horizontal = 10b |
sc_check_init_child_buttons = 100b |
sc_check_3D_type = 10000b |
sc_scroll_bar_move = 100000b |
sc_active = 1000000b |
sc_check_vertical = 00000001b |
sc_check_horizontal = 00000010b |
sc_check_init_child_buttons = 00000100b |
sc_active = 00001000b |
sc_check_3D_type = 00010000b |
sc_scroll_bar_move = 00100000b |
sc_redraw = 10000000b |
sc_redraw_off = 01111111b |
sc_full_redraw = 11100000b |
sc_full_redraw = 10101000b |
sc_scroll_bar_move_off = 11011111b |
sc_move_active_off = 10011111b |
sc_move_active_off = 11010111b |
sc_first_child_button_pressed = 1b |
sc_first_child_button_pressed = 00000001b |
sc_first_child_button_pressed_off = 11111110b |
sc_second_child_button_pressed = 10000b |
sc_second_child_button_pressed = 00010000b |
sc_second_child_button_pressed_off = 11101111b |
sc_control_data_size = 29 |
/programs/develop/libGUI/src/text.inc |
---|
1,9 → 1,9 |
tx_control_data_size = 22 |
tx_no_show_text = 1b |
tx_no_show_text = 00000001b |
tx_redraw_all = 10000000b |
tx_redraw_all_off = 01111111b |
tx_special_redraw_on = 100b |
tx_special_redraw_on = 00000100b |
tx_special_redraw_off = 11111011b |
;**************************************************** |
/programs/develop/libGUI/whats new.txt |
---|
0,0 → 1,66 |
19.11.07 |
RUSSIAN |
Ôóíêöèÿ RemoveComponent ïåðåèìåíîâàíà â MoveComponent. |
Äîáàâëåíà íîâàÿ ôóíêöèÿ. |
void ActivateTrapForSpecializedMessage(dword *control) - àêòèâèðîâàòü ëîâóøêó äëÿ ñïåöèàëèçèðîâàííûõ ñîîáùåíèé. |
ENGLISH |
Function RemoveComponent is renamed in MoveComponent. |
New function is added. |
void ActivateTrapForSpecializedMessage (dword *control) - to activate a trap for the specialized messages. |
15.10.07 |
RUSSIAN |
Âûøëà íîâàÿ âåðñèÿ áèáëèîòåêè libGUI. |
×òî íîâîãî â ýòîé âåðñèè: |
1) Ïåðåäà÷à ïàðàìåòðîâ ôóíêöèÿì áèáëèîòåêè ïåðåïèñàíà íà êîíâåíöèþ stdcall. |
2)Òåïåðü ôóíêöèè ëèíêóþòñÿ ïî èìåíàì. |
3)Òåïåðü, åñëè íàâåñòè ìûøü íà êîìïîíåíò è íàæàòü ëåâóþ êíîïêó ìûøè, òî âñå ñîîáùåíèÿ îò |
ìûøè ïîñûëàþòñÿ òîëüêî ýòîìó êîìïîíåíòó.Åñëè îòïóñòèòü ëåâóþ êíîïêó ìûøè, òî ñîîáùåíèÿ îò |
ìûøè âíîâü ñòàíîâÿòñÿ äîñòóïíûìè äëÿ âñåõ êîìïîíåíòîâ. |
4) Â áèáëèîòåêó äîáàâëåíû íîâûå ôóíêöèè. |
int Version(void) - ïîëó÷èòü âåðñèþ áèáëèîòåêè. Âåðñèÿ âîçâðàùàåòñÿ â ôîðìàòå: ãîä + ìåñÿö + äåíü . Òåêóùàÿ |
áèáëèîòåêà èìååò âåðñèþ 071014. |
void RemoveComponent(void *Control,int new_x,int new_y) - ïåðåìåùàåò êîìïîíåíò â íîâûå êîîðäèíàòû. |
void ResizeComponent(void *Control,int new_sizex,int new_sizey) - èçìåíÿåò ðàçìåð êîìïîíåíòà. |
Ïðèìåðû èñïîëüçîâàíèÿ ýòèõ ôóíêöèé ñìîòðèòå â ïðèìåðå Bookmark. |
5)Äîáàâëåí ïðèìåð ðàáîòû ñ libGUI â ÿçûêå ïðîãðàììèðîâàíèÿ C. Ýòîò ïðèìåð ÿâëÿåòñÿ ÷àñòüþ èíòåðôåéñà íàïèñàííîãî |
ìíîé äëÿ ìîåé íàó÷íîé ïðîãðàììû. |
ENGLISH |
14.10.07 |
The new version of library libGUI has left. |
That new in this version: |
1) Transfer of parameters to functions of library is copied on the convention stdcall. |
2) Now functions link on names. |
3)Now, if to guide the mouse on a component and to press the left button of the mouse all |
messages from the mouse are sent only to this component.If to release(let off) the left |
button of the mouse messages from the mouse again become accessible to all components. |
4) In library new functions are added. |
int Version (void) - to receive the version of library. The version comes back in a format: year + month + day. |
The current library has version 71014. |
void RemoveComponent (void *Control, int new_x, int new_y) - moves a component to new coordinates. |
void ResizeComponent (void *Control, int new_sizex, int new_sizey) - changes the size of a component. |
Examples of use of these functions look in example Bookmark. |
5) The example of work with libGUI in programming language C is added. This example is a part of the interface |
written by me for my scientific program. |