// 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)
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);
cancelMargin = 0;
}
wxCoord textWidth = width - sizeSearch.x - sizeCancel.x - searchMargin - cancelMargin - 1;
+ if (textWidth < 0) textWidth = 0;
// position the subcontrols inside the client area
// accessors
// ---------
-wxString wxSearchCtrl::GetValue() const
+wxString wxSearchCtrl::DoGetValue() const
{
wxString value = m_text->GetValue();
if (value == m_text->GetDescriptiveText())
else
return value;
}
-void wxSearchCtrl::SetValue(const wxString& value)
-{
- m_text->SetValue(value);
-}
-
wxString wxSearchCtrl::GetRange(long from, long to) const
{
return m_text->GetRange(from, to);
{
return m_text->GetInsertionPoint();
}
-wxTextPos wxSearchCtrl::GetLastPosition() const
+long wxSearchCtrl::GetLastPosition() const
{
return m_text->GetLastPosition();
}