Difference between revisions of "User:Cl@openoffice.org/Gozer"

From Apache OpenOffice Wiki
Jump to: navigation, search
(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''===
  
; start : child elements are aligned to the start edge of this container
+
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 elements are aligned in the center of this container
+
 
; end : child elements are aligned to the end edge of this container
+
; 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

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.

The container layouts its children from left to right in a horizontal line.
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 
-

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

Personal tools