wxSashLayoutWindow(3)
π wxSashLayoutWindow π
okay bestie, welcome to the wxSashLayoutWindow page β it's the Erlang Module Definition edition, and yes it's giving very "I make layout algorithms look effortless" energy. let's go π¦
β¨ NAME β¨
wxSashLayoutWindow β she responds to OnCalculateLayout events generated by wxLayoutAlgorithm. that's the whole job description and she eats every time π
πΈ DESCRIPTION πΈ
okay so here's the tea π β this class lets your app use simple accessors to specify how the window should be laid out, instead of you having to respond to events yourself. lowkey a lifesaver, no cap.
the fact that the class derives from wxSashWindow means sashes can be used if required, so the windows can be user-resizable. user-resizable windows?? we love to see it π₯
the documentation for wxLayoutAlgorithm explains the purpose of this class in more detail, so if you want the full lore, go read that one too.
for the window styles, see wxSashWindow.
this class handles the EVT_QUERY_LAYOUT_INFO and EVT_CALCULATE_LAYOUT events for you β iconic, honestly, she's doing the work so you don't have to π«Ά. however, if you use sashes, see wxSashWindow for relevant event information. see also wxLayoutAlgorithm for information about the layout events.
π See:
wxLayoutAlgorithmwxSashWindow- Overview events
π This class is derived, and can use functions, from:
wxSashWindowwxWindowwxEvtHandler
wxWidgets docs: wxSashLayoutWindow
π DATA TYPES π
wxSashLayoutWindow() :: wx:wx_object().
β FUNCTIONS β
π« create
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. that's it, that's the vibe β¨
π« destroy
destroy(This :: wxSashLayoutWindow()) -> ok.
destroys the object. bye bye bestie ππ
π« getAlignment
getAlignment(This) -> wx:wx_enum()
when This :: wxSashLayoutWindow().
returns the alignment of the window β one of wxLAYOUT_TOP, wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM. pick your edge, queen π
π« getOrientation
getOrientation(This) -> wx:wx_enum()
when This :: wxSashLayoutWindow().
returns the orientation of the window β one of wxLAYOUT_HORIZONTAL, wxLAYOUT_VERTICAL. which way does she stretch? only she knows (jk, this tells you) π
π« new
new() -> wxSashLayoutWindow().
default ctor. the classic. the bare minimum. we stan a simple entry point π
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. same energy, but now with a parent π«Ά
π« setAlignment
setAlignment(This, Alignment) -> ok
when
This :: wxSashLayoutWindow(),
Alignment :: wx:wx_enum().
sets the alignment of the window β aka which edge of the available parent client area the window is attached to. you gotta commit to an edge, bestie, no fence-sitting π
alignment is one of wxLAYOUT_TOP, wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM.
π« setDefaultSize
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. so one number is a hard yes and the other one is just vibe check material, fr fr πΈ
π« setOrientation
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. main character stretching energy, honestly β
orientation is one of wxLAYOUT_HORIZONTAL, wxLAYOUT_VERTICAL.
okay that's the whole page, you absolutely ate that reading session πβ¨ this was rendered for you by Ericsson AB, riding on version wx 2.6 β mwah, ily, go write some layout code ππ¦π
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms