Index: A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
The VerticalFlowLayout class implements a layout manager that arranges components along a vertical line with a variety of spacing options.
#include <toolkit/lmvflow.h>
public: | |
// VerticalFlowLayout members | |
enum | Y_Justify; |
enum | X_Justify; |
VerticalFlowLayout(); | |
VerticalFlowLayout(WinCoord gap, Y_Justify yjustify , X_Align align , X_Justify xjustify ); | |
void | EnforceMinimumSize(Boolean enforce); |
X_Align | GetAlignment(void); |
X_Justify | GetXJustification(void); |
Y_Justify | GetYJustification(void); |
Boolean | IsMinimumSizeEnforced(void); |
void | LayoutContainer(FlexContainer *parent); |
Dimension | MinimumLayoutSize(FlexContainer *parent); |
Dimension | PreferredLayoutSize(FlexContainer *parent); |
void | SetAlignment(X_Align align); |
void | SetXJustification(X_Justify xjustify); |
void | SetYJustification(Y_Justify yjustify); |
void | SetOptions(X_Align align, Y_Justify yjustify, X_Justify xjustify , WinCoord gap ); |
protected: |
public: | ||
---|---|---|
// LayoutManagerInterface members | ||
enum | X_Align; | |
enum | Y_Align; | |
enum | X_Place; | |
enum | Y_Place; | |
void | AddLayoutComponent(LayoutTagType tag, uint32 position, FlexComponent *comp); | |
void | DoLayout(FlexContainer *parent); | |
void | DoPreLayout(FlexContainer *parent); | |
Dimension | MinimumLayoutSize(FlexContainer *parent); | |
Dimension | PreferredLayoutSize(FlexContainer *parent); | |
void | RemoveLayoutComponent(FlexComponent *comp, uint32 position); | |
// LayoutManagerInterface utilities | ||
static void | AlignX(FlexComponent *comp, FlexComponent *toComp, X_Align xalign); | |
static void | AlignY(FlexComponent *comp, FlexComponent *toComp, Y_Align yalign); | |
static WinCoord | AlignCalcX(WinCoord areaWidth, WinCoord toX, WinCoord toWidth, X_Align xalign); | |
static WinCoord | AlignCalcY(WinCoord areaHeight, WinCoord toY, WinCoord toHeight, Y_Align yalign); | |
static void | AlignWithParent(FlexComponent *comp, X_Align xalign, Y_Align yalign, WinCoord leftInset , WinCoord rightInset , WinCoord topInset , WinCoord bottomInset ); | |
static void | AlignWithParentX(FlexComponent *comp, X_Align xalign, WinCoord leftInset , WinCoord rightInset ); | |
static void | AlignWithParentY(FlexComponent *comp, Y_Align yalign, WinCoord topInset , WinCoord bottomInset ); | |
static WinXYPoint | GetAppRelativeLocation(FlexComponent *comp); | |
static void | PlaceX(FlexComponent *comp, FlexComponent *toComp, X_Place xplace); | |
static void | PlaceY(FlexComponent *comp, FlexComponent *toComp, Y_Place yplace); | |
Dimension | GetComponentSizes(void); | |
WinCoord | GetGap(void); | |
LayoutTagType | GetLayoutTag(void); | |
void | SetGap(WinCoord gap); | |
void | SetComponentSizes(WinCoord widths, WinCoord heights); | |
void | SetLayoutTag(LayoutTagType tag); | |
protected: | ||
void | LayoutContainer(FlexContainer *parent); |
Back to the top of VerticalFlowLayout
Back to the top of VerticalFlowLayout
Back to the top of VerticalFlowLayout
OVERVIEW
VerticalFlowLayout extends FlowLayout by providing extra functions
to control the location and spacing of components in terms of:
Horizontal alignment (LayoutManagerInterface::X_Align).
Vertical justification (VerticalFlowLayout::Y_Justify).
Horizontal justification (VerticalFlowLayout::X_Justify).
Back to the top of VerticalFlowLayout
These values control the vertical location of the components (as a group) within the container.
Declared as:
enum { Y_JUSTIFY_TOP, Y_JUSTIFY_CENTER, Y_JUSTIFY_BOTTOM, Y_JUSTIFY_FULL, Y_JUSTIFY_FULL_WITH_ENDS } Y_Justify;
Back to the top of VerticalFlowLayout
These values control the horizontal location of the components (as a group) within the container.
Declared as:
enum { X_JUSTIFY_LEFT, X_JUSTIFY_CENTER, X_JUSTIFY_RIGHT } X_Justify;
Back to the top of VerticalFlowLayout
Constructs a VerticalFlowLayout with default settings.
Prototype:
VerticalFlowLayout();
Back to the top of VerticalFlowLayout
VerticalFlowLayout(WinCoord gap, Y_Justify yjustify , X_Align align , X_Justify xjustify );
Constructs a VerticalFlowLayout with the specified settings.
Parameters:
Prototype:
VerticalFlowLayout(WinCoord gap, Y_Justify yjustify = Y_JUSTIFY_CENTER, X_Align align = X_ALIGN_CENTER, X_Justify xjustify = X_JUSTIFY_CENTER);
Back to the top of VerticalFlowLayout
void EnforceMinimumSize(Boolean enforce);
Tells the flow whether to enforce a minimum size restriction on the container being laid out (it can't be smaller than the layout's preferred size). This is used for situations where the container might be resized by the user. If the minimum size is enforced, the user won't be able to make the container smaller than the layout but it could still be made larger if the container does not use its preferred size.
Parameters:
Prototype:
void EnforceMinimumSize(Boolean enforce);
Back to the top of VerticalFlowLayout
Returns the alignment being used.
Return value: X_Align value being used.
See also: SetAlignment()
Prototype:
X_Align GetAlignment(void);
Back to the top of VerticalFlowLayout
X_Justify GetXJustification(void);
Returns the vertical justification being used.
Return value: Y_Justify value being used.
See also: SetXJustification()
Prototype:
X_Justify GetXJustification(void);
Back to the top of VerticalFlowLayout
Y_Justify GetYJustification(void);
Returns the vertical justification being used.
Return value: Y_Justify value being used.
See also: SetYJustification()
Prototype:
Y_Justify GetYJustification(void);
Back to the top of VerticalFlowLayout
Boolean IsMinimumSizeEnforced(void);
Finds out if the layout manager always enforces a minimum size (its preferred size) on the container. If a minimum size is enforced, the container can be larger but not smaller.
Return value: TRUE if minimum size is enforced.
See also: EnforceMinimumSize()
Prototype:
Boolean IsMinimumSizeEnforced(void);
Back to the top of VerticalFlowLayout
void LayoutContainer(FlexContainer *parent);
Lays out a container.
Parameters:
Prototype:
virtual void LayoutContainer(FlexContainer *parent);
Back to the top of VerticalFlowLayout
Dimension MinimumLayoutSize(FlexContainer *parent);
Determines the minimum size of the passed container when laid out with this layout manager.
Parameters:
Overrides: LayoutManagerInterface::MinimumLayoutSize
Prototype:
virtual Dimension MinimumLayoutSize(FlexContainer *parent);
Back to the top of VerticalFlowLayout
Dimension PreferredLayoutSize(FlexContainer *parent);
Determines the preferred size of the passed container when laid out with this layout manager.
Parameters:
Overrides: LayoutManagerInterface::PreferredLayoutSize
Prototype:
virtual Dimension PreferredLayoutSize(FlexContainer *parent);
Back to the top of VerticalFlowLayout
void SetAlignment(X_Align align);
Sets the alignment to use.
Parameters:
Prototype:
void SetAlignment(X_Align align);
Back to the top of VerticalFlowLayout
void SetXJustification(X_Justify xjustify);
Sets the horizontal justification to use.
Calling this will not cause the parent to become invalidated.
Parameters:
Prototype:
void SetXJustification(X_Justify xjustify);
Back to the top of VerticalFlowLayout
void SetYJustification(Y_Justify yjustify);
Sets the vertical justification to use.
Calling this will not cause the parent to become invalidated.
Parameters:
Prototype:
void SetYJustification(Y_Justify yjustify);
Back to the top of VerticalFlowLayout
void SetOptions(X_Align align, Y_Justify yjustify, X_Justify xjustify , WinCoord gap );
Initializes an existing flow with the passed parameters. This does not cause any containers to become invalidated.
Parameters:
Prototype:
void SetOptions(X_Align align, Y_Justify yjustify, X_Justify xjustify = X_JUSTIFY_CENTER, WinCoord gap = 5);
Back to the top of VerticalFlowLayout