// Utilies needed by the popups or native implementations
//
- // Draws focus background (on combo control) in a way typical on platform.
+ // 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;
+
+ // Prepare background of combo control or an item in a dropdown list
+ // in a way typical on platform. This includes painting the focus/disabled
+ // background and setting the clipping region.
// Unless you plan to paint your own focus indicator, you should always call this
// in your wxComboPopup::PaintComboControl implementation.
// In addition, it sets pen and text colour to what looks good and proper
// flags: wxRendererNative flags: wxCONTROL_ISSUBMENU: is drawing a list item instead of combo control
// wxCONTROL_SELECTED: list item is selected
// wxCONTROL_DISABLED: control/item is disabled
- virtual void DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags ) const;
+ virtual void PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const;
// Returns true if focus indicator should be drawn in the control.
bool ShouldDrawFocus() const
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 );
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; }
// 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