X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4427c0a3ff15545c46f97a217a1dc947099d4a40..23c06cde5df85dbfd94e92e90de225618191153f:/include/wx/combo.h diff --git a/include/wx/combo.h b/include/wx/combo.h index a504c1543e..05ee2d9c3e 100644 --- a/include/wx/combo.h +++ b/include/wx/combo.h @@ -184,6 +184,10 @@ public: virtual bool Enable(bool enable = true); virtual bool Show(bool show = true); virtual bool SetFont(const wxFont& font); +#if wxUSE_VALIDATORS + virtual void SetValidator(const wxValidator &validator); + virtual wxValidator *GetValidator(); +#endif // wxUSE_VALIDATORS // wxTextCtrl methods - for readonly combo they should return // without errors. @@ -419,8 +423,14 @@ protected: // Installs standard input handler to combo (and optionally to the textctrl) void InstallInputHandlers(); + // flags for DrawButton() + enum + { + Draw_PaintBg = 1 + }; + // Draws dropbutton. Using wxRenderer or bitmaps, as appropriate. - void DrawButton( wxDC& dc, const wxRect& rect, bool paintBg = true ); + void DrawButton( wxDC& dc, const wxRect& rect, int flags = Draw_PaintBg ); // Call if cursor is on button area or mouse is captured for the button. //bool HandleButtonMouseEvent( wxMouseEvent& event, bool isInside ); @@ -464,6 +474,7 @@ protected: // event handlers void OnSizeEvent( wxSizeEvent& event ); void OnFocusEvent(wxFocusEvent& event); + void OnIdleEvent(wxIdleEvent& event); void OnTextCtrlEvent(wxCommandEvent& event); void OnSysColourChanged(wxSysColourChangedEvent& event); void OnKeyEvent(wxKeyEvent& event); @@ -592,6 +603,9 @@ protected: // is the popup window currenty shown? wxByte m_popupWinState; + // should the focus be reset to the textctrl in idle time? + bool m_resetFocus; + private: void Init();