#include <wx/systhemectrl.h>
A helper class making it possible to use system theme for any control.
Under MSW, there an alternative theme available for the list and list-like controls since Windows Vista. This theme us used by Windows Explorer list and tree view and so is arguably more familiar to the users than the standard appearance of these controls.
This class is used in wxWidgets to enable this system theme in wxTreeCtrl, wxListCtrl and wxDataViewCtrl and thus give them the same, familiar look. It can also be used as a helper for implementing custom controls with the same appearance. Notice that when using this class it is especially important to use wxRendererNative::DrawItemSelectionRect() and wxRendererNative::DrawItemText() to draw the control items to ensure that they appear correctly under all platforms and Windows versions.
The following example shows implementation of a system theme enabled wxVListBox:
On non-MSW platforms this class currently does nothing but is still available, so that it can be used in portable code without any conditional compilation directives.
Public Member Functions | |
wxSystemThemedControl () | |
Trival default constructor. More... | |
void | EnableSystemTheme (bool enable=true) |
This method may be called to disable the system theme of controls using it by default. More... | |
wxSystemThemedControl< C >::wxSystemThemedControl | ( | ) |
Trival default constructor.
void wxSystemThemedControl< C >::EnableSystemTheme | ( | bool | enable = true | ) |
This method may be called to disable the system theme of controls using it by default.