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. | |
_APPENDcheckList (cl, isRadio, isLeft, szTitle, iflags) | |
Append a check box object in a CheckList object. | |
_CBcheckListChanged (cl, cbfun) | |
Define the callback to the state changed event. | |
_CBcheckListDestroy (cl, cbfun, uparam) | |
Define the callback to the destroy event. | |
_CBcheckListMove (cl, cbfun, uparam) | |
Define the callback to the move event. | |
_CBcheckListPaint (cl, cbfun, uparam) | |
Define the callback to the paint event. | |
_CBcheckListSize (cl, cbfun, uparam) | |
Define the callback to the resize event. | |
_CBcheckListSubSize (cl, cbfun) | |
Define the callback to the resize event. | |
_CHECKcheckListId (cl, iCoId) | |
Return if an indetifier of a check box controls in a CheckList object exists or not. | |
_CRcheckList (chn, parent, width, height, withScroll) | |
Create an empty CheckList object. | |
_DScheckList (cl) | |
Destroy a CheckList object. | |
_EXCHANGEcheckList (cl, iCoId1, iCoId2) | |
Exchange the positions of two check box controls in a CheckList object. | |
_GETcheckListCheckedList (cl) | |
Get a list of all checked subcontrols in a CheckList object. | |
_GETcheckListCount (cl) | |
Get the number check box controls in a CheckList object. | |
_GETcheckListFont (cl) | |
Get the current font object used in a CheckList object. | |
_GETcheckListHeight (cl, iHeight) | |
Get the current subcontrol height in a CheckList object. | |
_GETcheckListIdFromLevel (cl, iCoId) | |
From a level, get the ID of a check box subcontrol in a CheckList object. | |
_GETcheckListIds (cl) | |
Get the list of indentifers of all check box controls in a CheckList object. | |
_GETcheckListLevel (cl, iCoId) | |
Get the current level of a subcontrol in a CheckList object. | |
_GETcheckListShow (cl, iCoId) | |
Get the visibility of a check box control in a CheckList object. | |
_GETcheckListSpacing (cl) | |
Get the current spacing between subcontrols in a CheckList object. | |
_GETcheckListState (cl, iCoId) | |
Get the current state of a check box control in a CheckList object. | |
_GETcheckListTitle (cl, iCoId) | |
Get the title of a check box control in a CheckList object. | |
_GETcheckListUncheckedList (cl) | |
Get a list of all unchecked subcontrols in a CheckList object. | |
_GETcheckListWidth (cl, iHeight) | |
Get the current subcontrol width in a CheckList object. | |
_MOVEcheckList (cl, newx, newy) | |
Move a CheckList object from its parent window or the desktop. | |
_REMOVEcheckList (cl, iCoId) | |
Remove a check box subcontrol in a CheckList object. | |
_SETcheckList (cl, iCoId, iState, szTitle, iShown) | |
Set a check box control settings. | |
_SETcheckListFont (cl, oFont) | |
Set the font object used in a CheckList object. | |
_SETcheckListHeight (cl, iHeight) | |
Set the height of the check box controls in a CheckList object. | |
_SETcheckListShow (cl, iCoId, iShown) | |
Set the visibility of a check box control in a CheckList object. | |
_SETcheckListSpacing (cl, iSpacing) | |
Set the spacing between check box controls in a CheckList object. | |
_SETcheckListState (cl, iCoId, iState) | |
Set the state of a check box control in a CheckList object. | |
_SETcheckListTitle (cl, iCoId, szTitle) | |
Set the title of a check box control in a CheckList object. | |
_SETcheckListWidth (cl, iWidth) | |
Set the width of the check box controls in a CheckList object. | |
_SIZEcheckList (cl, neww, newh) | |
Resize a CheckList object from its parent window or the desktop. | |
CL_CHECK () | |
Constante to create a check box control. | |
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. | |
CL_SCROLL () | |
Constante to add a vertical scroll bar. | |
CL_SHOW () | |
Constante to show the contol. |
Detailed Description
A checkList is a serie of check and/or radio boxes in an unique Scol object.
Package to load : lib/2dos/checkList.pkg
Function Documentation
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
- Parameters
-
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.
- Returns
- CheckList : The new CheckList object or nil if an error occurs (null channel or bad settings)
- See Also
- _MOVEcheckList
- _ADDcheckList to add a check control
_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
- Parameters
-
CheckList : a CheckList object I : the new width >= 1. Can not be nil. I : the new height >= 1. Can not be nil.
- See Also
- _SETcheckListHeight to define the height of each included subcontrol.
_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
- Parameters
-
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
- Returns
- I : the subcontrol identifier or nil if an error occurs. This ID allows to manage this subcontrol from this API.
_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
- Parameters
-
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
- Returns
- I : the identifier of the new subcontrol or nil if an error occurs. This ID allows to manage this subcontrol from this API.
_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
- Parameters
-
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).
- Returns
- I : the ID or nil if an error occurs (typically, a bad level).
- See Also
- _GETcheckListLevel to get the level from the ID.
_SETcheckList | ( | cl | , |
iCoId | , | ||
iState | , | ||
szTitle | , | ||
iShown | |||
) |
Set a check box control settings.
Prototype : fun [CheckList I I S I] CheckList
- Parameters
-
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
- Parameters
-
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
- See Also
- _SIZEcheckList to resize the CheckList control itself
_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
- Returns
- I : the current position of the subcontrol (0 is the first subcontrol) or nil if an error occurs.
- See Also
- _EXCHANGEcheckList to move this position
_GETcheckListCheckedList | ( | cl | ) |
Get a list of all checked subcontrols in a CheckList object.
Prototype : fun [CheckList] [[I I] r1]
- Returns
- [[I I] r1] : a list of tuples. For each tuple : first is the ID subcontrol, second is the level subcontrol. Or nil if an error occurs.
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]
- Returns
- [[I I] r1] : a list of tuples. For each tuple : first is the ID subcontrol, second is the level subcontrol. Or nil if an error occurs.
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
- Parameters
-
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
- Parameters
-
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 ...
Generated on Sat Jan 31 2015 19:15:43 for Scol standard library package by 1.8.1.2