wxSashLayoutWindow — wx v2.4.2

Search documentation of wx

# View Source wxSashLayoutWindow (wx v2.4.2)

Functions for wxSashLayoutWindow class

`wxSashLayoutWindow` responds to OnCalculateLayout events generated by `wxLayoutAlgorithm`. It allows the application to use simple accessors to specify how the window should be laid out, rather than having to respond to events.

The fact that the class derives from `wxSashWindow` allows sashes to be used if required, to allow the windows to be user-resizable.

The documentation for `wxLayoutAlgorithm` explains the purpose of this class in more detail.

For the window styles see `wxSashWindow`.

This class handles the EVT_QUERY_LAYOUT_INFO and EVT_CALCULATE_LAYOUT events for you. However, if you use sashes, see `wxSashWindow` for relevant event information. See also `wxLayoutAlgorithm` for information about the layout events.

See: `wxLayoutAlgorithm`, `wxSashWindow`, Overview events

This class is derived (and can use functions) from: `wxSashWindow` `wxWindow` `wxEvtHandler`

wxWidgets docs: wxSashLayoutWindow

# Summary

## Types

wxSashLayoutWindow()

## Functions

create(This, Parent)
create/3

Initializes a sash layout window, which can be a child of a frame, dialog or any other non-control window.

destroy(This)

Destroys the object.

getAlignment(This)

Returns the alignment of the window: one of wxLAYOUT_TOP, wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM.

getOrientation(This)

Returns the orientation of the window: one of wxLAYOUT_HORIZONTAL, wxLAYOUT_VERTICAL.

new()

Default ctor.

new(Parent)
new/2

Constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window.

setAlignment(This, Alignment)

Sets the alignment of the window (which edge of the available parent client area the window is attached to).

setDefaultSize(This, Size)

Sets the default dimensions of the window.

setOrientation(This, Orientation)

Sets the orientation of the window (the direction the window will stretch in, to fill the available parent client area).

# Types

Link to this type

# wxSashLayoutWindow()

View Source

    -type wxSashLayoutWindow() :: wx:wx_object().

# Functions

Link to this function

# create(This, Parent)

View Source

    -spec create(This, Parent) -> boolean() when This :: wxSashLayoutWindow(), Parent :: wxWindow:wxWindow().

Link to this function

# create/3

View Source

    -spec create(This, Parent, [Option]) -> boolean()
                    when
                        This :: wxSashLayoutWindow(),
                        Parent :: wxWindow:wxWindow(),
                        Option ::
                            {id, integer()} |
                            {pos, {X :: integer(), Y :: integer()}} |
                            {size, {W :: integer(), H :: integer()}} |
                            {style, integer()}.

Initializes a sash layout window, which can be a child of a frame, dialog or any other non-control window.

Link to this function

# destroy(This)

View Source

    -spec destroy(This :: wxSashLayoutWindow()) -> ok.

Destroys the object.

Link to this function

# getAlignment(This)

View Source

    -spec getAlignment(This) -> wx:wx_enum() when This :: wxSashLayoutWindow().

Returns the alignment of the window: one of wxLAYOUT_TOP, wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM.

Link to this function

# getOrientation(This)

View Source

    -spec getOrientation(This) -> wx:wx_enum() when This :: wxSashLayoutWindow().

Returns the orientation of the window: one of wxLAYOUT_HORIZONTAL, wxLAYOUT_VERTICAL.

Link to this function

# new()

View Source

    -spec new() -> wxSashLayoutWindow().

Default ctor.

Link to this function

# new(Parent)

View Source

    -spec new(Parent) -> wxSashLayoutWindow() when Parent :: wxWindow:wxWindow().

Link to this function

# new/2

View Source

    -spec new(Parent, [Option]) -> wxSashLayoutWindow()
                 when
                     Parent :: wxWindow:wxWindow(),
                     Option ::
                         {id, integer()} |
                         {pos, {X :: integer(), Y :: integer()}} |
                         {size, {W :: integer(), H :: integer()}} |
                         {style, integer()}.

Constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window.

Link to this function

# setAlignment(This, Alignment)

View Source

    -spec setAlignment(This, Alignment) -> ok when This :: wxSashLayoutWindow(), Alignment :: wx:wx_enum().

Sets the alignment of the window (which edge of the available parent client area the window is attached to).

`alignment` is one of wxLAYOUT_TOP, wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM.

Link to this function

# setDefaultSize(This, Size)

View Source

    -spec setDefaultSize(This, Size) -> ok
                            when This :: wxSashLayoutWindow(), Size :: {W :: integer(), H :: integer()}.

Sets the default dimensions of the window.

The dimension other than the orientation will be fixed to this value, and the orientation dimension will be ignored and the window stretched to fit the available space.

Link to this function

# setOrientation(This, Orientation)

View Source

    -spec setOrientation(This, Orientation) -> ok
                            when This :: wxSashLayoutWindow(), Orientation :: wx:wx_enum().

Sets the orientation of the window (the direction the window will stretch in, to fill the available parent client area).

`orientation` is one of wxLAYOUT_HORIZONTAL, wxLAYOUT_VERTICAL.