X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0ec1179b86dac6c87ad9f2cd126f87e92642c62c..ccd5d46c7b69632eaa231e8fc7801dd5af2faaa8:/src/generic/srchctlg.cpp diff --git a/src/generic/srchctlg.cpp b/src/generic/srchctlg.cpp index 3fe46f2ea1..e520c7dd24 100644 --- a/src/generic/srchctlg.cpp +++ b/src/generic/srchctlg.cpp @@ -137,9 +137,20 @@ public: // provide access to the base class protected methods to wxSearchCtrl which // needs to forward to them - using wxTextCtrl::DoSetValue; - using wxTextCtrl::DoLoadFile; - using wxTextCtrl::DoSaveFile; + void DoSetValue(const wxString& value, int flags) + { + wxTextCtrl::DoSetValue(value, flags); + } + + bool DoLoadFile(const wxString& file, int fileType) + { + return wxTextCtrl::DoLoadFile(file, fileType); + } + + bool DoSaveFile(const wxString& file, int fileType) + { + return wxTextCtrl::DoSaveFile(file, fileType); + } protected: void OnText(wxCommandEvent& eventText) @@ -521,6 +532,8 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height) y += BORDER; width -= horizontalBorder*2; height -= BORDER*2; + if (width < 0) width = 0; + if (height < 0) height = 0; wxSize sizeSearch(0,0); wxSize sizeCancel(0,0); @@ -547,6 +560,7 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height) cancelMargin = 0; } wxCoord textWidth = width - sizeSearch.x - sizeCancel.x - searchMargin - cancelMargin - 1; + if (textWidth < 0) textWidth = 0; // position the subcontrols inside the client area @@ -797,7 +811,7 @@ long wxSearchCtrl::GetInsertionPoint() const { return m_text->GetInsertionPoint(); } -wxTextPos wxSearchCtrl::GetLastPosition() const +long wxSearchCtrl::GetLastPosition() const { return m_text->GetLastPosition(); }