// Name: wx/combo.h
// Purpose: wxComboCtrl declaration
// Author: Jaakko Salli
-// Modified by:
+// Modified by:
// Created: Apr-30-2006
// RCS-ID: $Id$
// Copyright: (c) Jaakko Salli
// set interface class instance derived from wxComboPopup
// NULL popup can be used to indicate default in a derived class
- virtual void SetPopupControl( wxComboPopup* popup );
+ void SetPopupControl( wxComboPopup* popup )
+ {
+ DoSetPopupControl(popup);
+ }
// get interface class instance derived from wxComboPopup
- wxComboPopup* GetPopupControl() const { return m_popupInterface; }
+ wxComboPopup* GetPopupControl()
+ {
+ EnsurePopupControl();
+ return m_popupInterface;
+ }
// get the popup window containing the popup control
wxWindow *GetPopupWindow() const { return m_winPopup; }
// 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 );
+ virtual void DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags ) const;
// Returns true if focus indicator should be drawn in the control.
bool ShouldDrawFocus() const
// Creates popup window, calls interface->Create(), etc
void CreatePopup();
+ // Destroy popup window and all related constructs
+ void DestroyPopup();
+
// override the base class virtuals involved in geometry calculations
- virtual void DoMoveWindow(int x, int y, int width, int height);
virtual wxSize DoGetBestSize() const;
+ // NULL popup can be used to indicate default in a derived class
+ virtual void DoSetPopupControl(wxComboPopup* popup);
+
// ensures there is atleast the default popup
void EnsurePopupControl();