Centrallix - It's Different than what you Think
Home   |   Technology   |   Screen Shots   |   Download   |   Documentation   |   History   |   For Developers

Search...


Search For:

Index...


Centrallix Documentation
1. Getting Started
2. Applications Overview
3. Application Components
4. Reports Overview
5. Report Components
6. SQL Language
7. Process Modeling
8. Application Modeling
9. Role-Based Security
10. Business Logic Modeling
11. Other Objects
12. External API's
13. Internal API's

widget/autolayout


autolayout :: Container which automatically positions its children

Metadata:
type:widget/autolayout
visual: yes
container: yes
form element: no


Overview:

The autolayout widget is used to automatically position widgets without having to explicitly provide x, y, width, and height values for those widgets. Most of the layout in Centrallix is done on a coordinate basis (although the automatic resize logic adjusts those coordinates to fit the target application or component render size). The autolayout widget provides the capability to do nested gui layout in Centrallix, where the coordinate positions of the widgets are computed automatically.

Normally, the autolayout widget is used not as "widget/autolayout", but as "widget/hbox" or "widget/vbox", two synonyms for this widget which also set the layout direction (horizontal or vertical).

A "hbox" widget stacks its children horizontally one after the other, while a "vbox" widget stacks its children vertically from the top down. The spacing between children can be set, and the size of each child can be either independently set per-child, or it can be set by virtue of the geometry of the autolayout widget.

The autolayout widget supports having multiple rows or columns of widgets. That is, if a "vbox" widget fills up vertically, it can resume adding children to a second vertical column should there be space to the right of the original column of widgets. For this to work, the width of the columns (for a vbox) or the height of the rows (for an hbox) must be specified.


Usage:

The autolayout widget can occur any place that a visual widget can be placed. As it is a container, it can also contain both visual and nonvisual widgets and containers.


Properties:

PropertyTypeDescription
x integer x-coordinate of the upper left corner of the autolayout area.
y integer y-coordinate of the upper left corner of the autolayout area.
width integer width, in pixels, of the autolayout area. If omitted, it defaults to the maximum available width for the given height, without overlapping other visible widgets.
height integer height, in pixels, of the autolayout area. If omitted, it defaults to the maximum available height for the given width, without overlapping other visible widgets. If both width and height are unspecified, Centrallix will chose a width and height that maximize the available autolayout area.
style string either "hbox" or "vbox". Not needed if the widget is created via "widget/hbox" or "widget/vbox".
spacing integer The spacing, in pixels, between widgets. For an hbox, this refers to the horizontal spacing between children. For a vbox, this refers to the vertical spacing.
cellsize integer For an hbox, this is the width to use for the child widgets (unless otherwise specified by the child widget). For a vbox, this refers to the height to use for child widgets unless otherwise specified.
column_width integer This specifies the width of columns for a vbox -- should the first column of widgets fill up, a second column will be started at this offset from the start of the first column.
row_height integer This specifies the height of rows for an hbox -- should the first row of widgets fill up horizontally, a second row will be started beneath the first one, at this vertical offset from the start of the first row.


Child Properties:

(of any child widgets)

PropertyTypeDescription
autolayout_order integer An optional property, this allows the layout sequence of child widgets to be controlled, and the children are placed in ascending order. If unspecified, this defaults to a value of 100 for the first child encountered, or to N+1 where N is the autolayout sequence of the most recent child widget encountered.


Actions:

none currently available

Events:

none currently available

Client Properties:

none currently available

Sample Code:

// Here is a vbox which can have up to three
// vertical columns of widgets; the columns will
// fill up one at a time.
vbox1 "widget/vbox"
	{
	x=0; y=0; width=600; height=200;
	spacing=5; column_width=200;
	}




Comments...


Sjirk Jan on 2011-Jul-05 17:43
The documentation seems to be missing widget/autolayoutspacer as found on line 163 in modules/base/motd.cmp



Add a Comment...


Your Name:
Comment:


(c) 2001-2020 LightSys Technology Services, Inc. All trademarks are property of their respective owners.

Project Hosting Provided By:
Hosted by Sourceforge