📄 richtextctrl.tex
字号:
\membersection{wxRichTextCtrl::DeleteSelectedContent}\label{wxrichtextctrldeleteselectedcontent}\func{bool}{DeleteSelectedContent}{\param{long* }{newPos = NULL}}Deletes content if there is a selection, e.g. when pressing a key.Returns the new caret position in {\it newPos}, or leaves it if therewas no action. This is undoable.\membersection{wxRichTextCtrl::DeleteSelection}\label{wxrichtextctrldeleteselection}\func{void}{DeleteSelection}{\void}Deletes the content in the selection, if any. This is undoable.\membersection{wxRichTextCtrl::DiscardEdits}\label{wxrichtextctrldiscardedits}\func{void}{DiscardEdits}{\void}Sets the buffer's modified status to \false, and clears the buffer's command history.\membersection{wxRichTextCtrl::DoGetBestSize}\label{wxrichtextctrldogetbestsize}\constfunc{wxSize}{DoGetBestSize}{\void}Currently this simply returns {\tt wxSize(10, 10)}.\membersection{wxRichTextCtrl::EndAlignment}\label{wxrichtextctrlendalignment}\func{bool}{EndAlignment}{\void}Ends alignment.\membersection{wxRichTextCtrl::EndAllStyles}\label{wxrichtextctrlendallstyles}\func{bool}{EndAllStyles}{\void}Ends application of all styles in the current style stack.\membersection{wxRichTextCtrl::EndBatchUndo}\label{wxrichtextctrlendbatchundo}\func{bool}{EndBatchUndo}{\void}Ends batching undo command history.\membersection{wxRichTextCtrl::EndBold}\label{wxrichtextctrlendbold}\func{bool}{EndBold}{\void}Ends using bold.\membersection{wxRichTextCtrl::EndCharacterStyle}\label{wxrichtextctrlendcharacterstyle}\func{bool}{EndCharacterStyle}{\void}Ends application of a named character style.\membersection{wxRichTextCtrl::EndFont}\label{wxrichtextctrlendfont}\func{bool}{EndFont}{\void}Ends using a font.\membersection{wxRichTextCtrl::EndFontSize}\label{wxrichtextctrlendfontsize}\func{bool}{EndFontSize}{\void}Ends using a point size.\membersection{wxRichTextCtrl::EndItalic}\label{wxrichtextctrlenditalic}\func{bool}{EndItalic}{\void}Ends using italic.\membersection{wxRichTextCtrl::EndLeftIndent}\label{wxrichtextctrlendleftindent}\func{bool}{EndLeftIndent}{\void}Ends left indent.\membersection{wxRichTextCtrl::EndLineSpacing}\label{wxrichtextctrlendlinespacing}\func{bool}{EndLineSpacing}{\void}Ends line spacing.\membersection{wxRichTextCtrl::EndListStyle}\label{wxrichtextctrlendliststyle}\func{bool}{EndListStyle}{\void}Ends using a specified list style.\membersection{wxRichTextCtrl::EndNumberedBullet}\label{wxrichtextctrlendnumberedbullet}\func{bool}{EndNumberedBullet}{\void}Ends application of a numbered bullet.\membersection{wxRichTextCtrl::EndParagraphSpacing}\label{wxrichtextctrlendparagraphspacing}\func{bool}{EndParagraphSpacing}{\void}Ends paragraph spacing.\membersection{wxRichTextCtrl::EndParagraphStyle}\label{wxrichtextctrlendparagraphstyle}\func{bool}{EndParagraphStyle}{\void}Ends application of a named character style.\membersection{wxRichTextCtrl::EndRightIndent}\label{wxrichtextctrlendrightindent}\func{bool}{EndRightIndent}{\void}Ends right indent.\membersection{wxRichTextCtrl::EndStyle}\label{wxrichtextctrlendstyle}\func{bool}{EndStyle}{\void}Ends the current style.\membersection{wxRichTextCtrl::EndSuppressUndo}\label{wxrichtextctrlendsuppressundo}\func{bool}{EndSuppressUndo}{\void}Ends suppressing undo command history.\membersection{wxRichTextCtrl::EndSymbolBullet}\label{wxrichtextctrlendsymbolbullet}\func{bool}{EndSymbolBullet}{\void}Ends applying a symbol bullet.\membersection{wxRichTextCtrl::EndTextColour}\label{wxrichtextctrlendtextcolour}\func{bool}{EndTextColour}{\void}Ends applying a text colour.\membersection{wxRichTextCtrl::EndUnderline}\label{wxrichtextctrlendunderline}\func{bool}{EndUnderline}{\void}End applying underlining.\membersection{wxRichTextCtrl::EndURL}\label{wxrichtextctrlendurl}\func{bool}{EndURL}{\void}Ends applying a URL.\membersection{wxRichTextCtrl::ExtendSelection}\label{wxrichtextctrlextendselection}\func{bool}{ExtendSelection}{\param{long }{oldPosition}, \param{long }{newPosition}, \param{int }{flags}}Helper function for extending the selection, returning \true if the selection waschanged. Selections are in caret positions.\membersection{wxRichTextCtrl::FindNextWordPosition}\label{wxrichtextctrlfindnextwordposition}\constfunc{long}{FindNextWordPosition}{\param{int }{direction = 1}}Helper function for finding the caret position for the next word. Directionis 1 (forward) or -1 (backwards).\membersection{wxRichTextCtrl::Freeze}\label{wxrichtextctrlfreeze}\func{void}{Freeze}{\void}Call this function to prevent refresh and allow fast updates, and then \helpref{Thaw}{wxrichtextctrlthaw} torefresh the control.\membersection{wxRichTextCtrl::GetBasicStyle}\label{wxrichtextctrlgetbasicstyle}\constfunc{const wxTextAttrEx\&}{GetBasicStyle}{\void}Gets the basic (overall) style. This is the style of the wholebuffer before further styles are applied, unlike the default style, whichonly affects the style currently being applied (for example, setting the defaultstyle to bold will cause subsequently inserted text to be bold).\membersection{wxRichTextCtrl::GetBuffer}\label{wxrichtextctrlgetbuffer}\constfunc{const wxRichTextBuffer\&}{GetBuffer}{\void}\func{wxRichTextBuffer\&}{GetBuffer}{\void}Returns the buffer associated with the control.\membersection{wxRichTextCtrl::GetCaretPosition}\label{wxrichtextctrlgetcaretposition}\constfunc{long}{GetCaretPosition}{\void}Returns the current caret position.\membersection{wxRichTextCtrl::GetCaretPositionForIndex}\label{wxrichtextctrlgetcaretpositionforindex}\func{bool}{GetCaretPositionForIndex}{\param{long }{position}, \param{wxRect\& }{rect}}Returns the caret height and position for the given character position\membersection{wxRichTextCtrl::GetCommandProcessor}\label{wxrichtextctrlgetcommandprocessor}\constfunc{wxCommandProcessor*}{GetCommandProcessor}{\void}Gets the command processor associated with the control's buffer.\membersection{wxRichTextCtrl::GetDefaultStyleEx}\label{wxrichtextctrlgetdefaultstyleex}\constfunc{const wxTextAttrEx\&}{GetDefaultStyleEx}{\void}Returns the current default style, which can be used to change how subsequently insertedtext is displayed. When wxTextAttrEx is merged with wxTextAttr, this functionwill become GetDefaultStyle.\membersection{wxRichTextCtrl::GetDelayedLayoutThreshold}\label{wxrichtextctrlgetdelayedlayoutthreshold}\constfunc{long}{GetDelayedLayoutThreshold}{\void}Gets the size of the buffer beyond which layout is delayed during resizing.This optimizes sizing for large buffers. The default is 20000.\membersection{wxRichTextCtrl::GetFilename}\label{wxrichtextctrlgetfilename}\constfunc{wxString}{GetFilename}{\void}Gets the current filename associated with the control.\membersection{wxRichTextCtrl::GetFirstVisiblePosition}\label{wxrichtextctrlgetfirstvisibleposition}\constfunc{long}{GetFirstVisiblePosition}{\void}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 eachhandler class to see what flags are relevant for each handler.\membersection{wxRichTextCtrl::GetInsertionPoint}\label{wxrichtextctrlgetinsertionpoint}\constfunc{long}{GetInsertionPoint}{\void}Returns the current insertion point.\membersection{wxRichTextCtrl::GetLastPosition}\label{wxrichtextctrlgetlastposition}\constfunc{wxTextPos}{GetLastPosition}{\void}Returns the last position in the buffer.\membersection{wxRichTextCtrl::GetLineLength}\label{wxrichtextctrlgetlinelength}\constfunc{int}{GetLineLength}{\param{long }{lineNo}}Returns the length of the specified line in characters.\membersection{wxRichTextCtrl::GetLineText}\label{wxrichtextctrlgetlinetext}\constfunc{wxString}{GetLineText}{\param{long }{lineNo}}Returns the text for the given line.\membersection{wxRichTextCtrl::GetLogicalPoint}\label{wxrichtextctrlgetlogicalpoint}\constfunc{wxPoint}{GetLogicalPoint}{\param{const wxPoint\& }{ptPhysical}}Transforms physical window position to logical (unscrolled) position.\membersection{wxRichTextCtrl::GetNumberOfLines}\label{wxrichtextctrlgetnumberoflines}\constfunc{int}{GetNumberOfLines}{\void}Returns the number of lines in the buffer.\membersection{wxRichTextCtrl::GetPhysicalPoint}\label{wxrichtextctrlgetphysicalpoint}\constfunc{wxPoint}{GetPhysicalPoint}{\param{const wxPoint\& }{ptLogical}}Transforms logical (unscrolled) position to physical window position.\membersection{wxRichTextCtrl::GetRange}\label{wxrichtextctrlgetrange}\constfunc{wxString}{GetRange}{\param{long }{from}, \param{long }{to}}Gets the text for the given range.The end point of range is specified as the last character position of the span of text, plus one.\membersection{wxRichTextCtrl::GetSelection}\label{wxrichtextctrlgetselection}\constfunc{void}{GetSelection}{\param{long* }{from}, \param{long* }{to}}Returns the range of the current selection.The end point of range is specified as the last character position of the span of text, plus one.If the return values {\it from} and {\it to} are the same, there is no selection.\membersection{wxRichTextCtrl::GetSelectionRange}\label{wxrichtextctrlgetselectionrange}\constfunc{const wxRichTextRange\&}{GetSelectionRange}{\void}Returns the selection range in character positions. -1, -1 means no selection.\membersection{wxRichTextCtrl::GetStringSelection}\label{wxrichtextctrlgetstringselection}\constfunc{wxString}{GetStringSelection}{\void}Returns the text within the current selection range, if any.\membersection{wxRichTextCtrl::GetStyle}\label{wxrichtextctrlgetstyle}\func{bool}{GetStyle}{\param{long }{position}, \param{wxRichTextAttr\& }{style}}\func{bool}{GetStyle}{\param{long }{position}, \param{wxTextAttrEx\& }{style}}\func{bool}{GetStyle}{\param{long }{position}, \param{wxTextAttr\& }{style}}Gets the attributes at the given position. The wxRichTextAttr version is generally more efficientbecause it does not use wxFont objects.This function gets the combined style - that is, the style you see on the screen as a resultof combining base style, paragraph style and character style attributes. To get the characteror 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 willnot be included in {\it style}'s flags.\membersection{wxRichTextCtrl::GetStyleSheet}\label{wxrichtextctrlgetstylesheet}\constfunc{wxRichTextStyleSheet*}{GetStyleSheet}{\void}Returns the style sheet associated with the control, if any. A style sheet allows namedcharacter and paragraph styles to be applied.\membersection{wxRichTextCtrl::GetUncombinedStyle}\label{wxrichtextctrlgetuncombinedstyle}\func{bool}{GetUncombinedStyle}{\param{long }{position}, \param{wxRichTextAttr\& }{style}}\func{bool}{GetUncombinedStyle}{\param{long }{position}, \param{wxTextAttrEx\& }{style}}\func{bool}{GetUncombinedStyle}{\param{long }{position}, \param{wxTextAttr\& }{style}}Gets the attributes at the given position. The wxRichTextAttr version is generally more efficientbecause it does not use wxFont objects.This function gets the {\it uncombined style} - that is, the attributes associated with theparagraph or character content, and not necessarily the combined attributes you see on thescreen. To get the combined attributes, use \helpref{GetStyle}{wxrichtextctrlgetstyle}.If you specify (any) paragraph attribute in {\it style}'s flags, this function will fetchthe paragraph attributes. Otherwise, it will return the character attributes.\membersection{wxRichTextCtrl::GetValue}\label{wxrichtextctrlgetvalue}\constfunc{wxString}{GetValue}{\void}Returns the content of the entire control as a string.\membersection{wxRichTextCtrl::GetVisibleLineForCaretPosition}\label{wxrichtextctrlgetvisiblelineforcaretposition}\constfunc{wxRichTextLine*}{GetVisibleLineForCaretPosition}{\param{long }{caretPosition}}Internal helper function returning the line for the visible caret position. If the caret is
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -