X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1be7a35c5ec31b6cfcab9d969c7969586441a945..09b895cb4a954494063eb17d3dc302a654fd99e5:/include/wx/choice.h diff --git a/include/wx/choice.h b/include/wx/choice.h index 63f3267936..e6e85a2241 100644 --- a/include/wx/choice.h +++ b/include/wx/choice.h @@ -26,13 +26,13 @@ // global data // ---------------------------------------------------------------------------- -extern WXDLLEXPORT_DATA(const wxChar) wxChoiceNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxChoiceNameStr[]; // ---------------------------------------------------------------------------- // wxChoice allows to select one of a non-modifiable list of strings // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxChoiceBase : public wxControlWithItems +class WXDLLIMPEXP_CORE wxChoiceBase : public wxControlWithItems { public: wxChoiceBase() { } @@ -40,6 +40,13 @@ public: // all generic methods are in wxControlWithItems + // get the current selection: this can only be different from the normal + // selection if the popup items list is currently opened and the user + // selected some item in it but didn't close the list yet; otherwise (and + // currently always on platforms other than MSW) this is the same as + // GetSelection() + virtual int GetCurrentSelection() const { return GetSelection(); } + // set/get the number of columns in the control (as they're not supported on // most platforms, they do nothing by default) virtual void SetColumns(int WXUNUSED(n) = 1 ) { } @@ -48,6 +55,9 @@ public: // emulate selecting the item event.GetInt() void Command(wxCommandEvent& event); + // override wxItemContainer::IsSorted + virtual bool IsSorted() const { return HasFlag(wxCB_SORT); } + private: DECLARE_NO_COPY_CLASS(wxChoiceBase) }; @@ -74,9 +84,10 @@ private: #include "wx/cocoa/choice.h" #elif defined(__WXPM__) #include "wx/os2/choice.h" +#elif defined(__WXPALMOS__) + #include "wx/palmos/choice.h" #endif #endif // wxUSE_CHOICE -#endif - // _WX_CHOICE_H_BASE_ +#endif // _WX_CHOICE_H_BASE_