Expander
Section: ET++ class description (n)
Updated: automatically Thu Mar 21 20:10:58 1991
Index
Return to Main Contents
NAME
Expander.short - arranges and expands VObjects horizontally or vertically
DESCRIPTION
Expanders are used to construct complex window layouts. An Expander arranges its contained VObjects either horizontally or vertically and leaves a certain gap between them. The minimum size of an Expander is determined by the minimum sizes of the inner VObjects. The extra space beyond the minimum size is distributed among all contained VObjects. Fixed VObjects are not resized; other VObjects are expanded evenly to fill the available space. Whether a VObject is horizontally or vertically fixed is indicated by the flags eVObjHFixed and eVObjVFixed (see enum VObjFlags).
It is possible for a subclass to modify the instvar dir and the instvar gap during runtime. But afterwards the layout of the Expander or better the complete window layout must be recalculated to make the change effective.
classes are rarely derived from Expander.
class Expander
is often reused directly.
class Expander contains 6 methods.
- owner of class:
-
nobody.
- baseclasses:
-
CompositeVObject
- subclasses:
-
ScrollBar
- flags:
-
CompositeVObjectFlags
INSTANCE VARIABLES
- dir (protected Direction)
-
the direction in which the Expander arranges the contained VObjects. If dir is eHor they are aligned in one row; if it is eVert they are aligned in one column.
- gap (protected Point)
-
is the minimum space the Expander reserves between two VObjects. The actual gap may be greater if the available space for the Expander is greater than its minimum size and some VObjects are not expanded. Depending on the value of the instvar dir only the x, respectively the y component is used.
INSTANCE METHOD LIST
- client interface
-
Expander
- implementation
-
ExpandCnt
GetMinSize
SetExtent
SetOrigin
CATEGORIES
VObject Composition
FILES
- declaration:
-
Expander.h
KNOWN PROBLEMS
The Expander and other VObject composition classes (such as the class BorderItem) actively set the fixed flags based on the fixed flags of their contained VObjects. Because this modification is propagated up the VObject tree, it is sometimes hard to find out for which item to set the fixed flags in order to achieve the desired result. In my opinion (joe@csesbg.at), the fixed flags should never be set by composition classes themselves but only by the programmer (as it was in ET++1.0).
HISTORY
joe@csesbg.at Tue Jun 18 16:01 MET DST 1991 1st version
chris@csesbg.at Tue Jun 18 17:45 MET DST 1991 reviewed
joe@csesbg.at Wed Jun 19 21:21 MET DST 1991 last changes & review
Index
- NAME
-
- DESCRIPTION
-
- INSTANCE VARIABLES
-
- INSTANCE METHOD LIST
-
- CATEGORIES
-
- FILES
-
- KNOWN PROBLEMS
-
- HISTORY
-
This document was created by
man2html,
using the manual pages.
Time: 00:40:27 GMT, March 30, 2022