X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74ede4ebf0768b16e30e71f2db9f00c9efe1763d..feb6cde446a73ac2fe9ea0528d6c6eb16cc040fd:/docs/latex/wx/text.tex diff --git a/docs/latex/wx/text.tex b/docs/latex/wx/text.tex index 41c7ddb979..7c576bb75b 100644 --- a/docs/latex/wx/text.tex +++ b/docs/latex/wx/text.tex @@ -95,7 +95,7 @@ streambuf\\ the message wxEVENT\_TYPE\_TEXT\_ENTER\_COMMAND (otherwise pressing is either processed internally by the control or used for navigation between dialog controls).} -\twocolitem{\windowstyle{wxTE\_PROCESS\_TAB}}{The control will receieve +\twocolitem{\windowstyle{wxTE\_PROCESS\_TAB}}{The control will receive EVT\_CHAR messages for TAB pressed - normally, TAB is used for passing to the next control in a dialog instead. For the control created with this style, you can still use Ctrl-Enter to pass to the next control from the keyboard.} @@ -395,6 +395,20 @@ Copies the selected text to the clipboard and removes the selection. Resets the internal `modified' flag as if the current edits had been saved. +\membersection{wxTextCtrl::EmulateKeyPress} + +\func{bool}{EmulateKeyPress}{\param{const wxKeyEvent\& }{event}} + +This functions inserts into the control the character which would have been +inserted if the given key event had occured in the text control. The +{\it event} object should be the same as the one passed to {\tt EVT\_KEY\_DOWN} +handler previously by wxWindows. + +\wxheading{Return value} + +{\tt TRUE} if the event resulted in a change to the control, {\tt FALSE} +otherwise. + \membersection{wxTextCtrl::GetDefaultStyle}\label{wxtextctrlgetdefaultstyle} \constfunc{const wxTextAttr\& }{GetDefaultStyle}{\void} @@ -537,6 +551,15 @@ Gets the contents of the control. Notice that for a multiline text control, the lines will be separated by (Unix-style) $\backslash$n characters, even under Windows where they are separated by a $\backslash$r$\backslash$n sequence in the native control. +\membersection{wxTextCtrl::IsEditable}\label{wxtextctrliseditable} + +\constfunc{bool}{IsEditable}{\void} + +Returns {\tt TRUE} if the controls contents may be edited by user (note that it +always can be changed by the program), i.e. if the control hasn't been put in +read-only mode by a previous call to +\helpref{SetEditable}{wxtextctrlseteditable}. + \membersection{wxTextCtrl::IsModified}\label{wxtextctrlismodified} \constfunc{bool}{IsModified}{\void} @@ -558,33 +581,35 @@ Loads and displays the named file, if it exists. {\tt TRUE} if successful, {\tt FALSE} otherwise. -\membersection{wxTextCtrl::OnChar}\label{wxtextctrlonchar} - -\func{void}{OnChar}{\param{wxKeyEvent\& }{event}} - -Default handler for character input. - -\wxheading{Remarks} - -It is possible to intercept character -input by overriding this member. Call this function -to let the default behaviour take place; not calling -it results in the character being ignored. You can -replace the {\it keyCode} member of {\it event} to -translate keystrokes. - -Note that Windows and Motif have different ways -of implementing the default behaviour. In Windows, -calling wxTextCtrl::OnChar immediately -processes the character. In Motif, -calling this function simply sets a flag -to let default processing happen. This might affect -the way in which you write your OnChar function -on different platforms. - -\wxheading{See also} - -\helpref{wxKeyEvent}{wxkeyevent} +% VZ: commenting this out as: (a) the docs are wrong (you can't replace +% anything), (b) wxTextCtrl doesn't have any OnChar() anyhow +%% \membersection{wxTextCtrl::OnChar}\label{wxtextctrlonchar} +%% +%% \func{void}{OnChar}{\param{wxKeyEvent\& }{event}} +%% +%% Default handler for character input. +%% +%% \wxheading{Remarks} +%% +%% It is possible to intercept character +%% input by overriding this member. Call this function +%% to let the default behaviour take place; not calling +%% it results in the character being ignored. You can +%% replace the {\it keyCode} member of {\it event} to +%% translate keystrokes. +%% +%% Note that Windows and Motif have different ways +%% of implementing the default behaviour. In Windows, +%% calling wxTextCtrl::OnChar immediately +%% processes the character. In Motif, +%% calling this function simply sets a flag +%% to let default processing happen. This might affect +%% the way in which you write your OnChar function +%% on different platforms. +%% +%% \wxheading{See also} +%% +%% \helpref{wxKeyEvent}{wxkeyevent} \membersection{wxTextCtrl::OnDropFiles}\label{wxtextctrlondropfiles} @@ -730,6 +755,10 @@ Makes the text item editable or read-only, overriding the {\bf wxTE\_READONLY} f \docparam{editable}{If {\tt TRUE}, the control is editable. If {\tt FALSE}, the control is read-only.} +\wxheading{See also} + +\helpref{IsEditable}{wxtextctrliseditable} + \membersection{wxTextCtrl::SetInsertionPoint}\label{wxtextctrlsetinsertionpoint} \func{virtual void}{SetInsertionPoint}{\param{long}{ pos}} @@ -755,7 +784,7 @@ This function sets the maximum number of characters the user can enter into the control. In other words, it allows to limit the text value length to {\it len} not counting the terminating {\tt NUL} character. -If {\it len} is $0$, the previously set max length limi, if any, is discarded +If {\it len} is $0$, the previously set max length limit, if any, is discarded and the user may enter as much text as the underlying native text control widget supports (typically at least 32Kb).