wxBoxSizer(3)

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

πŸ’– wxBoxSizer πŸ’–

okay so bestie, quick vibe check: this is the Erlang module definition for wxBoxSizer, and it's genuinely one of the most iconic little layout gremlins in wxWidgets. no cap.


✨ NAME ✨

wxBoxSizer β€” the basic idea behind a box sizer is that windows will most often be laid out in rather simple basic geometry, typically in a row or a column or several hierarchies of either.

like… it's giving grid energy but make it chill. rows, columns, rows-inside-columns, you get it. πŸŽ€


🌸 DESCRIPTION 🌸

for more info (and there IS more info, bestie, don't skip it), please see overview_sizer_box.

see also, bestie:

  • wxSizer
  • Overview sizer

oh and also?? this class is derived, and can use functions, from:

  • wxSizer

wxWidgets docs: wxBoxSizer β€” the og source of truth, iykyk πŸ“š


πŸ¦‹ DATA TYPES πŸ¦‹

wxBoxSizer() :: wx:wx_object().

she's an object. she's a wx:wx_object(). periodt. ✨


πŸ‘‘ FUNCTIONS πŸ‘‘

πŸ’… destroy(This :: wxBoxSizer()) -> ok.

destroys the object

that's it. that's the whole vibe. she's gone, no notes, bye queen 🫢 (object cleaned up, obligations fulfilled, slay).

πŸ’… getOrientation(This) -> integer() when This :: wxBoxSizer().

returns the orientation of the box sizer, either wxVERTICAL or wxHORIZONTAL.

so basically you ask her "which way do you go?" and she tells you straight up β€” column mode or row mode, no guessing, no ambiguity, highkey reliable πŸ”₯

πŸ’… new(Orient) -> wxBoxSizer() when Orient :: integer().

constructor for a wxBoxSizer. πŸŽ€

orient may be either of wxVERTICAL or wxHORIZONTAL for creating either a column sizer or a row sizer.

so like β€” wxVERTICAL = she stacks things top to bottom, column energy πŸ’œ. wxHORIZONTAL = side by side, row energy 🌈. pick one, she'll do the rest. iconic behaviour honestly.


⚠️ bestie real talk: Orient has to be an integer (wxVERTICAL or wxHORIZONTAL are the ones named here). don't go inventing your own orientation, she will not know what to do with that πŸ’€

okay that's the whole page, mwah πŸ’‹ β€” brought to you by Ericsson AB, version wx 2.6, and yes this documentation really is out here living its best life. go forth and lay out your windows, main character πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from