added (and documented) trivial but useful IsSingleLine() and IsMultiLine() text control methods

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-07-21 18:51:04 +00:00
parent 5bf75ae769
commit aa8e9a36c4
2 changed files with 26 additions and 0 deletions

View File

@ -567,6 +567,28 @@ read-only mode by a previous call to
Returns {\tt TRUE} if the text has been modified by user. Note that calling
\helpref{SetValue}{wxtextctrlsetvalue} doesn't make the control modified.
\membersection{wxTextCtrl::IsMultiLine}\label{wxtextctrlismultiline}
\constfunc{bool}{IsMultiLine}{\void}
Returns {\tt TRUE} if this is a multi line edit control and {\tt FALSE}
otherwise.
\wxheading{See also}
\helpref{IsSingleLine}{wxtextctrlissingleline}
\membersection{wxTextCtrl::IsSingleLine}\label{wxtextctrlissingleline}
\constfunc{bool}{IsSingleLine}{\void}
Returns {\tt TRUE} if this is a single line edit control and {\tt FALSE}
otherwise.
\wxheading{See also}
\helpref{IsMultiLine}{wxtextctrlissingleline}
\membersection{wxTextCtrl::LoadFile}\label{wxtextctrlloadfile}
\func{bool}{LoadFile}{\param{const wxString\& }{ filename}}

View File

@ -174,6 +174,10 @@ public:
virtual bool IsModified() const = 0;
virtual bool IsEditable() const = 0;
// more readable flag testing methods
bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); }
bool IsMultiLine() const { return !IsSingleLine(); }
// If the return values from and to are the same, there is no selection.
virtual void GetSelection(long* from, long* to) const = 0;