X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..4c68a10264347cc04b1a6634000595f160792231:/include/wx/msw/listbox.h diff --git a/include/wx/msw/listbox.h b/include/wx/msw/listbox.h index 0c5161b91f..f1c58c0979 100644 --- a/include/wx/msw/listbox.h +++ b/include/wx/msw/listbox.h @@ -12,7 +12,7 @@ #ifndef _WX_LISTBOX_H_ #define _WX_LISTBOX_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "listbox.h" #endif @@ -28,7 +28,7 @@ // define the array of list box items #include "wx/dynarray.h" - WX_DEFINE_EXPORTED_ARRAY(wxOwnerDrawn *, wxListBoxItemsArray); + WX_DEFINE_EXPORTED_ARRAY_PTR(wxOwnerDrawn *, wxListBoxItemsArray); #endif // wxUSE_OWNER_DRAWN // forward decl for GetSelections() @@ -53,6 +53,16 @@ public: { Create(parent, id, pos, size, n, choices, style, validator, name); } + wxListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Create(parent, id, pos, size, choices, style, validator, name); + } bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -61,6 +71,13 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); virtual ~wxListBox(); @@ -112,9 +129,20 @@ public: // Windows callbacks bool MSWCommand(WXUINT param, WXWORD id); - virtual void SetupColours(); + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL) + { + return GetCompositeControlsDefaultAttributes(variant); + } protected: + WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + // free memory (common part of Clear() and dtor) void Free(); @@ -129,7 +157,7 @@ protected: #endif private: - DECLARE_DYNAMIC_CLASS(wxListBox) + DECLARE_DYNAMIC_CLASS_NO_COPY(wxListBox) }; #endif // wxUSE_LISTBOX