# `wxSashLayoutWindow`
[🔗](https://github.com/erlang/otp/blob/OTP-29.0.3/lib/wx/src/gen/wxSashLayoutWindow.erl#L58)

`m:wxSashLayoutWindow` responds to OnCalculateLayout events generated by `m: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 `m:wxSashWindow` allows sashes to be used if
required, to allow the windows to be user-resizable.

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

For the window styles see `m:wxSashWindow`.

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

See:
* `m:wxLayoutAlgorithm`

* `m:wxSashWindow`

* [Overview events](https://docs.wxwidgets.org/3.2/overview_events.html#overview_events)

This class is derived, and can use functions, from:

* `m:wxSashWindow`

* `m:wxWindow`

* `m:wxEvtHandler`

wxWidgets docs: [wxSashLayoutWindow](https://docs.wxwidgets.org/3.2/classwx_sash_layout_window.html)

# `wxSashLayoutWindow`

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

# `create`

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

# `create`

```erlang
-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.

# `destroy`

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

Destroys the object

# `getAlignment`

```erlang
-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.

# `getOrientation`

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

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

# `new`

```erlang
-spec new() -> wxSashLayoutWindow().
```

Default ctor.

# `new`

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

# `new`

```erlang
-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.

# `setAlignment`

```erlang
-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.

# `setDefaultSize`

```erlang
-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.

# `setOrientation`

```erlang
-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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
