wxStaticLine(3)

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

πŸ’… wxStaticLine(3) β€” Erlang Module Definition πŸŽ€

ok so bestie, welcome to the wxStaticLine page ✨ (it's pronounced "w-x-static-line", and yes it's an Erlang module definition, the wx 2.6 era, we love a classic).


🌸 NAME 🌸

wxStaticLine β€” a static line is literally just a line, and you can use it in a dialog to separate groups of controls. that's it. that's the whole gig. and honestly? iconic for it. 🫢


✨ DESCRIPTION ✨

So the line can be only vertical or horizontal β€” pick a lane, bestie, there's no diagonal slay here 😭.

AND here's the tea: not all ports support specifying the transversal direction of the line β€” notably not wxGTK. What does transversal mean? For a horizontal line it's the height, for a vertical line it's the width. So for maximal portability you should specify it as wxDefaultCoord. no cap, just do it πŸ’–

πŸ¦‹ Styles πŸ¦‹

This class supports the following styles, and there are exactly two, so you literally cannot get them mixed up:

  • wxLI_HORIZONTAL β€” creates a horizontal line. side to side. chill energy. ➑️
  • wxLI_VERTICAL β€” creates a vertical line. up and down. main character energy. ⬆️

See: wxStaticBox

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

  • wxControl
  • wxWindow
  • wxEvtHandler

so it's giving inheritance chain πŸ’… it got the whole family tree.

wxWidgets docs: wxStaticLine


πŸŽ€ DATA TYPES πŸŽ€

wxStaticLine() :: wx:wx_object().

yeah it's just an object. short and sweet, periodt.


πŸ‘‘ FUNCTIONS πŸ‘‘

🌈 create(This, Parent, [Option]) -> boolean()

when
    This :: wxStaticLine(),
    Parent :: wxWindow:wxWindow(),
    Option ::
        {id, integer()} |
        {pos, {X :: integer(), Y :: integer()}} |
        {size, {W :: integer(), H :: integer()}} |
        {style, integer()}.

Creates the static line for two-step construction.

See new/2 for further details. (go read that one, it's the one with the lore πŸ’œ)


🌸 destroy(This :: wxStaticLine()) -> ok.

Destroys the object πŸ”₯ bye bestie, it was real.


⭐ getDefaultSize() -> integer().

This static function returns the size which will be given to the smaller dimension of the static line, i.e.

its height for a horizontal line or its width for a vertical one.

(so like β€” the little one. the thin one. the dimension nobody thinks about until it's wrong πŸ™ˆ)


πŸ¦‹ isVertical(This) -> boolean() when This :: wxStaticLine().

Returns true if the line is vertical, false if horizontal.

vibe check on your line's orientation, basically 🌈


πŸ’œ new() -> wxStaticLine().

Default constructor. baby's first static line πŸŽ€


✨ new(Parent, [Option]) -> wxStaticLine()

when
    Parent :: wxWindow:wxWindow(),
    Option ::
        {id, integer()} |
        {pos, {X :: integer(), Y :: integer()}} |
        {size, {W :: integer(), H :: integer()}} |
        {style, integer()}.

Constructor, creating and showing a static line. yes it does both, it's an overachiever, we stan πŸ’…

See: create/3


lowkey reminder since we're all friends here: that transversal-direction thing from the DESCRIPTION? still true. specify it as wxDefaultCoord if you want it to work everywhere. we're not repeating it for fun, we're repeating it because it matters πŸ’–

and that's the page bestie!! written by Ericsson AB 🫢, wx 2.6 era, stamped with the date of wxStaticLine(3) 🌸 mwah, go separate some control groups, you're gonna ate βœ¨πŸ‘‘πŸ’…

πŸ“¦ where this page comes from