]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/combo.h
[ 1487463 ] XRC handler for wxOwnerDrawnComboBox.
[wxWidgets.git] / include / wx / combo.h
index db19acef5b161143fd3bd4ef35601d5093f69ead..fdece4b675f4c09f88cd9d5962ce08bbedead3fc 100644 (file)
@@ -2,7 +2,7 @@
 // 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
@@ -156,10 +156,17 @@ public:
 
     // 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; }
@@ -300,7 +307,7 @@ public:
     // 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
@@ -371,10 +378,15 @@ protected:
     // 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();