wxSashLayoutWindow(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– 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:

  • wxLayoutAlgorithm
  • wxSashWindow
  • Overview events

πŸ‘‘ This class is derived, and can use functions, from:

  • wxSashWindow
  • wxWindow
  • wxEvtHandler

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