[KLE Index] [KLE Hierarchy] [Headers]
KLChild - The baseclass for all layout elements This is the baseclass for everything wich is used in the layout More...
#include <klelib/klchild.h>
KLChild - The baseclass for all layout elements
This is the baseclass for everything wich is used in the layout. More documentation to follow ...
Calling herachie:
Constructor() { Setup() { AskMinMax() { Show() Hide() } } Cleanup() } Destructor()
{} means, that the functions inside this "level" can be called in the given order many times. (e.g. when Show() is successfull, you can be sure that Hide() will be called before the next Show() call is done) Only when the first call in an level is successfull (e.g. Setup() or Show()) the oder calls are executed
NOTE:
X => Vertical Row (Height) Y => Hriziontal Coloumn (Width)
[public]
Shows/Hides the object.
If hidden, all other objects in the same group will get the space of this object.
Changing this when showed forces a relayout
[public]
Gives the object a fix x size. This overwrites the normal Min/Max sizes
Set to 0, if you not longer want a fix size. This is also the default.
Changing this when showed forces a relayout
[public]
Gives the object a fix Y size. This overwrites the normal Min/Max sizes
Set to 0, if you not longer want a fix size. This is also the default.
Changing this when showed forces a relayout
[public]
Sets both a fix X and Y size at the same time
Only forces one relayout when showed
[public]
Sets the x weight of the object.
The weight is important when spreading the availble space in a group.
The formular used to calculate the space for one object is:
xSize = availspace * Sum of weight of all nonhidden objects in group / objectweight
Ok, this is not the exact formular, because other things like min/max sizes must also be token into consideration.
The default value is 100.
A special case is a weight of 0. If an object has this weight, then the maximum will be set to the minimum, so that the object always only get itīs minmum sizes.
[public]
Sets the Y Weight
[public]
Sets both x and y weight
[public]
Sets the disapearlevel of this widget.
If you set an disapearlevel higger than 0, the minimumsize of this child will not be added to the normal minimumsize.
If the parent group runs out of space to display all childs, it will start to hide the childs with the higgest disaperlevel.
Note: This does not affect the hidden()-flag.
As higger the disapearlevel is, as sooner will this child be hidden.
Default value is 0, wich means no disapearing.
(not yet implementated in the groups)
[public]
Get the setup info
[public]
Get the Min/Max sizes
[public]
Get the show info
[public]
Parent group object, or NULL if non exists
[public]
Internal states of this object
[public]
Constructor
[public virtual]
Destructor
[public virtual]
Do your setup work (e.g. load a image, load fonts) First call baseclass, and return false if it returns false. false means, setup has failed.
[public virtual]
Ask for the sizes of this widget. Must first call itīs base class (to do such things like adding bordersizes). If returning FALSE, return also FALSE immedatly (e.g. a fix size has been set) Otherwise ADD your sizes. (e.g. size of the setted text)
NOTE: Itīs VERY important, that you ADD your sizes You will destroy the complete layout, if you do not so !!!
[public virtual]
Show the element. ShowInfo contains the X and Y coords, sizes and a systemdepending device information (Window-Handle) First call baseclass, and return false if it returns false. FALSE means, show has failed
[public virtual]
Just hide it First do your hiding stuff, then call baseclass.
[public virtual]
Do your cleanup work. (e.g. flush images, or fonts) First do your hiding stuff, then call baseclass
[public virtual]
Find the widget at x/y Can only be called between klShow() and klHide()
[public]
Call this function, if you want to get the minmax sizes of an object
[public]
*INTERNAL FUNCTON* Just checks, if the weight is 0, and if this is true sets the maxmimum to the minimum. Does also validate the minMaxSizes May be extended in future to do more, and get more parameters
[public virtual]
Relayout this widget.
relayoutParent | true to force relayout of parent. If there is no parent, the device is will be relayouted |
[public virtual]
Stop the relayouting of this widget.
This function can be called nested. You must have an matching #startRelayout() call for every #stopRelayout() call
When this widget is a group, it will also call #stopRelayout() on all group members
[public virtual]
Starts the relayouting of this widget
Only relayouts, if the nexting level is 0 and the #doRelayout() was called
[public virtual]
Setup input graping. The device knows more Can only be called when setted up.
[public virtual]
Cleanup input graping.
[public virtual]
Create dropmarks for this child/group
Dropmarks descripes the designer, where he is able to insert childs
KLChild does not add any dropmarks. This is usualy done by the subclasses, such as KLHVGroup or KLReplaceMe
dml | DropMarkList to insert the dropmarks into |
[public]
For information, how to use this streaming, just look at the supplied examples.
You set each attribute also with using streaming
[protected]
Local copy of the setup information
Only valid between klSetup() and klCleanup()
[protected]
Local copy of Min/Max sizes
Only valid between klAskMinMax() and klCleanup()
[protected]
Local copy of show information
Only valid between klShow() and klHide()
Documentation generated by emmy@gate on Tue Sep 22 21:13:27 MEST 1998 | Kdoc |