X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df3c4a42d973ec9f4abf9d4f1e5779a40ac310d0..092162bc12858d6912ea6d5371d271ceebd18c49:/include/wx/combo.h diff --git a/include/wx/combo.h b/include/wx/combo.h index 2196b4e5cb..4bae2cfea6 100644 --- a/include/wx/combo.h +++ b/include/wx/combo.h @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: Apr-30-2006 -// RCS-ID: $Id$ // Copyright: (c) Jaakko Salli // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -471,6 +470,10 @@ public: virtual wxWindow *GetMainWindowOfCompositeControl() { return m_mainCtrlWnd; } + // also set the embedded wxTextCtrl colours + virtual bool SetForegroundColour(const wxColour& colour); + virtual bool SetBackgroundColour(const wxColour& colour); + protected: // Returns true if hint text should be drawn in the control @@ -541,11 +544,10 @@ protected: void DestroyPopup(); // override the base class virtuals involved in geometry calculations + // The common version only sets a default width, so the derived classes + // should override it and set the height and change the width as needed. virtual wxSize DoGetBestSize() const; - - // also set the embedded wxTextCtrl colours - virtual bool SetForegroundColour(const wxColour& colour); - virtual bool SetBackgroundColour(const wxColour& colour); + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; // NULL popup can be used to indicate default in a derived class virtual void DoSetPopupControl(wxComboPopup* popup); @@ -560,7 +562,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 +644,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;