Scol standard library package
0.3.1
Common and usefull functions for all Scol applications
|
Classes | |
struct | CheckList |
Opaque internal structure. You should not call it directly, use API instead ! More... | |
struct | CheckObject |
Opaque internal structure. You should not call it directly, use API instead ! More... | |
Functions | |
_ADDcheckList (cl, iLevel, isRadio, isLeft, szTitle, iflags) | |
Add a check box object in a CheckList object to a given level. More... | |
_APPENDcheckList (cl, isRadio, isLeft, szTitle, iflags) | |
Append a check box object in a CheckList object. More... | |
_CBcheckListChanged (cl, cbfun) | |
Define the callback to the state changed event. More... | |
_CBcheckListDestroy (cl, cbfun, uparam) | |
Define the callback to the destroy event. More... | |
_CBcheckListMove (cl, cbfun, uparam) | |
Define the callback to the move event. More... | |
_CBcheckListPaint (cl, cbfun, uparam) | |
Define the callback to the paint event. More... | |
_CBcheckListSize (cl, cbfun, uparam) | |
Define the callback to the resize event. More... | |
_CBcheckListSubSize (cl, cbfun) | |
Define the callback to the resize event. More... | |
_CHECKcheckListId (cl, iCoId) | |
Return if an indetifier of a check box controls in a CheckList object exists or not. More... | |
_CRcheckList (chn, parent, width, height, withScroll) | |
Create an empty CheckList object. More... | |
_DScheckList (cl) | |
Destroy a CheckList object. More... | |
_EXCHANGEcheckList (cl, iCoId1, iCoId2) | |
Exchange the positions of two check box controls in a CheckList object. More... | |
_GETcheckListCheckedList (cl) | |
Get a list of all checked subcontrols in a CheckList object. More... | |
_GETcheckListCount (cl) | |
Get the number check box controls in a CheckList object. More... | |
_GETcheckListFont (cl) | |
Get the current font object used in a CheckList object. More... | |
_GETcheckListHeight (cl, iHeight) | |
Get the current subcontrol height in a CheckList object. More... | |
_GETcheckListIdFromLevel (cl, iCoId) | |
From a level, get the ID of a check box subcontrol in a CheckList object. More... | |
_GETcheckListIds (cl) | |
Get the list of indentifers of all check box controls in a CheckList object. More... | |
_GETcheckListLevel (cl, iCoId) | |
Get the current level of a subcontrol in a CheckList object. More... | |
_GETcheckListShow (cl, iCoId) | |
Get the visibility of a check box control in a CheckList object. More... | |
_GETcheckListSpacing (cl) | |
Get the current spacing between subcontrols in a CheckList object. More... | |
_GETcheckListState (cl, iCoId) | |
Get the current state of a check box control in a CheckList object. More... | |
_GETcheckListTitle (cl, iCoId) | |
Get the title of a check box control in a CheckList object. More... | |
_GETcheckListUncheckedList (cl) | |
Get a list of all unchecked subcontrols in a CheckList object. More... | |
_GETcheckListWidth (cl, iHeight) | |
Get the current subcontrol width in a CheckList object. More... | |
_MOVEcheckList (cl, newx, newy) | |
Move a CheckList object from its parent window or the desktop. More... | |
_REMOVEcheckList (cl, iCoId) | |
Remove a check box subcontrol in a CheckList object. More... | |
_SETcheckList (cl, iCoId, iState, szTitle, iShown) | |
Set a check box control settings. More... | |
_SETcheckListFont (cl, oFont) | |
Set the font object used in a CheckList object. More... | |
_SETcheckListHeight (cl, iHeight) | |
Set the height of the check box controls in a CheckList object. More... | |
_SETcheckListShow (cl, iCoId, iShown) | |
Set the visibility of a check box control in a CheckList object. More... | |
_SETcheckListSpacing (cl, iSpacing) | |
Set the spacing between check box controls in a CheckList object. More... | |
_SETcheckListState (cl, iCoId, iState) | |
Set the state of a check box control in a CheckList object. More... | |
_SETcheckListTitle (cl, iCoId, szTitle) | |
Set the title of a check box control in a CheckList object. More... | |
_SETcheckListWidth (cl, iWidth) | |
Set the width of the check box controls in a CheckList object. More... | |
_SIZEcheckList (cl, neww, newh) | |
Resize a CheckList object from its parent window or the desktop. More... | |
CL_CHECK () | |
Constante to create a check box control. More... | |
CL_DOWN () | |
Constante to display a 3d border around the control. | |
CL_HIDE () | |
Constante to hide the control. | |
CL_NOSCROLL () | |
Constante to create a control without scroll bar. | |
CL_RADIO () | |
Constante to create a radio box control. More... | |
CL_SCROLL () | |
Constante to add a vertical scroll bar. | |
CL_SHOW () | |
Constante to show the contol. | |
A checkList is a serie of check and/or radio boxes in an unique Scol object.
Package to load : lib/2dos/checkList.pkg
CL_RADIO | ( | ) |
Constante to create a radio box control.
All such sub controls in a CheckList object are dependants : if one is checked, all others are unchecked.
CL_CHECK | ( | ) |
Constante to create a check box control.
Several subcontrol can be checked/unchecked in the same time.
_CRcheckList | ( | chn | , |
parent | , | ||
width | , | ||
height | , | ||
withScroll | |||
) |
Create an empty CheckList object.
A checkList allows to add, remove and modify a list of check boxes.
To (re)define the position from the parent window or the desktop, use _MOVEcheckList.
Prototype : fun [Chn ObjWin I I I] CheckList
Chn | : the channel where the checkList is created |
ObjWin | : the parent window (can be nil) |
I | : the width |
I | : the height |
I | : define if this object has a vertical scroll bar (CL_SCROLL) or not (CL_NOSCROLL). This parameter can not be modified after. |
_DScheckList | ( | cl | ) |
_MOVEcheckList | ( | cl | , |
newx | , | ||
newy | |||
) |
_SIZEcheckList | ( | cl | , |
neww | , | ||
newh | |||
) |
Resize a CheckList object from its parent window or the desktop.
Exactly, it resizes the visible part of the CheckList control (if the control has a vertical scroll bar, for example. If not, the function resizes the control itself).
All the subcontrols (included check controls) are also resized (in their width only).
Prototype : fun [CheckList I I] CheckList
CheckList | : a CheckList object |
I | : the new width >= 1. Can not be nil. |
I | : the new height >= 1. Can not be nil. |
_APPENDcheckList | ( | cl | , |
isRadio | , | ||
isLeft | , | ||
szTitle | , | ||
iflags | |||
) |
Append a check box object in a CheckList object.
The subcontrol is unchecked by default.
If the CheckList has not a scroll bar, the new subcontrol could be outside. If the CheckList has a scroll bar, its height is automatically updated.
Prototype : fun [CheckList I I S I] I
CheckList | : a CheckList object |
I | : subcontrol style : CL_RADIO or CL_CHECK |
I | : 1 to display the title a the left side of the box else 0 (default) |
S | : the title |
I | : a flag : 0 (nothing) or CL_DOWN |
_ADDcheckList | ( | cl | , |
iLevel | , | ||
isRadio | , | ||
isLeft | , | ||
szTitle | , | ||
iflags | |||
) |
Add a check box object in a CheckList object to a given level.
The subcontrol is unchecked by default.
If the CheckList has not a scroll bar, the new subcontrol could be outside. If the CheckList has a scroll bar, its height is automatically updated.
Prototype : fun [CheckList I I S I] I
CheckList | : a CheckList object |
I | : the level (the position) in the CheckList control (first = 0) |
I | : subcontrol style : CL_RADIO or CL_CHECK |
I | : 1 to display the title a the left side of the box else 0 (default) |
S | : the title |
I | : a flag : 0 (nothing) or CL_DOWN |
_REMOVEcheckList | ( | cl | , |
iCoId | |||
) |
_GETcheckListIdFromLevel | ( | cl | , |
iCoId | |||
) |
From a level, get the ID of a check box subcontrol in a CheckList object.
Prototype : fun [CheckList I] I
CheckList | : a CheckList object |
I | : the subcontrol level. A level is the position in the vertical list. The first level is 0 (so the first subcontrol (at the top of the list) is 0). |
_SETcheckList | ( | cl | , |
iCoId | , | ||
iState | , | ||
szTitle | , | ||
iShown | |||
) |
Set a check box control settings.
Prototype : fun [CheckList I I S I] CheckList
CheckList | : a CheckList object |
I | : the subcontrol ID to set |
I | : 1 to check the subcontrol, 0 to uncheck it (other values are ignored) |
S | : the title |
I | : the visibility : CL_SHOW or CL_HIDE (other values are ignored) |
_SETcheckListTitle | ( | cl | , |
iCoId | , | ||
szTitle | |||
) |
_SETcheckListState | ( | cl | , |
iCoId | , | ||
iState | |||
) |
_SETcheckListShow | ( | cl | , |
iCoId | , | ||
iShown | |||
) |
Set the visibility of a check box control in a CheckList object.
Prototype : fun [CheckList I I] CheckList
CheckList | : a CheckList object |
I | : the subcontrol ID to set |
I | : the visibility : CL_SHOW or CL_HIDE (other values are ignored) |
_GETcheckListTitle | ( | cl | , |
iCoId | |||
) |
_GETcheckListShow | ( | cl | , |
iCoId | |||
) |
_GETcheckListState | ( | cl | , |
iCoId | |||
) |
_EXCHANGEcheckList | ( | cl | , |
iCoId1 | , | ||
iCoId2 | |||
) |
Exchange the positions of two check box controls in a CheckList object.
_GETcheckListIds | ( | cl | ) |
_CHECKcheckListId | ( | cl | , |
iCoId | |||
) |
_GETcheckListCount | ( | cl | ) |
_SETcheckListSpacing | ( | cl | , |
iSpacing | |||
) |
_GETcheckListSpacing | ( | cl | ) |
_SETcheckListHeight | ( | cl | , |
iHeight | |||
) |
_GETcheckListHeight | ( | cl | , |
iHeight | |||
) |
_SETcheckListWidth | ( | cl | , |
iWidth | |||
) |
Set the width of the check box controls in a CheckList object.
The CheckList control is NOT resized if the new width is lesser. It is greater than the current CheckList control width, the CheckList control is resized. In this case, the new CheckList control width is the new subcontrol width + two spacing (at the left and the right).
Prototype : fun [CheckList I] CheckList
_GETcheckListWidth | ( | cl | , |
iHeight | |||
) |
_SETcheckListFont | ( | cl | , |
oFont | |||
) |
_GETcheckListFont | ( | cl | ) |
_GETcheckListLevel | ( | cl | , |
iCoId | |||
) |
Get the current level of a subcontrol in a CheckList object.
A level gives the position of the subcontrol in the CheckList.
Prototype : fun [CheckList I] ObjFont
_GETcheckListCheckedList | ( | cl | ) |
Get a list of all checked subcontrols in a CheckList object.
Prototype : fun [CheckList] [[I I] r1]
A level gives the position of the subcontrol in the CheckList.
_GETcheckListUncheckedList | ( | cl | ) |
Get a list of all unchecked subcontrols in a CheckList object.
Prototype : fun [CheckList] [[I I] r1]
A level gives the position of the subcontrol in the CheckList.
_CBcheckListSize | ( | cl | , |
cbfun | , | ||
uparam | |||
) |
Define the callback to the resize event.
When the CheckList control is resized, the defined reflex will be called.
Prototype : fun [CheckList fun [CheckList u0 I I] I u0] CheckList
_CBcheckListSubSize | ( | cl | , |
cbfun | |||
) |
Define the callback to the resize event.
When the check box subcontrols are resized, the defined reflex will be called.
Prototype : fun [CheckList fun [CheckList I I] I] CheckList
CheckList | : a CheckList object |
fun | [CheckList I I] I : the callback. Additional argument are the new width and the new height |
To set an 'use parameter', you should add a mkfun3 function ...
_CBcheckListMove | ( | cl | , |
cbfun | , | ||
uparam | |||
) |
Define the callback to the move event.
When the CheckList control moves, the defined reflex will be called.
Prototype : fun [CheckList fun [CheckList u0 I I] I u0] CheckList
_CBcheckListDestroy | ( | cl | , |
cbfun | , | ||
uparam | |||
) |
_CBcheckListPaint | ( | cl | , |
cbfun | , | ||
uparam | |||
) |
_CBcheckListChanged | ( | cl | , |
cbfun | |||
) |
Define the callback to the state changed event.
When the state of a check box subcontrols changes, the defined reflex will be called.
Prototype : fun [CheckList fun [CheckList I I] I] CheckList
CheckList | : a CheckList object |
fun | [CheckList I I] I : the callback. Additional argument are the ID of subcontrol and its new state |
To set an 'use parameter', you should add a mkfun3 function ...