+// This flag indicates that combo box style drop button is to be created
+#define wxBU_COMBO 0x0400
+
+
+class wxDropdownButton : public wxBitmapButton
+{
+public:
+ wxDropdownButton() { Init(); }
+ wxDropdownButton(wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style=0,
+ const wxValidator& validator = wxDefaultValidator);
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator);
+
+protected:
+ virtual void DoMoveWindow(int x, int y, int w, int h);
+
+ void OnSize(wxSizeEvent& event);
+ void OnMouseEnter(wxMouseEvent& event);
+ void OnMouseLeave(wxMouseEvent& event);
+
+ void RecreateBitmaps(int w, int h);
+
+ wxBitmap m_bmpNormal;
+ wxBitmap m_bmpHot;
+
+ int m_borderX, m_borderY;
+
+ // True if DrawDropArrow should be used instead of DrawComboBoxDropButton
+ bool m_useDropArrow;
+
+private:
+
+ void Init()
+ {
+ m_borderX = -1;
+ m_borderY = -1;
+ }
+
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDropdownButton)
+};
+
+
+// Below, macro DROPBUT_USEDROPARROW should return false when
+// DrawComboBoxDropButton is to be used to render the entire button.
+// COMBOST is non-zero if wxBU_COMBO was set.
+
+#if defined(__WXMSW__)
+
+ #define DROPBUT_USEDROPARROW(COMBOST) (COMBOST?false:true)
+ #define DROPBUT_DEFAULT_WIDTH 17
+
+#elif defined(__WXGTK__)
+
+ #define DROPBUT_USEDROPARROW(COMBOST) true
+ #define DROPBUT_DEFAULT_WIDTH 19
+
+#else
+
+ #define DROPBUT_USEDROPARROW(COMBOST) true
+ #define DROPBUT_DEFAULT_WIDTH 17
+
+#endif
+
+
+IMPLEMENT_DYNAMIC_CLASS(wxDropdownButton, wxBitmapButton)
+
+
+BEGIN_EVENT_TABLE(wxDropdownButton,wxBitmapButton)
+ EVT_ENTER_WINDOW(wxDropdownButton::OnMouseEnter)
+ EVT_LEAVE_WINDOW(wxDropdownButton::OnMouseLeave)
+ EVT_SIZE(wxDropdownButton::OnSize)
+END_EVENT_TABLE()
+
+
+wxDropdownButton::wxDropdownButton(wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxValidator& validator)