X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b0dd9c00ab0f192d58f008f37beed9a2af258d22..852b6c3ce7baa055da25f5254f6ee2eee0cd79b7:/docs/latex/wx/text.tex diff --git a/docs/latex/wx/text.tex b/docs/latex/wx/text.tex index 1de38bcfc8..e93b8103e3 100644 --- a/docs/latex/wx/text.tex +++ b/docs/latex/wx/text.tex @@ -197,6 +197,20 @@ Returns a bitlist indicating which attributes will be set. Returns {\tt true} if this style specifies any non-default attributes. +\membersection{wxTextAttr::Merge}\label{wxtextattrmerge} + +\func{void}{Merge}{\param{const wxTextAttr\&}{ overlay}} + +Copies all defined/valid properties from \arg{overlay} to current object. + +\func{static wxTextAttr}{Merge}{\param{const wxTextAttr\&}{ base}, \param{const wxTextAttr\&}{ overlay}} + +Creates a new {\tt wxTextAttr} which is a merge of \arg{base} and +\arg{overlay}. Properties defined in \arg{overlay} take precedence over those +in \arg{base}. Properties undefined/invalid in both are undefined in the +result. + + \membersection{wxTextAttr::SetAlignment}\label{wxtextattrsetalignment} \func{void}{SetAlignment}{\param{wxTextAttrAlignment}{ alignment}} @@ -306,9 +320,10 @@ used, so that text won't be wrapped. No effect under wxGTK1.} \twocolitem{\windowstyle{wxTE\_LEFT}}{The text in the control will be left-justified (default).} \twocolitem{\windowstyle{wxTE\_CENTRE}}{The text in the control will be centered (currently wxMSW and wxGTK2 only).} \twocolitem{\windowstyle{wxTE\_RIGHT}}{The text in the control will be right-justified (currently wxMSW and wxGTK2 only).} -\twocolitem{\windowstyle{wxTE\_DONTWRAP}}{Same as {\tt wxHSCROLL} style.} -\twocolitem{\windowstyle{wxTE\_LINEWRAP}}{Wrap the lines too long to be shown entirely at any position (wxUniv only currently).} -\twocolitem{\windowstyle{wxTE\_WORDWRAP}}{Wrap the lines too long to be shown entirely at word boundaries only (wxUniv only currently).} +\twocolitem{\windowstyle{wxTE\_DONTWRAP}}{Same as {\tt wxHSCROLL} style: don't wrap at all, show horizontal scrollbar instead.} +\twocolitem{\windowstyle{wxTE\_CHARWRAP}}{Wrap the lines too long to be shown entirely at any position (wxUniv and wxGTK2 only).} +\twocolitem{\windowstyle{wxTE\_WORDWRAP}}{Wrap the lines too long to be shown entirely at word boundaries (wxUniv and wxGTK2 only).} +\twocolitem{\windowstyle{wxTE\_BESTWRAP}}{Wrap the lines at word boundaries or at any other character if there are words longer than the window width (this is the default).} \twocolitem{\windowstyle{wxTE\_CAPITALIZE}}{On PocketPC and Smartphone, causes the first letter to be capitalized.} \end{twocollist} @@ -460,7 +475,7 @@ comes from the program itself (for example, if SetValue() is called)} \twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Respond to a wxEVT\_COMMAND\_TEXT\_ENTER event, generated when enter is pressed in a text control (which must have wxTE\_PROCESS\_ENTER style for this event to be generated).} -\twocolitem{{\bf EVT\_TEXT\_URL(id, func)}}{A mouse event occured over an URL +\twocolitem{{\bf EVT\_TEXT\_URL(id, func)}}{A mouse event occurred over an URL in the text control (wxMSW and wxGTK2 only)} \twocolitem{{\bf EVT\_TEXT\_MAXLEN(id, func)}}{User tried to enter more text into the control than the limit set by @@ -633,7 +648,7 @@ Resets the internal `modified' flag as if the current edits had been saved. \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 +inserted if the given key event had occurred in the text control. The {\it event} object should be the same as the one passed to {\tt EVT\_KEY\_DOWN} handler previously by wxWidgets. @@ -730,19 +745,24 @@ Returns the number of lines in the text control buffer. \wxheading{Remarks} Note that even empty text controls have one line (where the insertion point -is), so GetNumberOfLines() never returns 0. +is), so GetNumberOfLines() never returns $0$. + +For wxGTK using GTK+ 1.2.x and earlier, the number of lines in a multi-line +text control is calculated by actually counting newline characters in the +buffer, i.e. this function returns the number of logical lines and doesn't +depend on whether any of them are wrapped. For all the other platforms, the +number of physical lines in the control is returned. -For gtk\_text (multi-line) controls, the number of lines is -calculated by actually counting newline characters in the buffer. You -may wish to avoid using functions that work with line numbers if you are -working with controls that contain large amounts of text. +Also note that you may wish to avoid using functions that work with line +numbers if you are working with controls that contain large amounts of text as +this function has $O(N)$ complexity for $N$ being the number of lines. \membersection{wxTextCtrl::GetRange}\label{wxtextctrlgetrange} \constfunc{virtual wxString}{GetRange}{\param{long}{ from}, \param{long}{ to}} -Returns the string containing the text staring in the positions {\it from} and +Returns the string containing the text starting in the positions {\it from} and up to {\it to} in the control. The positions must have been returned by another wxTextCtrl method. @@ -798,7 +818,7 @@ support this function. \wxheading{Return value} -{\tt true} on success, {\tt false} if an error occured - it may also mean that +{\tt true} on success, {\tt false} if an error occurred - it may also mean that the styles are not supported under this platform. \wxheading{See also} @@ -852,6 +872,10 @@ 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. +\wxheading{See also} + +\helpref{MarkDirty}{wxtextctrlmarkdirty} + \membersection{wxTextCtrl::IsMultiLine}\label{wxtextctrlismultiline} @@ -922,6 +946,17 @@ Loads and displays the named file, if it exists. %% \helpref{wxKeyEvent}{wxkeyevent} +\membersection{wxTextCtrl::MarkDirty}\label{wxtextctrlmarkdirty} + +\func{void}{MarkDirty}{\void} + +Mark text as modified (dirty). + +\wxheading{See also} + +\helpref{IsModified}{wxtextctrlismodified} + + \membersection{wxTextCtrl::OnDropFiles}\label{wxtextctrlondropfiles} \func{void}{OnDropFiles}{\param{wxDropFilesEvent\& }{event}} @@ -1056,7 +1091,7 @@ wouldn't change it at all). \wxheading{Return value} -{\tt true} on success, {\tt false} if an error occured - may also mean that +{\tt true} on success, {\tt false} if an error occurred - may also mean that the styles are not supported under this platform. \wxheading{See also} @@ -1155,7 +1190,7 @@ not set, the corresponding attribute from \helpref{GetDefaultStyle()}{wxtextctrl \wxheading{Return value} -{\tt true} on success, {\tt false} if an error occured - it may also mean that +{\tt true} on success, {\tt false} if an error occurred - it may also mean that the styles are not supported under this platform. \wxheading{See also} @@ -1231,7 +1266,7 @@ Converts the given zero based column and line number to a position. \wxheading{Return value} -The position value. +The position value, or -1 if {\tt x} or {\tt y} was invalid. \membersection{wxTextCtrl::operator \cinsert}\label{wxtextctrlinsert}