GetSelection --> GetStringSelection

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-11-14 03:50:11 +00:00
parent 973983be62
commit eef97940e8
5 changed files with 12 additions and 12 deletions

View File

@@ -371,8 +371,8 @@ no selection.
Please note that the indices returned may be used with the other wxTextctrl Please note that the indices returned may be used with the other wxTextctrl
methods but don't necessarily represent the correct indices into the string methods but don't necessarily represent the correct indices into the string
returned by \helpref{GetValue()}{wxtextctrlgetvalue} for multiline controls returned by \helpref{GetValue()}{wxtextctrlgetvalue} for multiline controls
under Windows, you should use another version of under Windows (at least,) you should use
\helpref{GetSelection()}{wxtextctrlgetselectionstring} to get the selected \helpref{GetStringSelection()}{wxtextctrlgetstringselection} to get the selected
text. text.
\wxheading{Parameters} \wxheading{Parameters}
@@ -387,9 +387,9 @@ consisting of the from and to values.}
\perlnote{In wxPerl this method takes no parameter and returns a \perlnote{In wxPerl this method takes no parameter and returns a
2-element list {\tt ( from, to )}.} 2-element list {\tt ( from, to )}.}
\membersection{wxTextCtrl::GetSelection}\label{wxtextctrlgetselectionstring} \membersection{wxTextCtrl::GetStringSelection}\label{wxtextctrlgetstringselection}
\func{virtual wxString}{GetSelection}{\void} \func{virtual wxString}{GetStringSelection}{\void}
Gets the text currently selected in the control. If there is no selection, the Gets the text currently selected in the control. If there is no selection, the
returned string is empty. returned string is empty.

View File

@@ -56,7 +56,7 @@ public:
virtual bool IsEditable() const; virtual bool IsEditable() const;
virtual void GetSelection(long* from, long* to) const; virtual void GetSelection(long* from, long* to) const;
virtual wxString GetSelection() const; virtual wxString GetStringSelection() const;
// operations // operations
// ---------- // ----------

View File

@@ -157,7 +157,7 @@ public:
// If the return values from and to are the same, there is no selection. // If the return values from and to are the same, there is no selection.
virtual void GetSelection(long* from, long* to) const = 0; virtual void GetSelection(long* from, long* to) const = 0;
virtual wxString GetSelection() const; virtual wxString GetStringSelection() const;
// operations // operations
// ---------- // ----------

View File

@@ -244,7 +244,7 @@ void wxTextCtrlBase::SelectAll()
SetSelection(0, GetLastPosition()); SetSelection(0, GetLastPosition());
} }
wxString wxTextCtrlBase::GetSelection() const wxString wxTextCtrlBase::GetStringSelection() const
{ {
long from, to; long from, to;
GetSelection(&from, &to); GetSelection(&from, &to);

View File

@@ -648,7 +648,7 @@ void wxTextCtrl::GetSelection(long* from, long* to) const
} }
} }
wxString wxTextCtrl::GetSelection() const wxString wxTextCtrl::GetStringSelection() const
{ {
// the base class version works correctly for the rich text controls // the base class version works correctly for the rich text controls
// because there the lines are terminated with just '\r' which means that // because there the lines are terminated with just '\r' which means that
@@ -657,7 +657,7 @@ wxString wxTextCtrl::GetSelection() const
// we break the indices // we break the indices
#if wxUSE_RICHEDIT #if wxUSE_RICHEDIT
if ( m_isRich ) if ( m_isRich )
return wxTextCtrlBase::GetSelection(); return wxTextCtrlBase::GetStringSelection();
#endif // wxUSE_RICHEDIT #endif // wxUSE_RICHEDIT
long from, to; long from, to;