X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bed867e3f9184ece082be1de71fb112170a94959..e10972f6c1436a6dcd5427b4e3913bb0f398e045:/include/wx/combo.h diff --git a/include/wx/combo.h b/include/wx/combo.h index 622d33f8c9..3806ca1a8a 100644 --- a/include/wx/combo.h +++ b/include/wx/combo.h @@ -87,7 +87,7 @@ enum wxCC_IFLAG_CREATED = 0x0100, // Internal use: really put button outside wxCC_IFLAG_BUTTON_OUTSIDE = 0x0200, - // Internal use: SetMargins has been succesfully called + // Internal use: SetMargins has been successfully called wxCC_IFLAG_LEFT_MARGIN_SET = 0x0400, // Internal use: Set wxTAB_TRAVERSAL to parent when popup is dismissed wxCC_IFLAG_PARENT_TAB_TRAVERSAL = 0x0800, @@ -560,7 +560,8 @@ protected: // Standard textctrl positioning routine. Just give it platform-dependant // textctrl coordinate adjustment. - virtual void PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust ); + virtual void PositionTextCtrl( int textCtrlXAdjust = 0, + int textCtrlYAdjust = 0); // event handlers void OnSizeEvent( wxSizeEvent& event ); @@ -641,7 +642,7 @@ protected: // main (ie. topmost) window of a composite control (default = this) wxWindow* m_mainCtrlWnd; - // used to prevent immediate re-popupping incase closed popup + // used to prevent immediate re-popupping in case closed popup // by clicking on the combo control (needed because of inconsistent // transient implementation across platforms). wxLongLong m_timeCanAcceptClick; @@ -674,7 +675,7 @@ protected: wxRect m_tcArea; wxRect m_btnArea; - // Colour of the the text area, in case m_text is NULL + // Colour of the text area, in case m_text is NULL wxColour m_tcBgCol; // current button state (uses renderer flags) @@ -767,6 +768,13 @@ public: // Return true for success. virtual bool Create(wxWindow* parent) = 0; + // Calls Destroy() for the popup control (i.e. one returned by + // GetControl()) and makes sure that 'this' is deleted at the end. + // Default implementation works for both cases where popup control + // class is multiple inherited or created on heap as a separate + // object. + virtual void DestroyPopup(); + // We must have an associated control which is subclassed by the combobox. virtual wxWindow *GetControl() = 0;