]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/choice.h
When handling accelerators in wxWebView make sure that we do not block right-alt...
[wxWidgets.git] / include / wx / choice.h
index 69cab9702eaaefe0fffac2dc91a73d5eed1b1096..369dbb517a0d55ba7f1b5508b12202ee117b9f4c 100644 (file)
 // global data
 // ----------------------------------------------------------------------------
 
 // global data
 // ----------------------------------------------------------------------------
 
-extern WXDLLEXPORT_DATA(const char) wxChoiceNameStr[];
+extern WXDLLIMPEXP_DATA_CORE(const char) wxChoiceNameStr[];
 
 // ----------------------------------------------------------------------------
 // wxChoice allows to select one of a non-modifiable list of strings
 // ----------------------------------------------------------------------------
 
 
 // ----------------------------------------------------------------------------
 // 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() { }
 {
 public:
     wxChoiceBase() { }
@@ -58,8 +58,15 @@ public:
     // override wxItemContainer::IsSorted
     virtual bool IsSorted() const { return HasFlag(wxCB_SORT); }
 
     // override wxItemContainer::IsSorted
     virtual bool IsSorted() const { return HasFlag(wxCB_SORT); }
 
+protected:
+    // The generic implementation doesn't determine the height correctly and
+    // doesn't account for the width of the arrow but does take into account
+    // the string widths, so the derived classes should override it and set the
+    // height and add the arrow width to the size returned by this version.
+    virtual wxSize DoGetBestSize() const;
+
 private:
 private:
-    DECLARE_NO_COPY_CLASS(wxChoiceBase)
+    wxDECLARE_NO_COPY_CLASS(wxChoiceBase);
 };
 
 // ----------------------------------------------------------------------------
 };
 
 // ----------------------------------------------------------------------------
@@ -79,7 +86,7 @@ private:
 #elif defined(__WXGTK__)
     #include "wx/gtk1/choice.h"
 #elif defined(__WXMAC__)
 #elif defined(__WXGTK__)
     #include "wx/gtk1/choice.h"
 #elif defined(__WXMAC__)
-    #include "wx/mac/choice.h"
+    #include "wx/osx/choice.h"
 #elif defined(__WXCOCOA__)
     #include "wx/cocoa/choice.h"
 #elif defined(__WXPM__)
 #elif defined(__WXCOCOA__)
     #include "wx/cocoa/choice.h"
 #elif defined(__WXPM__)