X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79f9018c70d2fc72b120f467c51686c49a2ff9b6..f46ad98f0df1e1b073a484cb34a91e2e1278fdb7:/include/wx/combo.h diff --git a/include/wx/combo.h b/include/wx/combo.h index 6d4757b3c1..ec19e490d1 100644 --- a/include/wx/combo.h +++ b/include/wx/combo.h @@ -45,7 +45,6 @@ #include "wx/control.h" #include "wx/renderer.h" // this is needed for wxCONTROL_XXX flags #include "wx/bitmap.h" // wxBitmap used by-value -#include "wx/combobox.h" class WXDLLIMPEXP_CORE wxTextCtrl; class WXDLLEXPORT wxComboPopup; @@ -298,6 +297,14 @@ public: // Utilies needed by the popups or native implementations // + // Returns true if given key combination should toggle the popup. + // NB: This is a separate from other keyboard handling because: + // 1) Replaceability. + // 2) Centralized code (otherwise it'd be split up between + // wxComboCtrl key handler and wxVListBoxComboPopup's + // key handler). + virtual bool IsKeyPopupToggle(const wxKeyEvent& event) const = 0; + // Draws focus background (on combo control) in a way typical on platform. // Unless you plan to paint your own focus indicator, you should always call this // in your wxComboPopup::PaintComboControl implementation. @@ -352,7 +359,7 @@ protected: void CreateTextCtrl( int extraStyle, const wxValidator& validator ); // Installs standard input handler to combo (and optionally to the textctrl) - void InstallInputHandlers( bool alsoTextCtrl = true ); + void InstallInputHandlers(); // Draws dropbutton. Using wxRenderer or bitmaps, as appropriate. void DrawButton( wxDC& dc, const wxRect& rect, bool paintBg = true ); @@ -403,6 +410,7 @@ protected: void OnFocusEvent(wxFocusEvent& event); void OnTextCtrlEvent(wxCommandEvent& event); void OnSysColourChanged(wxSysColourChangedEvent& event); + void OnKeyEvent(wxKeyEvent& event); // Set customization flags (directs how wxComboCtrlBase helpers behave) void Customize( wxUint32 flags ) { m_iFlags |= flags; } @@ -433,10 +441,7 @@ protected: // popup interface wxComboPopup* m_popupInterface; - // this is for this control itself - wxEvtHandler* m_extraEvtHandler; - - // this is for text + // this is input etc. handler for the text control wxEvtHandler* m_textEvtHandler; // this is for the top level window