X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf25c88b6ab494b22c732406237c6957e26d72d9..0c02f0701e960de4a1f60bc821c19c03b8fc88c3:/include/wx/msw/control.h diff --git a/include/wx/msw/control.h b/include/wx/msw/control.h index 2549f9b989..0856025577 100644 --- a/include/wx/msw/control.h +++ b/include/wx/msw/control.h @@ -22,7 +22,8 @@ class WXDLLEXPORT wxControl : public wxControlBase { public: - wxControl(); + wxControl() { } + wxControl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -43,9 +44,18 @@ public: // Simulates an event virtual void Command(wxCommandEvent& event) { ProcessCommand(event); } + // implementation from now on // -------------------------- + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + // Calls the callback and appropriate event handlers bool ProcessCommand(wxCommandEvent& event); @@ -105,6 +115,14 @@ protected: // default style for the control include WS_TABSTOP if it AcceptsFocus() virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + // this is a helper for the derived class GetClassDefaultAttributes() + // implementation: it returns the right colours for the classes which + // contain something else (e.g. wxListBox, wxTextCtrl, ...) instead of + // being simple controls (such as wxButton, wxCheckBox, ...) + static wxVisualAttributes + GetCompositeControlsDefaultAttributes(wxWindowVariant variant); + + // for controls like radiobuttons which are really composite this array // holds the ids (not HWNDs!) of the sub controls wxArrayLong m_subControls;