X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/62f4313b72a110a7a1afdbc34f7aaa755f995828..3cc305b2b4a0674c56c84d7088cfd70676b850f0:/docs/latex/wx/richtextctrl.tex diff --git a/docs/latex/wx/richtextctrl.tex b/docs/latex/wx/richtextctrl.tex index b3d4787647..1c6b91a101 100644 --- a/docs/latex/wx/richtextctrl.tex +++ b/docs/latex/wx/richtextctrl.tex @@ -3,6 +3,12 @@ wxRichTextCtrl provides a generic, ground-up implementation of a text control capable of showing multiple styles and images. +wxRichTextCtrl sends notification events: see \helpref{wxRichTextEvent}{wxrichtextevent}. +It also sends the standard wxTextCtrl events wxEVT\_COMMAND\_TEXT\_ENTER and wxEVT\_COMMAND\_TEXT\_UPDATED, +and wxTextUrlEvent when URL content is clicked. + +For more information, see the \helpref{wxRichTextCtrl overview}{wxrichtextctrloverview}. + \wxheading{Derived from} wxTextCtrlBase @@ -11,6 +17,10 @@ wxTextCtrlBase +\wxheading{Library} + +\helpref{wxRichtext}{librarieslist} + \wxheading{Data structures} \latexignore{\rtfignore{\wxheading{Members}}} @@ -19,7 +29,9 @@ wxTextCtrlBase \func{}{wxRichTextCtrl}{\void} -\func{}{wxRichTextCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxString\& }{value = wxEmptyString}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxRE\_MULTILINE}} +\func{}{wxRichTextCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxString\& }{value = wxEmptyString}, + \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxRE\_MULTILINE}, + \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = wxTextCtrlNameStr}} Constructors. @@ -345,7 +357,9 @@ Copies the selected content (if any) to the clipboard. \membersection{wxRichTextCtrl::Create}\label{wxrichtextctrlcreate} -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxString\& }{value = wxEmptyString}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxRE\_MULTILINE}} +\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxString\& }{value = wxEmptyString}, + \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxRE\_MULTILINE}, + \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = wxTextCtrlNameStr}} Creates the underlying window. @@ -356,6 +370,12 @@ Creates the underlying window. Copies the selected content (if any) to the clipboard and deletes the selection. This is undoable. +\membersection{wxRichTextCtrl::Delete}\label{wxrichtextctrldelete} + +\func{bool}{Delete}{\param{const wxRichTextRange\&}{ range}} + +Deletes the content within the given range. + \membersection{wxRichTextCtrl::DeleteSelectedContent}\label{wxrichtextctrldeleteselectedcontent} \func{bool}{DeleteSelectedContent}{\param{long* }{newPos = NULL}} @@ -591,6 +611,13 @@ Gets the current filename associated with the control. Returns the first visible position in the current view. +\membersection{wxRichTextCtrl::GetHandlerFlags}\label{wxrichtextfilehandlergethandlerflags} + +\constfunc{int}{GetHandlerFlags}{\void} + +Returns flags that change the behaviour of loading or saving. See the documentation for each +handler class to see what flags are relevant for each handler. + \membersection{wxRichTextCtrl::GetInsertionPoint}\label{wxrichtextctrlgetinsertionpoint} \constfunc{long}{GetInsertionPoint}{\void} @@ -678,6 +705,15 @@ This function gets the combined style - that is, the style you see on the screen of combining base style, paragraph style and character style attributes. To get the character or paragraph style alone, use \helpref{GetUncombinedStyle}{wxrichtextctrlgetuncombinedstyle}. +\membersection{wxRichTextCtrl::GetStyleForRange}\label{wxrichtextctrlgetstyleforrange} + +\func{bool}{GetStyleForRange}{\param{const wxRichTextRange\& }{range}, \param{wxRichTextAttr\& }{style}} + +\func{bool}{GetStyleForRange}{\param{const wxRichTextRange\& }{range}, \param{wxTextAttrEx\& }{style}} + +Gets the attributes common to the specified range. Attributes that differ in value within the range will +not be included in {\it style}'s flags. + \membersection{wxRichTextCtrl::GetStyleSheet}\label{wxrichtextctrlgetstylesheet} \constfunc{wxRichTextStyleSheet*}{GetStyleSheet}{\void} @@ -887,6 +923,14 @@ Lays out the buffer, which must be done before certain operations, such as setting the caret position. This function should not normally be required by the application. +\membersection{wxRichTextCtrl::LineBreak}\label{wxrichtextctrllinebreak} + +\func{bool}{LineBreak}{\void} + +Inserts a line break at the current insertion point. A line break forces wrapping within a paragraph, and +can be introduced by using this function, by appending the wxChar value {\bf wxRichTextLineBreakChar} to text content, +or by typing Shift-Return. + \membersection{wxRichTextCtrl::LoadFile}\label{wxrichtextctrlloadfile} \func{bool}{LoadFile}{\param{const wxString\& }{file}, \param{int }{type = wxRICHTEXT\_TYPE\_ANY}} @@ -988,7 +1032,7 @@ Moves up. \func{bool}{Newline}{\void} -Insert a newline (actually paragraph) at the current insertion point. +Inserts a new paragraph at the current insertion point. See also \helpref{wxRichTextCtrl::LineBreak}{wxrichtextctrllinebreak}. \membersection{wxRichTextCtrl::NumberList}\label{wxrichtextctrlnumberlist} @@ -1271,6 +1315,13 @@ Sets the current filename. Sets the font, and also the basic and default attributes (see \helpref{SetDefaultStyle}{wxrichtextctrlsetdefaultstyle}). +\membersection{wxRichTextCtrl::SetHandlerFlags}\label{wxrichtextctrlsethandlerflags} + +\func{void}{SetHandlerFlags}{\param{int }{flags}} + +Sets flags that change the behaviour of loading or saving. See the documentation for each +handler class to see what flags are relevant for each handler. + \membersection{wxRichTextCtrl::SetInsertionPoint}\label{wxrichtextctrlsetinsertionpoint} \func{void}{SetInsertionPoint}{\param{long }{pos}} @@ -1309,7 +1360,7 @@ See also \helpref{wxRichTextCtrl::NumberList}{wxrichtextctrlnumberlist}, \helpre Sets the selection to the given range. The end point of range is specified as the last character position of the span of text, plus one. -So, for example, to set the style for a character at position 5, use the range (5,6). +So, for example, to set the selection for a character at position 5, use the range (5,6). \membersection{wxRichTextCtrl::SetSelectionRange}\label{wxrichtextctrlsetselectionrange} @@ -1318,7 +1369,7 @@ So, for example, to set the style for a character at position 5, use the range ( Sets the selection to the given range. The end point of range is specified as the last character position of the span of text, plus one. -So, for example, to set the style for a character at position 5, use the range (5,6). +So, for example, to set the selection for a character at position 5, use the range (5,6). \membersection{wxRichTextCtrl::SetStyle}\label{wxrichtextctrlsetstyle} @@ -1355,10 +1406,12 @@ So, for example, to set the style for a character at position 5, use the range ( \item wxRICHTEXT\_SETSTYLE\_WITH\_UNDO: specifies that this operation should be undoable. \item wxRICHTEXT\_SETSTYLE\_OPTIMIZE: specifies that the style should not be applied if the combined style at this point is already the style in question. -\item define wxRICHTEXT\_SETSTYLE\_PARAGRAPHS\_ONLY: specifies that the style should only be applied to paragraphs, +\item wxRICHTEXT\_SETSTYLE\_PARAGRAPHS\_ONLY: specifies that the style should only be applied to paragraphs, and not the content. This allows content styling to be preserved independently from that of e.g. a named paragraph style. \item wxRICHTEXT\_SETSTYLE\_CHARACTERS\_ONLY: specifies that the style should only be applied to characters, and not the paragraph. This allows content styling to be preserved independently from that of e.g. a named paragraph style. +\item wxRICHTEXT\_SETSTYLE\_RESET: resets (clears) the existing style before applying the new style. +\item wxRICHTEXT\_SETSTYLE\_REMOVE: removes the specified style. Only the style flags are used in this operation. \end{itemize} \membersection{wxRichTextCtrl::SetStyleSheet}\label{wxrichtextctrlsetstylesheet}