PanedWindow

A paned window widget displays a number of subwindows, stacked either vertically or horizontally. The user may adjust the relative sizes of the subwindows by dragging the sash between panes.

Constructors

this
this(UiElement parent, string orientation)

Construct the widget.

this
this(string orientation)

Construct the widget.

Members

Functions

addPane
auto addPane(Widget widget)

Add a pane to the paned window. When adding a pane to the paned window the pane gains an id that is equal to the passed widget's id and can be used later to refer to the new pane.

getPaneIds
string[] getPaneIds()

Get an array of all the current pane id's.

getSashPosition
int getSashPosition(int sashIndex)

Get the position of a sash. Must be called after the UI has been drawn.

insertPane
auto insertPane(I paneIdentifier, Widget widget)

Insert a pane into the paned window at a specified zero based index or before another pane id. When adding a pane to the paned window for the first time the pane gains an id that is equal to the passed widget's id and can be used later to refer to the new pane. If the id of the widget passed is already used as a pane id then that existing one will be moved to the new position.

removePane
auto removePane(I paneIdentifier)

Remove a pane from the paned window.

setPaneWeight
auto setPaneWeight(I paneIdentifier, int weight)

Set the pane weight. Weight is an integer specifying the relative stretchability of the pane. When the paned window is resized, the extra space is added or subtracted to each pane proportionally to its weight.

setSashPosition
auto setSashPosition(int sashIndex, int position)

Sets the position of a sash. May adjust the positions of adjacent sashes to ensure that positions are monotonically increasing. Sash positions are further constrained to be between 0 and the total size of the widget. Must be called after the UI has been drawn.

Mixins

__anonymous
mixin Height

Mixin common commands.

__anonymous
mixin Width
Undocumented in source.

Mixed In Members

From mixin Height

setHeight
auto setHeight(int height)

Set the height of the widget if the geometry manager allows.

From mixin Width

setWidth
auto setWidth(int width)

Set the width of the widget if the geometry manager allows.

Inherited Members

From Widget

setState
auto setState(string[] state)

Set the widget's state.

getState
string[] getState()

Get the widget's state.

inState
bool inState(string[] state)

Test if a widget is in a particular state.

removeState
auto removeState(string[] state)

Remove the widget's state.

resetState
auto resetState()

Reset the widget's state to default.

setStyle
auto setStyle(string style)

Set the widget's style.

getStyle
string getStyle()

Get the widget's style.

setKeyboardFocus
auto setKeyboardFocus(string focus)

Set if the widget can recieve focus during keyboard traversal.

getKeyboardFocus
string getKeyboardFocus()

Get if the widget can recieve focus during keyboard traversal.

pack
auto pack(int outerPadding, int innerPadding, string side, string fill, string anchor, bool expand)

Geometry method for loosely placing this widget inside its parent using a web browser model. Widgets flow around each other in the available space.

grid
auto grid(int column, int row, int outerPadding, int innerPadding, int columnSpan, int rowSpan, string sticky)

Geometry method for placing this widget inside its parent using an imaginary grid. Somewhat more direct and intuitive than pack. Choose grid for tabular layouts, and when there's no good reason to choose something else.

place
auto place(int xPos, int yPos, int width, int height, string anchor, string borderMode)

Geometry method for placing this widget inside its parent using absolute positioning.

place
auto place(double relativeXPos, double relativeYPos, double relativeWidth, double relativeHeight, string anchor, string borderMode)

Geometry method for placing this widget inside its parent using relative positioning. In this case the position and size is specified as a floating-point number between 0.0 and 1.0 relative to the height of the parent. 0.5 means the widget will be half as high as the parent and 1.0 means the widget will have the same height as the parent, and so on.

Examples

// The paned window must be created first.
// See the constructor notes in the documentation.
auto panedWindow = new PanedWindow();

// The pane's widgets are contained within the frames.
auto left = new Frame(panedWindow);
auto right = new Frame(panedWindow);

panedwindow.addPane(left)
	.addPane(right)
	.pack();

Common Commands

These are injected common commands that can also be used with this widget.

Height
Width

Additional Events

Additional events that can also be bound to using the bind method.

<<EnteredChild>>, <<PrevWindow>>, <Alt-Key>, <B1-Motion>, <Button-1>, <ButtonRelease-1>, <Enter>, <Key-F10>, <Key-Tab>, <Leave>, <Motion>,

See Also

Meta