Difference between revisions of "User:Cl@openoffice.org/Gozer"
(Documented initial layouting attributes) |
|||
Line 61: | Line 61: | ||
=== ''align'' === | === ''align'' === | ||
− | ; start : | + | When the size of the containing box is larger than the size of a child, extra space will be available. The ''align'' attribute specifies how a container's children are placed and aligned along the direction perpendicular to the containers orientation, and where the extra space, if any, is positioned. For horizontal orientation, it specifies how the children are positioned vertically. For vertical orientation, it specifies how the children are positioned horizontally. |
− | ; center : | + | |
− | ; end : | + | ; start : For normal direction containers, the top edge of each child is placed along the top of the box. Extra space is placed below the element. For reverse direction containers, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element. |
− | ; baseline : - | + | ; center : Any extra space is divided evenly, with half placed above the child and the other half placed after the child. |
− | ; stretch : | + | ; end : For normal direction containers, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element. For reverse direction containers, the top edge of each child is placed along the top of the box. Extra space is placed below the element. |
+ | ; baseline : If this box orientation is inline-axis or horizontal, all children are placed with their baselines aligned, and extra space placed before or after as necessary. For block flows, the baseline of the first non-empty line box located within the element is used. For tables, the baseline of the first cell is used. The children, once aligned on their baselines, should then be placed into the box so that the child with the earliest extent margin has its top margin edge (or bottom margin edge for reverse direction containers) flush with the top (or bottom) edge of the box's content area. If the box does not have an ‘auto’ height, overflow will always be on the bottom (or top for reverse direction containers) edge. If the box orientation is block-axis or vertical, then baseline is interpreted as center. | ||
+ | ; stretch : The height of each child is adjusted to that of the containing block. | ||
=== ''axis'' === | === ''axis'' === | ||
− | ; x : | + | A container may lay out its children either horizontally or vertically. |
− | ; y : | + | |
− | ; line : | + | ; x : The container layouts its children from left to right in a horizontal line. |
− | ; page : | + | ; y : The container layouts its children from top to bottom vertically. |
+ | ; line : The container displays its layouts along the inline axis. | ||
+ | ; page : The container displays its layouts along the block axis. | ||
=== ''pack''=== | === ''pack''=== | ||
− | + | When all of the elements within a container are inflexible, extra space may be left over in the container. The ''pack'' attribute may be used to dictate how any additional space along the containers axis should be distributed between elements. The ''pack'' attribute does not affect the position of elements in the opposite direction. That is, ''pack'' affects only the horizontal position in horizontally oriented containers and only the vertical position in vertically oriented containers. | |
− | ; center : child | + | |
− | ; end : child | + | ; start : For normal direction containers, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction containers, the right edge of the last child is placed at the right side, with all extra space placed before the first child. |
+ | |||
+ | ; center : The extra space is divided evenly, with half placed before the first child and the other half placed after the last child. | ||
+ | |||
+ | ; end : For normal direction containers, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction containers, the left edge of the first child is placed at the left side, with all extra space placed after the last child. | ||
=== ''spacing'' === | === ''spacing'' === | ||
Line 91: | Line 99: | ||
; tb-lr : - | ; tb-lr : - | ||
; context : - | ; context : - | ||
+ | |||
+ | == Container elements == | ||
+ | |||
+ | === ''hbox'' === | ||
+ | |||
+ | === ''vbox'' === | ||
+ | |||
+ | === ''grid'' === | ||
+ | |||
+ | === ''rows'' === | ||
+ | |||
+ | === ''row'' === | ||
+ | |||
+ | === ''columns'' === | ||
+ | |||
+ | === ''column'' === | ||
+ | |||
+ | == User interface container == | ||
+ | |||
+ | === ''buttondialog'' === | ||
+ | |||
+ | === ''dialog'' === | ||
+ | |||
+ | === ''dockingarea'' === | ||
+ | === ''dockingwindow'' === | ||
+ | === ''floatingwindow'' === | ||
+ | === ''framewindow'' === | ||
+ | === ''messbox'' === | ||
+ | === ''modaldialog'' === | ||
+ | === ''modelessdialog'' === | ||
+ | === ''querybox'' === | ||
+ | === ''splitwindow'' === | ||
+ | === ''systemchildwindow'' === | ||
+ | === ''tabcontrol'' === | ||
+ | === ''tabpage'' === | ||
+ | === ''warningbox'' === | ||
+ | === ''window'' === | ||
+ | === ''workwindow'' === | ||
+ | |||
+ | == User interface elements == | ||
+ | |||
+ | === ''spacer'' === | ||
+ | |||
+ | === ''cancelbutton'' === | ||
+ | === ''checkbox'' === | ||
+ | === ''combobox'' === | ||
+ | === ''control'' === | ||
+ | === ''currencybox'' === | ||
+ | === ''datebox'' === | ||
+ | === ''datefield'' === | ||
+ | === ''edit'' === | ||
+ | === ''errorbox'' === | ||
+ | === ''fixedbitmap'' === | ||
+ | === ''fixedimage'' === | ||
+ | === ''fixedline'' === | ||
+ | === ''fixedtext'' === | ||
+ | === ''groupbox'' === | ||
+ | === ''helpbutton'' === | ||
+ | === ''imagebutton'' === | ||
+ | === ''imageradiobutton'' === | ||
+ | === ''infobox'' === | ||
+ | === ''listbox'' === | ||
+ | === ''longcurrencybox'' === | ||
+ | === ''longcurrencyfield'' === | ||
+ | === ''menubutton'' === | ||
+ | === ''metricbox'' === | ||
+ | === ''metricfield'' === | ||
+ | === ''morebutton'' === | ||
+ | === ''multilistbox'' === | ||
+ | === ''numericbox'' === | ||
+ | === ''numericfield'' === | ||
+ | === ''okbutton'' === | ||
+ | === ''patternbox'' === | ||
+ | === ''patternfield'' === | ||
+ | === ''pushbutton'' === | ||
+ | === ''button'' === | ||
+ | === ''label'' === | ||
+ | === ''radiobutton'' === | ||
+ | === ''scrollbar'' === | ||
+ | === ''scrollbarbox'' === | ||
+ | === ''simpleanimation'' === | ||
+ | === ''spinbutton'' === | ||
+ | === ''spinfield'' === | ||
+ | === ''throbber'' === | ||
+ | === ''splitter'' === | ||
+ | === ''statusbar'' === | ||
+ | === ''timebox'' === | ||
+ | === ''timefield'' === | ||
+ | === ''toolbox'' === | ||
+ | === ''tristatebox'' === |
Revision as of 18:50, 5 August 2010
Contents
- 1 Layout
- 1.1 Generic Layout Attributes
- 1.2 Size and position attributes
- 1.3 Container layout attributes
- 1.4 Container elements
- 1.5 User interface container
- 1.5.1 buttondialog
- 1.5.2 dialog
- 1.5.3 dockingarea
- 1.5.4 dockingwindow
- 1.5.5 floatingwindow
- 1.5.6 framewindow
- 1.5.7 messbox
- 1.5.8 modaldialog
- 1.5.9 modelessdialog
- 1.5.10 querybox
- 1.5.11 splitwindow
- 1.5.12 systemchildwindow
- 1.5.13 tabcontrol
- 1.5.14 tabpage
- 1.5.15 warningbox
- 1.5.16 window
- 1.5.17 workwindow
- 1.6 User interface elements
- 1.6.1 spacer
- 1.6.2 cancelbutton
- 1.6.3 checkbox
- 1.6.4 combobox
- 1.6.5 control
- 1.6.6 currencybox
- 1.6.7 datebox
- 1.6.8 datefield
- 1.6.9 edit
- 1.6.10 errorbox
- 1.6.11 fixedbitmap
- 1.6.12 fixedimage
- 1.6.13 fixedline
- 1.6.14 fixedtext
- 1.6.15 groupbox
- 1.6.16 helpbutton
- 1.6.17 imagebutton
- 1.6.18 imageradiobutton
- 1.6.19 infobox
- 1.6.20 listbox
- 1.6.21 longcurrencybox
- 1.6.22 longcurrencyfield
- 1.6.23 menubutton
- 1.6.24 metricbox
- 1.6.25 metricfield
- 1.6.26 morebutton
- 1.6.27 multilistbox
- 1.6.28 numericbox
- 1.6.29 numericfield
- 1.6.30 okbutton
- 1.6.31 patternbox
- 1.6.32 patternfield
- 1.6.33 pushbutton
- 1.6.34 button
- 1.6.35 label
- 1.6.36 radiobutton
- 1.6.37 scrollbar
- 1.6.38 scrollbarbox
- 1.6.39 simpleanimation
- 1.6.40 spinbutton
- 1.6.41 spinfield
- 1.6.42 throbber
- 1.6.43 splitter
- 1.6.44 statusbar
- 1.6.45 timebox
- 1.6.46 timefield
- 1.6.47 toolbox
- 1.6.48 tristatebox
Layout
Generic Layout Attributes
margin-top , margin-right, margin-bottom and margin-left
[css]
The attributes margin-top , margin-right, margin-bottom and margin-left set the thickness of the margin area. The value may be negative. The value type is a length value.
margin
The attribute margin is a shorthand for the other four. The value type is one to four length value. If no unit is given to a length value. If margin has four values, they set top, right, bottom and left in that order. If left is omitted, it is the same as right. If bottom is omitted, it is the same as top. If right is omitted it is the same as top.
TODO: Implement [margins]?
Size and position attributes
[css]
x
The x attribute specify the x position for the left edge of this element relative to the left edge of its parent container. The value type is a length value or a percentage value. If the parent container does not support absolute positioning, this attribute is ignored. The percentage is calculated with respect to the final width of parent container element.
y
The y attribute specify the y position for the top edge of this element relative to the top edge of its parent container. The value type is a length value or a percentage value. If the parent container does not support absolute positioning, this attribute is ignored. The percentage is calculated with respect to the final width of parent container element.
width
The width attribute specify the prefered width of an element. The value type is a length value or a percentage value. The percentage is calculated with respect to the final width of parent container element. If the given width of an element is smaller than the elements min-width this attribute is ignored.
height
The height attribute specify the prefered height of an element. The value type is a length value or a percentage value. The percentage is calculated with respect to the final height of parent container element. If the given height of an element is smaller than the elements min-height this attribute is ignored.
min-width
The min-width attribute specify the minimum width of an element. The value type is a length value or a percentage value. The percentage is calculated with respect to the final width of parent container element.
min-height
The min-height attribute specify the minimum height of an element. The value type is a length value or a percentage value. The percentage is calculated with respect to the final height of parent container element.
flex
The flex attribute specify how an element is resized in relation to other resizeable elements in its parent container. The value type is a positive integer value. A value of 0 means that this element will not be resized even if the parent container has space left to distribute. The defaul value is 0.
visibility
The visibility attribute specify if an element is actually rendered and if it takes space inside its parent container.
- visible
- the element is visible
- hidden
- the element is hidden but still its parent container reserves space
- collapse
- the element is hidden and its parent reserves no space
Container layout attributes
align
When the size of the containing box is larger than the size of a child, extra space will be available. The align attribute specifies how a container's children are placed and aligned along the direction perpendicular to the containers orientation, and where the extra space, if any, is positioned. For horizontal orientation, it specifies how the children are positioned vertically. For vertical orientation, it specifies how the children are positioned horizontally.
- start
- For normal direction containers, the top edge of each child is placed along the top of the box. Extra space is placed below the element. For reverse direction containers, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element.
- center
- Any extra space is divided evenly, with half placed above the child and the other half placed after the child.
- end
- For normal direction containers, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element. For reverse direction containers, the top edge of each child is placed along the top of the box. Extra space is placed below the element.
- baseline
- If this box orientation is inline-axis or horizontal, all children are placed with their baselines aligned, and extra space placed before or after as necessary. For block flows, the baseline of the first non-empty line box located within the element is used. For tables, the baseline of the first cell is used. The children, once aligned on their baselines, should then be placed into the box so that the child with the earliest extent margin has its top margin edge (or bottom margin edge for reverse direction containers) flush with the top (or bottom) edge of the box's content area. If the box does not have an ‘auto’ height, overflow will always be on the bottom (or top for reverse direction containers) edge. If the box orientation is block-axis or vertical, then baseline is interpreted as center.
- stretch
- The height of each child is adjusted to that of the containing block.
axis
A container may lay out its children either horizontally or vertically.
- x
- The container layouts its children from left to right in a horizontal line.
- y
- The container layouts its children from top to bottom vertically.
- line
- The container displays its layouts along the inline axis.
- page
- The container displays its layouts along the block axis.
pack
When all of the elements within a container are inflexible, extra space may be left over in the container. The pack attribute may be used to dictate how any additional space along the containers axis should be distributed between elements. The pack attribute does not affect the position of elements in the opposite direction. That is, pack affects only the horizontal position in horizontally oriented containers and only the vertical position in vertically oriented containers.
- start
- For normal direction containers, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction containers, the right edge of the last child is placed at the right side, with all extra space placed before the first child.
- center
- The extra space is divided evenly, with half placed before the first child and the other half placed after the last child.
- end
- For normal direction containers, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction containers, the left edge of the first child is placed at the left side, with all extra space placed after the last child.
spacing
The spacing attributes specify a space that the container reserves between its child elements. The value type is a length value. The default is 0.
writing-mode
- lr-tb
- -
- rl-tb
- -
- tb-rl
- -
- tb-lr
- -
- context
- -