wxSystemSettings(3)
π wxSystemSettings β the Erlang module def, but make it cute π
okay so bestie, gather round, because this is wxSystemSettings(3) from the Erlang module definitions and it's literally your little backstage pass to ask the system questions about itself. No cap. π
β¨ NAME β¨
wxSystemSettings β this module lets your app be nosy (affectionately) and ask for details about the system. π¦
πΈ DESCRIPTION πΈ
like, what kind of details? the good stuff: standard colours, fonts, and user interface element sizes. the whole vibe of "hey system, what do you look like today" π
See also, because we love a cross-reference moment:
wxFontwx_color()wxSystemOptions
and the wxWidgets docs themselves: wxSystemSettings π«Ά
π§ DATA TYPES π§
wxSystemSettings() :: wx:wx_object().
that's it, that's the type, she's simple and she's iconic β¨
π FUNCTIONS π
getColour(Index) -> wx:wx_colour4() when Index :: wx:wx_enum().
Returns a system colour. π¨
Return: the returned colour is always valid. like, always always. no vibe check failures here. π
getFont(Index) -> wxFont:wxFont() when Index :: wx:wx_enum().
Returns a system font. π€
Return: the returned font is always valid. periodt. π
getMetric(Index, [Option]) -> integer()
when
Index :: wx:wx_enum(),
Option :: {win, wxWindow:wxWindow()}.
Returns the value of a system metric, or -1 if the metric isn't supported on the current system. π (yes, -1 is the "sorry babe, not supported here" number)
so listen, the value of win decides whether the metric you get back is a global value or a wxWindow-based value β and if it's window-based, it might figure out the widget, the display the window is on, or something similar like that. the window you hand over should be as close to the metric as physically possible (e.g. a wxTopLevelWindow in case of the wxSYS_CAPTION_Y metric). main character energy: give it the right window. πͺβ¨
index can be one of the ?wxSystemMetric enum values.
win is a pointer to the window for which the metric is requested. Specifying the win parameter is encouraged, because some metrics on some ports are not supported without one, or they might be capable of reporting better values if given one. and even if a window doesn't make sense for a metric, you should still give one β because for example it might determine which display's cursor width is requested with wxSYS_CURSOR_X. π±οΈ
ngl bestie: just pass the window. it's giving "trust me". π
getScreenType() -> wx:wx_enum().
Returns the screen type. π₯οΈπ
The return value is one of the ?wxSystemScreenType enum values.
and that's the whole page, we ate and left no crumbs ππ
cute sign-off: this whole thing came from Ericsson AB, and it's from wx 2.6, dated with the wxSystemSettings(3) page itself. mwah. π
π¦ 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