Difference between revisions of "Layout Terminology"

From Adobe Open Source Wiki
Jump to: navigation, search
Line 5: Line 5:
 
== Related Structures ==
 
== Related Structures ==
  
; Layout Unit : tbd
+
=== Layout Unit ===
; Interval Range : tbd
+
 
 +
tbd
 +
 
 +
=== Interval Range ===
 +
 
 +
tbd
  
 
== General Layout Attributes ==
 
== General Layout Attributes ==
Line 15: Line 20:
 
=== Layout Attributes ===
 
=== Layout Attributes ===
  
; indent
+
==== indent ====
 +
 
 
: (default: 0)
 
: (default: 0)
 
: The amount of space between the leftmost (or topmost) widget and the end of the left (or top) margin.
 
: The amount of space between the leftmost (or topmost) widget and the end of the left (or top) margin.
  
; create
+
==== create ====
 +
 
 
: (default: true)
 
: (default: true)
 
: Determines whether or not this node actually creates a widget using a platform widget implementation. Examples of noncreating containers are row, column, and overlay. This attribute is not settable from within the layout description.
 
: Determines whether or not this node actually creates a widget using a platform widget implementation. Examples of noncreating containers are row, column, and overlay. This attribute is not settable from within the layout description.
  
; spacing
+
==== spacing ====
 +
 
 
: (default: 10)
 
: (default: 10)
 
: The amount of space to be put between multiple children of the container. This value can also contain an array, which will be iterated in turn to determine the spacing between two child widgets. Example: spacing: [ 5, 10, 15 ] will yield a container with 5 pixels between child widget 1 and 2, 10 pixels between child widget 2 and 3, and so forth.
 
: The amount of space to be put between multiple children of the container. This value can also contain an array, which will be iterated in turn to determine the spacing between two child widgets. Example: spacing: [ 5, 10, 15 ] will yield a container with 5 pixels between child widget 1 and 2, 10 pixels between child widget 2 and 3, and so forth.
  
; placement
+
==== placement ====
 +
 
 
: (default: place_leaf)
 
: (default: place_leaf)
 
: The placement of a container's children. Options are:
 
: The placement of a container's children. Options are:
Line 35: Line 44:
 
: ''question'' : What does place_leaf do?
 
: ''question'' : What does place_leaf do?
  
; margin
+
==== margin ====
 +
 
 
: (default: [ 0, 0, 0, 0])
 
: (default: [ 0, 0, 0, 0])
 
: margin is the amount of space from the frame of the container to the children within. The margins of a container can only be encroached upon by the outset of a child widget. A child widget's outset is not allowed to be larger than its container's margin (implying the outset of the child would extend into and possibly beyond the frame of the container.) If the container has no margin, then the outset of the child widgets will propagate to become the outsets of the parent container. If this attribute is specified using a single value (e.g., margin: 20) it implies the value should be used for all the container's margins.
 
: margin is the amount of space from the frame of the container to the children within. The margins of a container can only be encroached upon by the outset of a child widget. A child widget's outset is not allowed to be larger than its container's margin (implying the outset of the child would extend into and possibly beyond the frame of the container.) If the container has no margin, then the outset of the child widgets will propagate to become the outsets of the parent container. If this attribute is specified using a single value (e.g., margin: 20) it implies the value should be used for all the container's margins.
  
; horizontal
+
==== horizontal ====
 
: (default: align_default)
 
: (default: align_default)
 
: Specifies horizontal alignment of the widget. Options are:
 
: Specifies horizontal alignment of the widget. Options are:
Line 59: Line 69:
 
;: align_bottom : same as align_reverse
 
;: align_bottom : same as align_reverse
  
* vertical
+
==== vertical ====
* child_horizontal
+
 
* child_vertical
+
: (default: align_default)
 +
: Specifies vertical alignment of the widget. Options are the same as the horizontal attribute.
 +
 
 +
==== child_horizontal ====
 +
 
 +
: (default: align_default)
 +
: Unless otherwise specified by the child widget itself, this specifies the horizontal alignment of the children of this widget. Options are the same as the horizontal attribute.
 +
 
 +
==== child_vertical ====
 +
 
 +
: (default: align_default)
 +
: Unless otherwise specified by the child widget itself, this specifies the vetical alignment of the children of this widget. Options are the same as the horizontal attribute.
  
 
=== Widget Extents ===
 
=== Widget Extents ===

Revision as of 18:39, 30 March 2007

This is the layout behavior specifications for the default set of ASL widgets. Default values are specified using the Common Expression Language (CEL). As such:

  • Arrays are defined as [ 1, 2, 3 ].
  • Dictionaries are defined as { name: value, name2: value2 }

Contents

Related Structures

Layout Unit

tbd

Interval Range

tbd

General Layout Attributes

  • Code for the layout attributes can be found in <adobe/layout_attributes.hpp>.
  • Code for the extents can be found in <adobe/extents.hpp>.

Layout Attributes

indent

(default: 0)
The amount of space between the leftmost (or topmost) widget and the end of the left (or top) margin.

create

(default: true)
Determines whether or not this node actually creates a widget using a platform widget implementation. Examples of noncreating containers are row, column, and overlay. This attribute is not settable from within the layout description.

spacing

(default: 10)
The amount of space to be put between multiple children of the container. This value can also contain an array, which will be iterated in turn to determine the spacing between two child widgets. Example: spacing: [ 5, 10, 15 ] will yield a container with 5 pixels between child widget 1 and 2, 10 pixels between child widget 2 and 3, and so forth.

placement

(default: place_leaf)
The placement of a container's children. Options are:
place_row 
Align the children in a row
place_column 
Align the children in a column
place_overlay 
Align the children in an overlay. An overlay will cause all children to have horizontal and vertical alignments of align_fill. Each child will share the same layout real estate with its siblings. The idea for an container placing its children using place_overlay is so that only one will be visible at a time.
question : What does place_leaf do?

margin

(default: [ 0, 0, 0, 0])
margin is the amount of space from the frame of the container to the children within. The margins of a container can only be encroached upon by the outset of a child widget. A child widget's outset is not allowed to be larger than its container's margin (implying the outset of the child would extend into and possibly beyond the frame of the container.) If the container has no margin, then the outset of the child widgets will propagate to become the outsets of the parent container. If this attribute is specified using a single value (e.g., margin: 20) it implies the value should be used for all the container's margins.

horizontal

(default: align_default)
Specifies horizontal alignment of the widget. Options are:
align_forward 
Forward alignment
align_reverse : Reverse alignment
align_center : Center alignment
align_proportional : Distributes leftover container space equally among widgets with this alignment specified (todo: verify)
align_forward_fill : Distributes leftover container space completely to widgets with this alignment specified (todo: verify)
align_reverse_fill : Distributes leftover container space completely to widgets with this alignment specified (todo: verify)
align_default : question fill me in!
align_fill : same as align_forward_fill
align_left_fill : same as align_forward_fill
align_right_fill : same as align_reverse_fill
align_top_fill : same as align_forward_fill
align_bottom_fill : same as align_reverse_fill
align_left : same as align_forward
align_right : same as align_reverse
align_top : same as align_forward
align_bottom : same as align_reverse

vertical

(default: align_default)
Specifies vertical alignment of the widget. Options are the same as the horizontal attribute.

child_horizontal

(default: align_default)
Unless otherwise specified by the child widget itself, this specifies the horizontal alignment of the children of this widget. Options are the same as the horizontal attribute.

child_vertical

(default: align_default)
Unless otherwise specified by the child widget itself, this specifies the vetical alignment of the children of this widget. Options are the same as the horizontal attribute.

Widget Extents

  • outset
  • frame
  • inset
  • guide_set (not settable in the layout description)
  • width (not settable in the layout description)
  • height (not settable in the layout description)

Specific Layout Attributes (by widget)

Containers

Leaf Widgets