wxSystemOptions(3)
π NAME π
okay so bestie, meet wxSystemOptions β it's an Erlang module (the manual's whole vibe is "Erlang Module Definition", and yes she's serving) that stores option/value pairs which wxWidgets itself or your applications can use to change behaviour at run-time. no cap. π₯
β¨ DESCRIPTION β¨
It's giving "quiet luxury" honestly β you use it to optimize behaviour that doesn't deserve a whole distinct API, but is still important to be able to configure. lowkey essential, highkey underrated. π
System options can be set by the program itself using the setOption/2 method, and they can also be set from the program's environment β by defining an environment variable:
wx_optionβ sets the given option for all wxWidgets applications π«Άwx_appname_optionβ sets it just for the application with that given name (as returned bywxApp::GetAppName()(not implemented in wx)) π
Heads up bestie: any characters that aren't allowed in environment variable names β like periods and dashes β need to be swapped for underscores. So for example, to define a system option"foo-bar"you need to define the environment variable"wx_foo_bar". that's the rule, periodt.
The program can use system options for its own needs, but honestly they're mostly used to control the behaviour of the wxWidgets library itself. main character energy but for the library. π
These options are currently recognised by wxWidgets:
All platforms π
exit-on-assertβ if you set this to a non-zero value, the program gets aborted if an assertion fails π. The default behaviour when an assertion fails depends on the build mode, and you can change it by overridingwxApp::OnAssertFailure()(not implemented in wx) β but setting this option lets you change it without modifying the program code, and it also applies to asserts which may happen before thewxApp(not implemented in wx) object creation or after its destruction. iconic, honestly.
Windows πͺ
no-maskbltβ1means never use WIN32'sMaskBltfunction,0means allow it to be used where possible. Default:0. In some circumstances theMaskBltfunction can be slower than using the fallback code, especially if you're using DC caching. By default,MaskBltwill be used where it is implemented by the operating system and driver.msw.remapβ if1(the default), wxToolBar bitmap colours get remapped to the current theme's values. Set this to0to disable that functionality β for example if you're using more than 16 colours in your tool bitmaps. πmsw.window.no-clip-childrenβ if1, windows will not automatically get theWS_CLIPCHILDRENstyle. This restores the way windows are refreshed back to the method used in versions of wxWidgets earlier than 2.5.4, and for some complex window hierarchies it can reduce apparent refresh delays. You may still specifywxCLIP_CHILDRENfor individual windows.msw.notebook.themed-backgroundβ if set to0, globally disables themed backgrounds on notebook pages. Note that this won't disable the theme on the actual notebook background (and that's noticeable only if there are no pages). πmsw.staticbox.optimized-paintβ if set to0, switches off optimized wxStaticBox painting. Setting this to0causes more flicker, but it allows applications to paint graphics on the parent of a static box (because the optimized refresh causes any such drawing to disappear).msw.font.no-proof-qualityβ if set to1, use default fonts quality instead of proof quality when creating fonts. With proof quality the fonts have slightly better appearance, but not all fonts are available in this quality β e.g. the Terminal font in small sizes is not β and this option may be used if a wider fonts selection is more important to you than higher quality. choices, bestie. β¨
GTK+ π§
gtk.tlw.can-set-transparentβ thewxTopLevelWindow::CanSetTransparent()(not implemented in wx) method normally tries to detect automatically whether transparency for top level windows is currently supported, however this may sometimes fail, and this option allows overriding the automatic detection. Setting it to1makes the transparency be always available (setting it can still fail, of course π) and setting it to0makes it always unavailable.gtk.desktopβ this option can be set to override the default desktop environment determination. Supported values areGNOMEandKDE.gtk.window.force-background-colourβ if1, the backgrounds of windows with thewxBG_STYLE_COLOURbackground style are cleared forcibly instead of relying on the underlying GTK+ window colour. This works around a display problem when running applications under KDE with the gtk-qt theme installed (0.6 and below).
Mac π
mac.window-plain-transitionβ if1, uses a plainer transition when showing a window. You can also use the symbolwxMAC_WINDOW_PLAIN_TRANSITION.window-default-variantβ the default variant used by windows (cast to integer from thewxWindowVariantenum). Also known aswxWINDOW_DEFAULT_VARIANT.mac.listctrl.always_use_genericβ tells wxListCtrl to use the generic control even when it is capable of using the native control instead. Also known aswxMAC_ALWAYS_USE_GENERIC_LISTCTRL.mac.textcontrol-use-spell-checkerβ if1activates the spell checking in wxTextCtrl. π€osx.openfiledialog.always-show-typesβ per default a wxFileDialog withwxFD_OPENdoes not show a types-popup on macOS, but allows the selection of files from any of the supported types. Setting this to1shows awxChoicefor selection (if there is more than one supported filetype).
Motif πΈ
motif.largebuttonsβ if1, uses a bigger default size for wxButtons. big button era, slay.
The compile-time option to include or exclude this whole functionality is wxUSE_SYSTEM_OPTIONS. iykyk. π
See: wxSystemSettings
wxWidgets docs: wxSystemOptions
π¦ DATA TYPES π¦
wxSystemOptions() :: wx:wx_object().
π FUNCTIONS π
getOption(Name) -> unicode:charlist() when Name :: unicode:chardata().
Gets an option. π
The function is case-insensitive to name. Returns empty string if the option hasn't been set.
See:
setOption/2getOptionInt/1hasOption/1
getOptionInt(Name) -> integer() when Name :: unicode:chardata().
Gets an option as an integer.
The function is case-insensitive to name. If the option hasn't been set, this function returns 0.
See:
setOption/2getOption/1hasOption/1
hasOption(Name) -> boolean() when Name :: unicode:chardata().
Returns true if the given option is present. β
The function is case-insensitive to name.
See:
setOption/2getOption/1getOptionInt/1
isFalse(Name) -> boolean() when Name :: unicode:chardata().
Returns true if the option with the given name had been set to 0 value.
This is mostly useful for boolean options, for which you can't use GetOptionInt(name) == 0 β because that would also be true if the option hadn't been set at all. sneaky little gotcha, bestie. β
setOption(Name, Value) -> ok
when Name :: unicode:chardata(), Value :: integer();
(Name, Value) -> ok
when
Name :: unicode:chardata(),
Value :: unicode:chardata().
Sets an option.
The function is case-insensitive to name.
and that's the whole page, bestie! π this one was brought to you by Ericsson AB, running on wx 2.6 β wxSystemOptions(3), one of the manuals of all time. go forth and set your options, 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