richtextctrl.tex
来自「Wxpython Implemented on Windows CE, Sou」· TEX 代码 · 共 1,206 行 · 第 1/3 页
TEX
1,206 行
\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::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 was
changed. 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. Direction
is 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} to
refresh the control.
\membersection{wxRichTextCtrl::GetBasicStyle}\label{wxrichtextctrlgetbasicstyle}
\constfunc{const wxTextAttrEx\&}{GetBasicStyle}{\void}
Gets the basic (overall) style. This is the style of the whole
buffer before further styles are applied, unlike the default style, which
only affects the style currently being applied (for example, setting the default
style 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 inserted
text is displayed. When wxTextAttrEx is merged with wxTextAttr, this function
will 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::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.
\membersection{wxRichTextCtrl::GetSelection}\label{wxrichtextctrlgetselection}
\constfunc{void}{GetSelection}{\param{long* }{from}, \param{long* }{to}}
Returns the range of the current selection. 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}
\constfunc{bool}{GetStyle}{\param{long }{position}, \param{wxRichTextAttr\& }{style}}
\constfunc{bool}{GetStyle}{\param{long }{position}, \param{wxTextAttrEx\& }{style}}
Gets the attributes at the given position. The wxRichTextAttr version is generally more efficient
because it does not use wxFont objects.
\membersection{wxRichTextCtrl::GetStyleSheet}\label{wxrichtextctrlgetstylesheet}
\constfunc{wxRichTextStyleSheet*}{GetStyleSheet}{\void}
Returns the style sheet associated with the control, if any. A style sheet allows named
character and paragraph styles to be applied.
\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
shown at the very end of the line, it means the next character is actually
on the following line. So this function gets the line we're expecting to find
if this is the case.
\membersection{wxRichTextCtrl::HasCharacterAttributes}\label{wxrichtextctrlhascharacterattributes}
\constfunc{bool}{HasCharacterAttributes}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttrEx\& }{style}}
\constfunc{bool}{HasCharacterAttributes}{\param{const wxRichTextRange\& }{range}, \param{const wxRichTextAttr\& }{style}}
Test if this whole range has character attributes of the specified kind. If any
of the attributes are different within the range, the test fails. You
can use this to implement, for example, bold button updating. {\it style} must have
flags indicating which attributes are of interest.
\membersection{wxRichTextCtrl::HasParagraphAttributes}\label{wxrichtextctrlhasparagraphattributes}
\constfunc{bool}{HasParagraphAttributes}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttrEx\& }{style}}
\constfunc{bool}{HasParagraphAttributes}{\param{const wxRichTextRange\& }{range}, \param{const wxRichTextAttr\& }{style}}
Test if this whole range has paragraph attributes of the specified kind. If any
of the attributes are different within the range, the test fails. You
can use this to implement, for example, centering button updating. {\it style} must have
flags indicating which attributes are of interest.
\membersection{wxRichTextCtrl::HasSelection}\label{wxrichtextctrlhasselection}
\constfunc{bool}{HasSelection}{\void}
Returns \true if there is a selection.
\membersection{wxRichTextCtrl::HitTest}\label{wxrichtextctrlhittest}
\constfunc{wxTextCtrlHitTestResult}{HitTest}{\param{const wxPoint\& }{pt}, \param{long* }{pos}}
\constfunc{wxTextCtrlHitTestResult}{HitTest}{\param{const wxPoint\& }{pt}, \param{wxTextCoord* }{col}, \param{wxTextCoord* }{row}}
Finds the character at the given position in pixels.
{\it pt} is in device coords (not adjusted for the client area origin nor for scrolling).
\membersection{wxRichTextCtrl::Init}\label{wxrichtextctrlinit}
\func{void}{Init}{\void}
Initialises the members of the control.
\membersection{wxRichTextCtrl::InitCommandEvent}\label{wxrichtextctrlinitcommandevent}
\constfunc{void}{InitCommandEvent}{\param{wxCommandEvent\& }{event}}
Initialises the command event.
\membersection{wxRichTextCtrl::IsEditable}\label{wxrichtextctrliseditable}
\constfunc{bool}{IsEditable}{\void}
Returns \true if the control is editable.
\membersection{wxRichTextCtrl::IsFrozen}\label{wxrichtextctrlisfrozen}
\constfunc{bool}{IsFrozen}{\void}
Returns \true if Freeze has been called without a Thaw.
\membersection{wxRichTextCtrl::IsModified}\label{wxrichtextctrlismodified}
\constfunc{bool}{IsModified}{\void}
Returns \true if the buffer has been modified.
\membersection{wxRichTextCtrl::IsMultiLine}\label{wxrichtextctrlismultiline}
\constfunc{bool}{IsMultiLine}{\void}
Returns \true if the control is multiline.
\membersection{wxRichTextCtrl::IsPositionVisible}\label{wxrichtextctrlispositionvisible}
\constfunc{bool}{IsPositionVisible}{\param{long }{pos}}
Returns \true if the given position is visible on the screen.
\membersection{wxRichTextCtrl::IsSelectionAligned}\label{wxrichtextctrlisselectionaligned}
\constfunc{bool}{IsSelectionAligned}{\param{wxTextAttrAlignment }{alignment}}
Returns \true if all of the selection is aligned according to the specified flag.
\membersection{wxRichTextCtrl::IsSelectionBold}\label{wxrichtextctrlisselectionbold}
\constfunc{bool}{IsSelectionBold}{\void}
Returns \true if all of the selection is bold.
\membersection{wxRichTextCtrl::IsSelectionItalics}\label{wxrichtextctrlisselectionitalics}
\constfunc{bool}{IsSelectionItalics}{\void}
Returns \true if all of the selection is italic.
\membersection{wxRichTextCtrl::IsSelectionUnderlined}\label{wxrichtextctrlisselectionunderlined}
\constfunc{bool}{IsSelectionUnderlined}{\void}
Returns \true if all of the selection is underlined.
\membersection{wxRichTextCtrl::IsSingleLine}\label{wxrichtextctrlissingleline}
\constfunc{bool}{IsSingleLine}{\void}
Returns \true if the control is single-line. Currently wxRichTextCtrl does not
support single-line editing.
\membersection{wxRichTextCtrl::KeyboardNavigate}\label{wxrichtextctrlkeyboardnavigate}
\func{bool}{KeyboardNavigate}{\param{int }{keyCode}, \param{int }{flags}}
Helper function implementing keyboard navigation.
\membersection{wxRichTextCtrl::LayoutContent}\label{wxrichtextctrllayoutcontent}
\func{bool}{LayoutContent}{\param{bool }{onlyVisibleRect = false}}
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::LoadFile}\label{wxrichtextctrlloadfile}
\func{bool}{LoadFile}{\param{const wxString\& }{file}, \param{int }{type = wxRICHTEXT\_TYPE\_ANY}}
Loads content into the control's buffer using the given type. If the specified type
is wxRICHTEXT\_TYPE\_ANY, the type is deduced from the filename extension.
This function looks for a suitable \helpref{wxRichTextFileHandler}{wxrichtextfilehandler} object.
\membersection{wxRichTextCtrl::MarkDirty}\label{wxrichtextctrlmarkdirty}
\func{void}{MarkDirty}{\void}
Marks the buffer as modified.
\membersection{wxRichTextCtrl::MoveCaret}\label{wxrichtextctrlmovecaret}
\func{bool}{MoveCaret}{\param{long }{pos}, \param{bool }{showAtLineStart = false}}
Move the caret to the given character position.
\membersection{wxRichTextCtrl::MoveCaretBack}\label{wxrichtextctrlmovecaretback}
\func{void}{MoveCaretBack}{\param{long }{oldPosition}}
Move the caret one visual step forward: this may mean setting a flag
and keeping the same position if we're going from the end of one line
to the start of the next, which may be the exact same caret position.
\membersection{wxRichTextCtrl::MoveCaretForward}\label{wxrichtextctrlmovecaretforward}
\func{void}{MoveCaretForward}{\param{long }{oldPosition}}
Move the caret one visual step forward: this may mean setting a flag
and keeping the same position if we're going from the end of one line
to the start of the next, which may be the exact same caret position.
\membersection{wxRichTextCtrl::MoveDown}\label{wxrichtextctrlmovedown}
\func{bool}{MoveDown}{\param{int }{noLines = 1}, \param{int }{flags = 0}}
Moves the caret down.
\membersection{wxRichTextCtrl::MoveEnd}\label{wxrichtextctrlmoveend}
\func{bool}{MoveEnd}{\param{int }{flags = 0}}
Moves to the end of the buffer.
\membersection{wxRichTextCtrl::MoveHome}\label{wxrichtextctrlmovehome}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?