X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/21d23b882fcce7b7582ae3e3f71a069a6d2940df..852b6c3ce7baa055da25f5254f6ee2eee0cd79b7:/docs/latex/wx/text.tex?ds=sidebyside diff --git a/docs/latex/wx/text.tex b/docs/latex/wx/text.tex index a3413657ec..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}} @@ -731,12 +745,17 @@ 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}