wxListItemAttr(3)
π wxListItemAttr β the Erlang module definition, bestie edition π
okay so real talk, this is the manual page for wxListItemAttr(3) from the Erlang Module Definition section, and it does exactly what it says on the tin: it's the vibes-and-colours accessory for list items in wxWidgets. β¨
πΈ NAME πΈ
wxListItemAttr β literally just functions for the wxListItemAttr class. That's the whole thing. Short, sweet, iconic.
π¦ DESCRIPTION π¦
Bestie, straight from the source: wxWidgets docs: wxListItemAttr. That's where the real lore lives if you wanna go deeper. This is the Erlang wrapper situation so you can poke at it from your Erlang code, and I'm here to walk you through every single function, no skips, no skimming. π«Ά
π DATA TYPES π
wxListItemAttr()::wx:wx_object()
so basically a wxListItemAttr is a wx object, end of story, periodt. π
π FUNCTIONS π
β¨ destroy/1 β¨
destroy(This :: wxListItemAttr()) -> ok.
Destroys the object. that's it, that's the whole function. it's giving closure. bye boo ππ
β¨ getBackgroundColour/1 β¨
getBackgroundColour(This) -> wx:wx_colour4()
when This :: wxListItemAttr().
hands you back the background colour, as a wx:wx_colour4(). no notes. π¨
β¨ getFont/1 β¨
getFont(This) -> wxFont:wxFont() when This :: wxListItemAttr().
returns the font, and the type is wxFont:wxFont(). the way that this gives you the whole font object... obsessed. π€
β¨ getTextColour/1 β¨
getTextColour(This) -> wx:wx_colour4()
when This :: wxListItemAttr().
yep, same energy as the background one but for the text colour. returns a wx:wx_colour4(). π
β¨ hasBackgroundColour/1 β¨
hasBackgroundColour(This) -> boolean()
when This :: wxListItemAttr().
a lil yes/no situation: returns a boolean(), telling you whether a background colour is even set. vibe check for colours, honestly. β
β¨ hasFont/1 β¨
hasFont(This) -> boolean() when This :: wxListItemAttr().
returns a boolean(). does it have a font? that's the question. that's the whole function. π
β¨ hasTextColour/1 β¨
hasTextColour(This) -> boolean() when This :: wxListItemAttr().
another boolean(), this time about the text colour. matching set, slay. π§
β¨ new/0 β¨
new() -> wxListItemAttr().
makes you a fresh new wxListItemAttr() with zero arguments. blank canvas, main character energy, go off. β¨
β¨ new/3 β¨
new(ColText, ColBack, Font) -> wxListItemAttr()
when
ColText :: wx:wx_colour(),
ColBack :: wx:wx_colour(),
Font :: wxFont:wxFont().
okay here's the three-arg glow-up: you pass ColText (a wx:wx_colour()), ColBack (also a wx:wx_colour()), and Font (a wxFont:wxFont()), and it hands you back a shiny wxListItemAttr(). all three, in that order, no cap. π
β¨ setBackgroundColour/2 β¨
setBackgroundColour(This, ColBack) -> ok
when
This :: wxListItemAttr(),
ColBack :: wx:wx_colour().
sets the background colour. ColBack is a wx:wx_colour(), and you get ok back. done and dusted. π
β¨ setFont/2 β¨
setFont(This, Font) -> ok
when This :: wxListItemAttr(), Font :: wxFont:wxFont().
assigns the font. Font is a wxFont:wxFont(), return value is ok. lowkey the cleanest function here. π
β¨ setTextColour/2 β¨
setTextColour(This, ColText) -> ok
when
This :: wxListItemAttr(),
ColText :: wx:wx_colour().
and finally, set that text colour. ColText is a wx:wx_colour(), and yeah, you guessed it: ok. π
π a lil sign-off π
that's the whole page, bestie β every type, every function, every signature, all present and accounted for, fr fr. this one came to you courtesy of Ericsson AB on the wx 2.6 release, and yeah it's wxListItemAttr(3) all the way down. go forth and colour your list items, you absolute icon. π
β¨π
π¦ 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