]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxComboPopup::GetComboCtrl()
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 22 Feb 2009 15:13:29 +0000 (15:13 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 22 Feb 2009 15:13:29 +0000 (15:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/combo.h
interface/wx/combo.h
src/common/combocmn.cpp

index 658861ce132129b41a9a4068ac689a9acbfa660e..2ac66cda0a27164822e4aafa98f41a33d2bc0564 100644 (file)
@@ -644,6 +644,8 @@ enum
     wxCP_IFLAG_CREATED      = 0x0001 // Set by wxComboCtrlBase after Create is called
 };
 
+class WXDLLIMPEXP_FWD_CORE wxComboCtrl;
+
 
 class WXDLLIMPEXP_CORE wxComboPopup
 {
@@ -721,6 +723,9 @@ public:
         return (m_iFlags & wxCP_IFLAG_CREATED) ? true : false;
     }
 
+    // Returns pointer to the associated parent wxComboCtrl.
+    wxComboCtrl* GetComboCtrl() const;
+
     // Default PaintComboControl behaviour
     static void DefaultPaintComboControl( wxComboCtrlBase* combo,
                                           wxDC& dc,
index 4cfafc2598181d88d9d2e40ebcf0feee5eee4c7b..4bcc4c9988cf864c790ce26416267c5a3074fc57 100644 (file)
@@ -56,6 +56,11 @@ public:
     */
     virtual wxSize GetAdjustedSize(int minWidth, int prefHeight, int maxHeight);
 
+    /**
+        Returns pointer to the associated parent wxComboCtrl.
+    */
+    wxComboCtrl* GetComboCtrl() const;
+
     /**
         The derived class must implement this to return pointer to the
         associated control created in Create().
index 06b3cf23ce1a8580f9ec565e92d7ad5f549e92d6..17b6a376639c6a4a1c0dff1728523b20f9aa3180 100644 (file)
@@ -499,6 +499,11 @@ void wxComboPopup::OnDismiss()
 {
 }
 
+wxComboCtrl* wxComboPopup::GetComboCtrl() const
+{
+    return wxStaticCast(m_combo, wxComboCtrl);
+}
+
 wxSize wxComboPopup::GetAdjustedSize( int minWidth,
                                       int prefHeight,
                                       int WXUNUSED(maxHeight) )