X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec75d791f043b3b43cac9825a2c62e9d5321e616..d51305e81eb593bedd92cda864671e15209c268f:/include/wx/motif/choice.h diff --git a/include/wx/motif/choice.h b/include/wx/motif/choice.h index 070f5191e9..7cd969839a 100644 --- a/include/wx/motif/choice.h +++ b/include/wx/motif/choice.h @@ -12,16 +12,18 @@ #ifndef _WX_CHOICE_H_ #define _WX_CHOICE_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "choice.h" #endif -WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr; - #include "wx/clntdata.h" -#include "wx/dynarray.h" -WX_DEFINE_ARRAY(WXWidget, wxWidgetArray); +#ifndef wxWIDGET_ARRAY_DEFINED + #define wxWIDGET_ARRAY_DEFINED + + #include "wx/dynarray.h" + WX_DEFINE_ARRAY_PTR(WXWidget, wxWidgetArray); +#endif // Choice item class WXDLLEXPORT wxChoice: public wxChoiceBase @@ -44,6 +46,18 @@ public: Create(parent, id, pos, size, n, choices, style, validator, name); } + wxChoice(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Init(); + Create(parent, id, pos, size, choices, style, validator, name); + } + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -52,9 +66,18 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr); + 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 = wxChoiceNameStr); + // implementation of wxControlWithItems virtual int GetCount() const; virtual int DoAppend(const wxString& item); + virtual int DoInsert(const wxString& item, int pos); virtual void DoSetItemClientData(int n, void* clientData); virtual void* DoGetItemClientData(int n) const; virtual void DoSetItemClientObject(int n, wxClientData* clientData); @@ -77,7 +100,7 @@ public: void SetFocus(); // Implementation - virtual void ChangeFont(bool keepOriginalSize = TRUE); + virtual void ChangeFont(bool keepOriginalSize = true); virtual void ChangeBackgroundColour(); virtual void ChangeForegroundColour(); WXWidget GetTopWidget() const { return m_formWidget; } @@ -94,7 +117,7 @@ protected: // common part of all contructors void Init(); - int m_noStrings; + size_t m_noStrings; WXWidget m_menuWidget; WXWidget m_buttonWidget; wxWidgetArray m_widgetArray;