⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 richtext.py

📁 Wxpython Implemented on Windows CE, Source code
💻 PY
📖 第 1 页 / 共 4 页
字号:
        Load the contents of the document from the given filename.
        """
        return _richtext.RichTextCtrl_LoadFile(*args, **kwargs)

    def SaveFile(*args, **kwargs):
        """
        SaveFile(self, String file=EmptyString, int type=RICHTEXT_TYPE_ANY) -> bool

        Save the contents of the document to the given filename, or if the
        empty string is passed then to the filename set with `SetFilename`.
        """
        return _richtext.RichTextCtrl_SaveFile(*args, **kwargs)

    def MarkDirty(*args, **kwargs):
        """
        MarkDirty(self)

        Sets the dirty flag, meaning that the contents of the control have
        changed and need to be saved.
        """
        return _richtext.RichTextCtrl_MarkDirty(*args, **kwargs)

    def DiscardEdits(*args, **kwargs):
        """
        DiscardEdits(self)

        Clears the dirty flag.
        :see: `MarkDirty`
        """
        return _richtext.RichTextCtrl_DiscardEdits(*args, **kwargs)

    def SetMaxLength(*args, **kwargs):
        """
        SetMaxLength(self, unsigned long len)

        Set the max number of characters which may be entered in a single line
        text control.
        """
        return _richtext.RichTextCtrl_SetMaxLength(*args, **kwargs)

    def WriteText(*args, **kwargs):
        """
        WriteText(self, String text)

        Insert text at the current position.
        """
        return _richtext.RichTextCtrl_WriteText(*args, **kwargs)

    def AppendText(*args, **kwargs):
        """
        AppendText(self, String text)

        Append text to the end of the document.
        """
        return _richtext.RichTextCtrl_AppendText(*args, **kwargs)

    def SetStyle(*args, **kwargs):
        """
        SetStyle(self, RichTextRange range, RichTextAttr style) -> bool

        Set the style for the text in ``range`` to ``style``
        """
        return _richtext.RichTextCtrl_SetStyle(*args, **kwargs)

    def GetStyle(*args, **kwargs):
        """
        GetStyle(self, long position, RichTextAttr style) -> bool

        Retrieve the style used at the given position.  Copies the style
        values at ``position`` into the ``style`` parameter returns ``True``
        if successful.  Returns ``False`` otherwise.
        """
        return _richtext.RichTextCtrl_GetStyle(*args, **kwargs)

    def SetDefaultStyle(*args, **kwargs):
        """
        SetDefaultStyle(self, RichTextAttr style) -> bool

        Set the style used by default for the rich text document.
        """
        return _richtext.RichTextCtrl_SetDefaultStyle(*args, **kwargs)

    def GetDefaultStyle(*args, **kwargs):
        """
        GetDefaultStyle(self) -> RichTextAttr

        Retrieves a copy of the default style object.
        """
        return _richtext.RichTextCtrl_GetDefaultStyle(*args, **kwargs)

    def XYToPosition(*args, **kwargs):
        """
        XYToPosition(self, long x, long y) -> long

        Translate a col,row coordinants into a document position.
        """
        return _richtext.RichTextCtrl_XYToPosition(*args, **kwargs)

    def PositionToXY(*args, **kwargs):
        """
        PositionToXY(self, long pos) --> (x, y)

        Retrieves the col,row for the given position within the document
        """
        return _richtext.RichTextCtrl_PositionToXY(*args, **kwargs)

    def ShowPosition(*args, **kwargs):
        """
        ShowPosition(self, long position)

        Ensure that the given position in the document is visible.
        """
        return _richtext.RichTextCtrl_ShowPosition(*args, **kwargs)

    def HitTest(*args, **kwargs):
        """
        HitTest(self, Point pt) --> (result, pos)

        Returns the character position at the given point in pixels.  Note
        that ``pt`` should be given in device coordinates, and not be adjusted
        for the client area origin nor for scrolling.  The return value is a
        tuple of the hit test result and the position.
        """
        return _richtext.RichTextCtrl_HitTest(*args, **kwargs)

    def HitTestXY(*args, **kwargs):
        """
        HitTestRC(self, Point pt) --> (result, col, row)

        Returns the column and row of the given point in pixels.  Note that
        ``pt`` should be given in device coordinates, and not be adjusted for
        the client area origin nor for scrolling.  The return value is a tuple
        of the hit test result and the column and row values.
        """
        return _richtext.RichTextCtrl_HitTestXY(*args, **kwargs)

    def Copy(*args, **kwargs):
        """
        Copy(self)

        Copies the selected text to the clipboard.
        """
        return _richtext.RichTextCtrl_Copy(*args, **kwargs)

    def Cut(*args, **kwargs):
        """
        Cut(self)

        Copies the selected text to the clipboard and removes the selection.
        """
        return _richtext.RichTextCtrl_Cut(*args, **kwargs)

    def Paste(*args, **kwargs):
        """
        Paste(self)

        Pastes text from the clipboard into the document at the current
        insertion point.
        """
        return _richtext.RichTextCtrl_Paste(*args, **kwargs)

    def DeleteSelection(*args, **kwargs):
        """
        DeleteSelection(self)

        Remove the current selection.
        """
        return _richtext.RichTextCtrl_DeleteSelection(*args, **kwargs)

    def CanCopy(*args, **kwargs):
        """
        CanCopy(self) -> bool

        Returns ``True`` if the selection can be copied to the clipboard.
        """
        return _richtext.RichTextCtrl_CanCopy(*args, **kwargs)

    def CanCut(*args, **kwargs):
        """
        CanCut(self) -> bool

        Returns ``True`` if the selection can be cut to the clipboard.
        """
        return _richtext.RichTextCtrl_CanCut(*args, **kwargs)

    def CanPaste(*args, **kwargs):
        """
        CanPaste(self) -> bool

        Returns ``True`` if the current contents of the clipboard can be
        pasted into the document.
        """
        return _richtext.RichTextCtrl_CanPaste(*args, **kwargs)

    def CanDeleteSelection(*args, **kwargs):
        """
        CanDeleteSelection(self) -> bool

        Returns ``True`` if the selection can be removed from the document.
        """
        return _richtext.RichTextCtrl_CanDeleteSelection(*args, **kwargs)

    def Undo(*args, **kwargs):
        """
        Undo(self)

        If the last operation can be undone, undoes the last operation.
        """
        return _richtext.RichTextCtrl_Undo(*args, **kwargs)

    def Redo(*args, **kwargs):
        """
        Redo(self)

        If the last operation can be redone, redoes the last operation.
        """
        return _richtext.RichTextCtrl_Redo(*args, **kwargs)

    def CanUndo(*args, **kwargs):
        """
        CanUndo(self) -> bool

        Returns ``True`` if the last operation can be undone.
        """
        return _richtext.RichTextCtrl_CanUndo(*args, **kwargs)

    def CanRedo(*args, **kwargs):
        """
        CanRedo(self) -> bool

        Returns ``True`` if the last operation can be redone.
        """
        return _richtext.RichTextCtrl_CanRedo(*args, **kwargs)

    def SetInsertionPoint(*args, **kwargs):
        """
        SetInsertionPoint(self, long pos)

        Sets the insertion point at the given position.
        """
        return _richtext.RichTextCtrl_SetInsertionPoint(*args, **kwargs)

    def SetInsertionPointEnd(*args, **kwargs):
        """
        SetInsertionPointEnd(self)

        Moves the insertion point to the end of the document.
        """
        return _richtext.RichTextCtrl_SetInsertionPointEnd(*args, **kwargs)

    def GetInsertionPoint(*args, **kwargs):
        """
        GetInsertionPoint(self) -> long

        Returns the insertion point. This is defined as the zero based index
        of the character position to the right of the insertion point.
        """
        return _richtext.RichTextCtrl_GetInsertionPoint(*args, **kwargs)

    def GetLastPosition(*args, **kwargs):
        """
        GetLastPosition(self) -> long

        Returns the zero based index of the last position in the document.
        """
        return _richtext.RichTextCtrl_GetLastPosition(*args, **kwargs)

    def SetSelection(*args, **kwargs):
        """
        SetSelection(self, long from, long to)

        Selects the text starting at the first position up to (but not
        including) the character at the last position. If both parameters are
        equal to -1 then all text in the control is selected.
        """
        return _richtext.RichTextCtrl_SetSelection(*args, **kwargs)

    def SelectAll(*args, **kwargs):
        """
        SelectAll(self)

        Select all text in the document.
        """
        return _richtext.RichTextCtrl_SelectAll(*args, **kwargs)

    def SetEditable(*args, **kwargs):
        """
        SetEditable(self, bool editable)

        Makes the document editable or read-only, overriding the RE_READONLY
        flag.
        """
        return _richtext.RichTextCtrl_SetEditable(*args, **kwargs)

    def HasSelection(*args, **kwargs):
        """HasSelection(self) -> bool"""
        return _richtext.RichTextCtrl_HasSelection(*args, **kwargs)

    def WriteImage(*args, **kwargs):
        """WriteImage(self, Image image, int bitmapType=BITMAP_TYPE_PNG) -> bool"""
        return _richtext.RichTextCtrl_WriteImage(*args, **kwargs)

    def WriteBitmap(*args, **kwargs):
        """WriteBitmap(self, Bitmap bitmap, int bitmapType=BITMAP_TYPE_PNG) -> bool"""
        return _richtext.RichTextCtrl_WriteBitmap(*args, **kwargs)

    def WriteImageFile(*args, **kwargs):
        """WriteImageFile(self, String filename, int bitmapType) -> bool"""
        return _richtext.RichTextCtrl_WriteImageFile(*args, **kwargs)

    def WriteImageBlock(*args, **kwargs):
        """WriteImageBlock(self, wxRichTextImageBlock imageBlock) -> bool"""
        return _richtext.RichTextCtrl_WriteImageBlock(*args, **kwargs)

    def Newline(*args, **kwargs):
        """Newline(self) -> bool"""
        return _richtext.RichTextCtrl_Newline(*args, **kwargs)

    def SetBasicStyle(*args, **kwargs):
        """SetBasicStyle(self, RichTextAttr style)"""
        return _richtext.RichTextCtrl_SetBasicStyle(*args, **kwargs)

    def EndStyle(*args, **kwargs):
        """EndStyle(self) -> bool"""
        return _richtext.RichTextCtrl_EndStyle(*args, **kwargs)

    def EndAllStyles(*args, **kwargs):
        """EndAllStyles(self) -> bool"""
        return _richtext.RichTextCtrl_EndAllStyles(*args, **kwargs)

    def BeginBold(*args, **kwargs):
        """BeginBold(self) -> bool"""
        return _richtext.RichTextCtrl_BeginBold(*args, **kwargs)

⌨️ 快捷键说明

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