richtextctrl.tex

来自「Wxpython Implemented on Windows CE, Sou」· TEX 代码 · 共 1,206 行 · 第 1/3 页

TEX
1,206
字号
\func{bool}{MoveHome}{\param{int }{flags = 0}}

Moves to the start of the buffer.

\membersection{wxRichTextCtrl::MoveLeft}\label{wxrichtextctrlmoveleft}

\func{bool}{MoveLeft}{\param{int }{noPositions = 1}, \param{int }{flags = 0}}

Moves left.

\membersection{wxRichTextCtrl::MoveRight}\label{wxrichtextctrlmoveright}

\func{bool}{MoveRight}{\param{int }{noPositions = 1}, \param{int }{flags = 0}}

Moves right.

\membersection{wxRichTextCtrl::MoveToLineEnd}\label{wxrichtextctrlmovetolineend}

\func{bool}{MoveToLineEnd}{\param{int }{flags = 0}}

Moves to the end of the line.

\membersection{wxRichTextCtrl::MoveToLineStart}\label{wxrichtextctrlmovetolinestart}

\func{bool}{MoveToLineStart}{\param{int }{flags = 0}}

Moves to the start of the line.

\membersection{wxRichTextCtrl::MoveToParagraphEnd}\label{wxrichtextctrlmovetoparagraphend}

\func{bool}{MoveToParagraphEnd}{\param{int }{flags = 0}}

Moves to the end of the paragraph.

\membersection{wxRichTextCtrl::MoveToParagraphStart}\label{wxrichtextctrlmovetoparagraphstart}

\func{bool}{MoveToParagraphStart}{\param{int }{flags = 0}}

Moves to the start of the paragraph.

\membersection{wxRichTextCtrl::MoveUp}\label{wxrichtextctrlmoveup}

\func{bool}{MoveUp}{\param{int }{noLines = 1}, \param{int }{flags = 0}}

Moves up.

\membersection{wxRichTextCtrl::Newline}\label{wxrichtextctrlnewline}

\func{bool}{Newline}{\void}

Insert a newline (actually paragraph) at the current insertion point.

\membersection{wxRichTextCtrl::OnClear}\label{wxrichtextctrlonclear}

\func{void}{OnClear}{\param{wxCommandEvent\& }{event}}

Standard handler for the wxID\_CLEAR command.

\membersection{wxRichTextCtrl::OnContextMenu}\label{wxrichtextctrloncontextmenu}

\func{void}{OnContextMenu}{\param{wxContextMenuEvent\& }{event}}

Shows a standard context menu with undo, redo, cut, copy, paste, clear, and select all commands.

\membersection{wxRichTextCtrl::OnCopy}\label{wxrichtextctrloncopy}

\func{void}{OnCopy}{\param{wxCommandEvent\& }{event}}

Standard handler for the wxID\_COPY command.

\membersection{wxRichTextCtrl::OnCut}\label{wxrichtextctrloncut}

\func{void}{OnCut}{\param{wxCommandEvent\& }{event}}

Standard handler for the wxID\_CUT command.

\membersection{wxRichTextCtrl::OnDropFiles}\label{wxrichtextctrlondropfiles}

\func{void}{OnDropFiles}{\param{wxDropFilesEvent\& }{event}}

Loads the first dropped file.

\membersection{wxRichTextCtrl::OnPaste}\label{wxrichtextctrlonpaste}

\func{void}{OnPaste}{\param{wxCommandEvent\& }{event}}

Standard handler for the wxID\_PASTE command.

\membersection{wxRichTextCtrl::OnRedo}\label{wxrichtextctrlonredo}

\func{void}{OnRedo}{\param{wxCommandEvent\& }{event}}

Standard handler for the wxID\_REDO command.

\membersection{wxRichTextCtrl::OnSelectAll}\label{wxrichtextctrlonselectall}

\func{void}{OnSelectAll}{\param{wxCommandEvent\& }{event}}

Standard handler for the wxID\_SELECTALL command.

\membersection{wxRichTextCtrl::OnUndo}\label{wxrichtextctrlonundo}

\func{void}{OnUndo}{\param{wxCommandEvent\& }{event}}

Standard handler for the wxID\_PASTE command.

\membersection{wxRichTextCtrl::OnUpdateClear}\label{wxrichtextctrlonupdateclear}

\func{void}{OnUpdateClear}{\param{wxUpdateUIEvent\& }{event}}

Standard update handler for the wxID\_CLEAR command.

\membersection{wxRichTextCtrl::OnUpdateCopy}\label{wxrichtextctrlonupdatecopy}

\func{void}{OnUpdateCopy}{\param{wxUpdateUIEvent\& }{event}}

Standard update handler for the wxID\_COPY command.

\membersection{wxRichTextCtrl::OnUpdateCut}\label{wxrichtextctrlonupdatecut}

\func{void}{OnUpdateCut}{\param{wxUpdateUIEvent\& }{event}}

Standard update handler for the wxID\_CUT command.

\membersection{wxRichTextCtrl::OnUpdatePaste}\label{wxrichtextctrlonupdatepaste}

\func{void}{OnUpdatePaste}{\param{wxUpdateUIEvent\& }{event}}

Standard update handler for the wxID\_PASTE command.

\membersection{wxRichTextCtrl::OnUpdateRedo}\label{wxrichtextctrlonupdateredo}

\func{void}{OnUpdateRedo}{\param{wxUpdateUIEvent\& }{event}}

Standard update handler for the wxID\_REDO command.

\membersection{wxRichTextCtrl::OnUpdateSelectAll}\label{wxrichtextctrlonupdateselectall}

\func{void}{OnUpdateSelectAll}{\param{wxUpdateUIEvent\& }{event}}

Standard update handler for the wxID\_SELECTALL command.

\membersection{wxRichTextCtrl::OnUpdateUndo}\label{wxrichtextctrlonupdateundo}

\func{void}{OnUpdateUndo}{\param{wxUpdateUIEvent\& }{event}}

Standard update handler for the wxID\_UNDO command.

\membersection{wxRichTextCtrl::PageDown}\label{wxrichtextctrlpagedown}

\func{bool}{PageDown}{\param{int }{noPages = 1}, \param{int }{flags = 0}}

Moves one or more pages down.

\membersection{wxRichTextCtrl::PageUp}\label{wxrichtextctrlpageup}

\func{bool}{PageUp}{\param{int }{noPages = 1}, \param{int }{flags = 0}}

Moves one or more pages up.

\membersection{wxRichTextCtrl::PaintBackground}\label{wxrichtextctrlpaintbackground}

\func{void}{PaintBackground}{\param{wxDC\& }{dc}}

Paints the background.

\membersection{wxRichTextCtrl::Paste}\label{wxrichtextctrlpaste}

\func{void}{Paste}{\void}

Pastes content from the clipboard to the buffer.

\membersection{wxRichTextCtrl::PositionCaret}\label{wxrichtextctrlpositioncaret}

\func{void}{PositionCaret}{\void}

Internal function to position the visible caret according to the current caret position.

\membersection{wxRichTextCtrl::PositionToXY}\label{wxrichtextctrlpositiontoxy}

\constfunc{bool}{PositionToXY}{\param{long }{pos}, \param{long* }{x}, \param{long* }{y}}

Converts a text position to zero-based column and line numbers.

\membersection{wxRichTextCtrl::Redo}\label{wxrichtextctrlredo}

\func{void}{Redo}{\void}

Redoes the current command.

\membersection{wxRichTextCtrl::Remove}\label{wxrichtextctrlremove}

\func{void}{Remove}{\param{long }{from}, \param{long }{to}}

Removes the content in the specified range.

\membersection{wxRichTextCtrl::Replace}\label{wxrichtextctrlreplace}

\func{void}{Replace}{\param{long }{from}, \param{long }{to}, \param{const wxString\& }{value}}

Replaces the content in the specified range with the string specified by {\it value}.

\membersection{wxRichTextCtrl::SaveFile}\label{wxrichtextctrlsavefile}

\func{bool}{SaveFile}{\param{const wxString\& }{file = wxEmptyString}, \param{int }{type = wxRICHTEXT\_TYPE\_ANY}}

Saves the buffer content 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::ScrollIntoView}\label{wxrichtextctrlscrollintoview}

\func{bool}{ScrollIntoView}{\param{long }{position}, \param{int }{keyCode}}

Scrolls {\it position} into view. This function takes a caret position.

\membersection{wxRichTextCtrl::SelectAll}\label{wxrichtextctrlselectall}

\func{void}{SelectAll}{\void}

Selects all the text in the buffer.

\membersection{wxRichTextCtrl::SelectNone}\label{wxrichtextctrlselectnone}

\func{void}{SelectNone}{\void}

Cancels any selection.

\membersection{wxRichTextCtrl::SetBasicStyle}\label{wxrichtextctrlsetbasicstyle}

\func{void}{SetBasicStyle}{\param{const wxRichTextAttr\& }{style}}

\func{void}{SetBasicStyle}{\param{const wxTextAttrEx\& }{style}}

Sets 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::SetCaretPosition}\label{wxrichtextctrlsetcaretposition}

\func{void}{SetCaretPosition}{\param{long }{position}, \param{bool }{showAtLineStart = false}}

The caret position is the character position just before the caret.
A value of -1 means the caret is at the start of the buffer.

\membersection{wxRichTextCtrl::SetDefaultStyle}\label{wxrichtextctrlsetdefaultstyle}

\func{bool}{SetDefaultStyle}{\param{const wxTextAttrEx\& }{style}}

Sets the current default style, which can be used to change how subsequently inserted
text is displayed.

\membersection{wxRichTextCtrl::SetDefaultStyleToCursorStyle}\label{wxrichtextctrlsetdefaultstyletocursorstyle}

\func{bool}{SetDefaultStyleToCursorStyle}{\void}

Sets the default style to the style under the cursor.

\membersection{wxRichTextCtrl::SetDelayedLayoutThreshold}\label{wxrichtextctrlsetdelayedlayoutthreshold}

\func{void}{SetDelayedLayoutThreshold}{\param{long }{threshold}}

Sets the size of the buffer beyond which layout is delayed during resizing.
This optimizes sizing for large buffers. The default is 20000.

\membersection{wxRichTextCtrl::SetEditable}\label{wxrichtextctrlseteditable}

\func{void}{SetEditable}{\param{bool }{editable}}

Makes the control editable, or not.

\membersection{wxRichTextCtrl::SetFilename}\label{wxrichtextctrlsetfilename}

\func{void}{SetFilename}{\param{const wxString\& }{filename}}

Sets the current filename.

\membersection{wxRichTextCtrl::SetFont}\label{wxrichtextctrlsetfont}

\func{bool}{SetFont}{\param{const wxFont\& }{font}}

Sets the font, and also the basic and default attributes (see \helpref{SetDefaultStyle}{wxrichtextctrlsetdefaultstyle}).

\membersection{wxRichTextCtrl::SetInsertionPoint}\label{wxrichtextctrlsetinsertionpoint}

\func{void}{SetInsertionPoint}{\param{long }{pos}}

Sets the insertion point.

\membersection{wxRichTextCtrl::SetInsertionPointEnd}\label{wxrichtextctrlsetinsertionpointend}

\func{void}{SetInsertionPointEnd}{\void}

Sets the insertion point to the end of the text control.

\membersection{wxRichTextCtrl::SetSelection}\label{wxrichtextctrlsetselection}

\func{void}{SetSelection}{\param{long }{from}, \param{long }{to}}

Sets the selection to the given range.

\membersection{wxRichTextCtrl::SetSelectionRange}\label{wxrichtextctrlsetselectionrange}

\func{void}{SetSelectionRange}{\param{const wxRichTextRange\& }{range}}

Sets the selection to the given range.

\membersection{wxRichTextCtrl::SetStyle}\label{wxrichtextctrlsetstyle}

\func{bool}{SetStyle}{\param{const wxRichTextRange\& }{range}, \param{const wxRichTextAttr\& }{style}}

\func{bool}{SetStyle}{\param{long }{start}, \param{long }{end}, \param{const wxTextAttrEx\& }{style}}

Sets the attributes for the given range. The wxRichTextAttr version is more efficient
because it does not use wxFont objects.

\membersection{wxRichTextCtrl::SetStyleSheet}\label{wxrichtextctrlsetstylesheet}

\func{void}{SetStyleSheet}{\param{wxRichTextStyleSheet* }{styleSheet}}

Sets the style sheet associated with the control. A style sheet allows named
character and paragraph styles to be applied.

\membersection{wxRichTextCtrl::SetValue}\label{wxrichtextctrlsetvalue}

\func{void}{SetValue}{\param{const wxString\& }{value}}

Replaces existing content with the given text.

\membersection{wxRichTextCtrl::SetupScrollbars}\label{wxrichtextctrlsetupscrollbars}

\func{void}{SetupScrollbars}{\param{bool }{atTop = false}}

A helper function setting up scrollbars, for example after a resize.

\membersection{wxRichTextCtrl::ShowPosition}\label{wxrichtextctrlshowposition}

\func{void}{ShowPosition}{\param{long }{pos}}

Scrolls the buffer so that the given position is in view.

\membersection{wxRichTextCtrl::SuppressingUndo}\label{wxrichtextctrlsuppressingundo}

\constfunc{bool}{SuppressingUndo}{\void}

Returns \true if undo history suppression is on.

\membersection{wxRichTextCtrl::Thaw}\label{wxrichtextctrlthaw}

\func{void}{Thaw}{\void}

Call this function to end a Freeze and refresh the display.

\membersection{wxRichTextCtrl::Undo}\label{wxrichtextctrlundo}

\func{void}{Undo}{\void}

Undoes the command at the top of the command history, if there is one.

\membersection{wxRichTextCtrl::WordLeft}\label{wxrichtextctrlwordleft}

\func{bool}{WordLeft}{\param{int }{noWords = 1}, \param{int }{flags = 0}}

Moves a number of words to the left.

\membersection{wxRichTextCtrl::WordRight}\label{wxrichtextctrlwordright}

\func{bool}{WordRight}{\param{int }{noWords = 1}, \param{int }{flags = 0}}

Move a nuber of words to the right.

\membersection{wxRichTextCtrl::WriteImage}\label{wxrichtextctrlwriteimage}

\func{bool}{WriteImage}{\param{const wxString\& }{filename}, \param{int }{bitmapType}}

Loads an image from a file and writes it at the current insertion point.

\func{bool}{WriteImage}{\param{const wxRichTextImageBlock\& }{imageBlock}}

Writes an image block at the current insertion point.

\func{bool}{WriteImage}{\param{const wxBitmap\& }{bitmap}, \param{int }{bitmapType = wxBITMAP\_TYPE\_PNG}}

\func{bool}{WriteImage}{\param{const wxImage\& }{image}, \param{int }{bitmapType = wxBITMAP\_TYPE\_PNG}}

Write a bitmap or image at the current insertion point. Supply an optional type to use
for internal and file storage of the raw data.

\membersection{wxRichTextCtrl::WriteText}\label{wxrichtextctrlwritetext}

\func{void}{WriteText}{\param{const wxString\& }{text}}

Writes text at the current position.

\membersection{wxRichTextCtrl::XYToPosition}\label{wxrichtextctrlxytoposition}

\constfunc{long}{XYToPosition}{\param{long }{x}, \param{long }{y}}

Translates from column and line number to position.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?