************************** wx.richtext.RichTextBuffer ************************** Inheritance diagram for `wx.richtext.RichTextBuffer`: | .. inheritance-diagram:: wx.richtext.RichTextBuffer | Description =========== This class represents the whole buffer associated with a `wx.richtext.RichTextCtrl `_. .. seealso:: `wx.TextAttr <../Widgets/wx.TextAttr.html>`_, `wx.richtext.TextAttrEx `_, `wx.richtext.RichTextAttr `_, `wx.richtext.RichTextCtrl `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `AddEventHandler <#AddEventHandler>`_ * `AddHandler <#AddHandler>`_ * `BatchingUndo <#BatchingUndo>`_ * `BeginAlignment <#BeginAlignment>`_ * `BeginBatchUndo <#BeginBatchUndo>`_ * `BeginBold <#BeginBold>`_ * `BeginCharacterStyle <#BeginCharacterStyle>`_ * `BeginFont <#BeginFont>`_ * `BeginFontSize <#BeginFontSize>`_ * `BeginItalic <#BeginItalic>`_ * `BeginLeftIndent <#BeginLeftIndent>`_ * `BeginLineSpacing <#BeginLineSpacing>`_ * `BeginListStyle <#BeginListStyle>`_ * `BeginNumberedBullet <#BeginNumberedBullet>`_ * `BeginParagraphSpacing <#BeginParagraphSpacing>`_ * `BeginParagraphStyle <#BeginParagraphStyle>`_ * `BeginRightIndent <#BeginRightIndent>`_ * `BeginStandardBullet <#BeginStandardBullet>`_ * `BeginStyle <#BeginStyle>`_ * `BeginSuppressUndo <#BeginSuppressUndo>`_ * `BeginSymbolBullet <#BeginSymbolBullet>`_ * `BeginTextColour <#BeginTextColour>`_ * `BeginURL <#BeginURL>`_ * `BeginUnderline <#BeginUnderline>`_ * `CanPasteFromClipboard <#CanPasteFromClipboard>`_ * `CleanUpHandlers <#CleanUpHandlers>`_ * `ClearEventHandlers <#ClearEventHandlers>`_ * `ClearStyleStack <#ClearStyleStack>`_ * `Copy <#Copy>`_ * `CopyToClipboard <#CopyToClipboard>`_ * `DeleteRangeWithUndo <#DeleteRangeWithUndo>`_ * `EndAlignment <#EndAlignment>`_ * `EndAllStyles <#EndAllStyles>`_ * `EndBatchUndo <#EndBatchUndo>`_ * `EndBold <#EndBold>`_ * `EndCharacterStyle <#EndCharacterStyle>`_ * `EndFont <#EndFont>`_ * `EndFontSize <#EndFontSize>`_ * `EndItalic <#EndItalic>`_ * `EndLeftIndent <#EndLeftIndent>`_ * `EndLineSpacing <#EndLineSpacing>`_ * `EndListStyle <#EndListStyle>`_ * `EndNumberedBullet <#EndNumberedBullet>`_ * `EndParagraphSpacing <#EndParagraphSpacing>`_ * `EndParagraphStyle <#EndParagraphStyle>`_ * `EndRightIndent <#EndRightIndent>`_ * `EndStandardBullet <#EndStandardBullet>`_ * `EndStyle <#EndStyle>`_ * `EndSuppressUndo <#EndSuppressUndo>`_ * `EndSymbolBullet <#EndSymbolBullet>`_ * `EndTextColour <#EndTextColour>`_ * `EndURL <#EndURL>`_ * `EndUnderline <#EndUnderline>`_ * `FindHandlerByExtension <#FindHandlerByExtension>`_ * `FindHandlerByFilename <#FindHandlerByFilename>`_ * `FindHandlerByName <#FindHandlerByName>`_ * `FindHandlerByType <#FindHandlerByType>`_ * `GetBatchedCommand <#GetBatchedCommand>`_ * `GetBulletProportion <#GetBulletProportion>`_ * `GetBulletRightMargin <#GetBulletRightMargin>`_ * `GetCommandProcessor <#GetCommandProcessor>`_ * `GetExtWildcard <#GetExtWildcard>`_ * `GetHandlerFlags <#GetHandlerFlags>`_ * `GetHandlers <#GetHandlers>`_ * `GetRenderer <#GetRenderer>`_ * `GetScale <#GetScale>`_ * `GetStyleForNewParagraph <#GetStyleForNewParagraph>`_ * `GetStyleStackSize <#GetStyleStackSize>`_ * `HitTest <#HitTest>`_ * `InitStandardHandlers <#InitStandardHandlers>`_ * `InsertHandler <#InsertHandler>`_ * `InsertImageWithUndo <#InsertImageWithUndo>`_ * `InsertNewlineWithUndo <#InsertNewlineWithUndo>`_ * `InsertParagraphsWithUndo <#InsertParagraphsWithUndo>`_ * `InsertTextWithUndo <#InsertTextWithUndo>`_ * `IsModified <#IsModified>`_ * `LoadFile <#LoadFile>`_ * `LoadStream <#LoadStream>`_ * `Modify <#Modify>`_ * `PasteFromClipboard <#PasteFromClipboard>`_ * `PopStyleSheet <#PopStyleSheet>`_ * `PushStyleSheet <#PushStyleSheet>`_ * `RemoveEventHandler <#RemoveEventHandler>`_ * `RemoveHandler <#RemoveHandler>`_ * `ResetAndClearCommands <#ResetAndClearCommands>`_ * `SaveFile <#SaveFile>`_ * `SaveStream <#SaveStream>`_ * `SendEvent <#SendEvent>`_ * `SetBulletProportion <#SetBulletProportion>`_ * `SetBulletRightMargin <#SetBulletRightMargin>`_ * `SetHandlerFlags <#SetHandlerFlags>`_ * `SetRenderer <#SetRenderer>`_ * `SetScale <#SetScale>`_ * `SetStyleSheet <#SetStyleSheet>`_ * `SetStyleSheetAndNotify <#SetStyleSheetAndNotify>`_ * `SubmitAction <#SubmitAction>`_ * `SuppressingUndo <#SuppressingUndo>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__() This is a kind of box, used to represent the whole buffer. | **Returns:** `wx.richtext.RichTextBuffer `_ -------- .. method:: AddEventHandler(handler) Adds an event handler to the buffer's list of handlers. A buffer associated with a control has the control as the only event handler, but the application is free to add more if further notification is required. All handlers are notified of an event originating from the buffer, such as the replacement of a style sheet during loading. The buffer never deletes any of the event handlers, unless `RemoveEventHandler <#RemoveEventHandler>`_ is called with ``True`` as the second argument. **Parameters:** * `handler` (`wx.EvtHandler <../Widgets/wx.EvtHandler.html>`_) | **Returns:** `bool` -------- .. method:: AddHandler(handler) Adds a file handler. **Parameters:** * `handler` (`wx.richtext.RichTextFileHandler `_) -------- .. method:: BatchingUndo() Returns ``True`` if the buffer is currently collapsing commands into a single notional command. | **Returns:** `bool` -------- .. method:: BeginAlignment(alignment) Begins using alignment. **Parameters:** * `alignment` (int) | **Returns:** `bool` -------- .. method:: BeginBatchUndo(cmdName) Begins collapsing undo/redo commands. **Parameters:** * `cmdName` (string): should be the name of the combined command that will appear next to `Undo` and `Redo` in the edit menu. | **Returns:** `bool` .. note:: Note that this may not work properly if combining commands that delete or insert content, changing ranges for subsequent actions. -------- .. method:: BeginBold() Begin applying bold. | **Returns:** `bool` -------- .. method:: BeginCharacterStyle(characterStyle) Begins applying the named character style. **Parameters:** * `characterStyle` (string) | **Returns:** `bool` -------- .. method:: BeginFont(font) Begins using this font. **Parameters:** * `font` (`wx.Font <../Widgets/wx.Font.html>`_) | **Returns:** `bool` -------- .. method:: BeginFontSize(pointSize) Begins using the given point size. **Parameters:** * `pointSize` (int) | **Returns:** `bool` -------- .. method:: BeginItalic() Begins using italic. | **Returns:** `bool` -------- .. method:: BeginLeftIndent(leftIndent, leftSubIndent=0) Begin using `leftIndent` for the left indent, and optionally `leftSubIndent` for the sub-indent. Both are expressed in tenths of a millimetre. The sub-indent is an offset from the left of the paragraph, and is used for all but the first line in a paragraph. A positive value will cause the first line to appear to the left of the subsequent lines, and a negative value will cause the first line to be indented relative to the subsequent lines. **Parameters:** * `leftIndent` (int) * `leftSubIndent` (int) | **Returns:** `bool` -------- .. method:: BeginLineSpacing(lineSpacing) Begins line spacing using the specified value. `spacing` is a multiple, where 10 means single-spacing, 15 means 1.5 spacing, and 20 means double spacing. The following constants are defined for convenience: ============================================================= ======================= Line Spacing Flags Value ============================================================= ======================= ``wx.richtext.TEXT_ATTR_LINE_SPACING_NORMAL`` 10 ``wx.richtext.TEXT_ATTR_LINE_SPACING_HALF`` 15 ``wx.richtext.TEXT_ATTR_LINE_SPACING_TWICE`` 20 ============================================================= ======================= | **Parameters:** * `lineSpacing` (int) | **Returns:** `bool` -------- .. method:: BeginListStyle(listStyle, level=1, number=1) Begins using a specified list style. Optionally, you can also pass a level and a number. **Parameters:** * `listStyle` (string) * `level` (int) * `number` (int) | **Returns:** `bool` -------- .. method:: BeginNumberedBullet(bulletNumber, leftIndent, leftSubIndent, bulletStyle=wx.richtext.TEXT_ATTR_BULLET_STYLE_ARABIC | wx.richtext.TEXT_ATTR_BULLET_STYLE_PERIOD) Begins a numbered bullet. This call will be needed for each item in the list, and the application should take care of incrementing the numbering. **Parameters:** * `bulletNumber` (int): Is a number, usually starting with 1. * `leftIndent` (int): Value in tenths of a millimetre. * `leftSubIndent` (int): Value in tenths of a millimetre. * `bulletStyle` (int): A bitlist of the following values: ============================================================= ======================= Bullet Style Flags Value ============================================================= ======================= ``wx.richtext.TEXT_ATTR_BULLET_STYLE_NONE`` 0x00000000 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_ARABIC`` 0x00000001 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_LETTERS_UPPER`` 0x00000002 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_LETTERS_LOWER`` 0x00000004 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_ROMAN_UPPER`` 0x00000008 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_ROMAN_LOWER`` 0x00000010 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_SYMBOL`` 0x00000020 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_BITMAP`` 0x00000040 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_PARENTHESES`` 0x00000080 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_PERIOD`` 0x00000100 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_STANDARD`` 0x00000200 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS`` 0x00000400 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_OUTLINE`` 0x00000800 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_ALIGN_LEFT`` 0x00000000 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT`` 0x00001000 ``wx.richtext.TEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE`` 0x00002000 ============================================================= ======================= Of these, ``wx.richtext.TEXT_ATTR_BULLET_STYLE_BITMAP`` is unimplemented. `wx.richtext.RichTextBuffer` uses indentation to render a bulleted item. The left indent is the distance between the margin and the bullet. The content of the paragraph, including the first line, starts at `leftMargin` + `leftSubIndent`. So the distance between the left edge of the bullet and the left of the actual paragraph is `leftSubIndent`. | **Returns:** `bool` -------- .. method:: BeginParagraphSpacing(before, after) Begins paragraph spacing; pass the before-paragraph and after-paragraph spacing in tenths of a millimetre. **Parameters:** * `before` (int) * `after` (int) | **Returns:** `bool` -------- .. method:: BeginParagraphStyle(paragraphStyle) Begins applying the named paragraph style. **Parameters:** * `paragraphStyle` (string) | **Returns:** `bool` -------- .. method:: BeginRightIndent(rightIndent) Begins a right indent, specified in tenths of a millimetre. **Parameters:** * `rightIndent` (int) | **Returns:** `bool` -------- .. method:: BeginStandardBullet(bulletName, leftIndent, leftSubIndent, bulletStyle=wx.richtext.TEXT_ATTR_BULLET_STYLE_STANDARD) Begins applying a standard bullet, using one of the standard bullet names (currently ``standard/circle`` or ``standard/square``). See `BeginNumberedBullet <#BeginNumberedBullet>`_ for an explanation of how indentation is used to render the bulleted paragraph. **Parameters:** * `bulletName` (string) * `leftIndent` (int) * `leftSubIndent` (int) * `bulletStyle` (int) | **Returns:** `bool` -------- .. method:: BeginStyle(style) Begins using a specified style. **Parameters:** * `style` (`wx.richtext.TextAttrEx `_) | **Returns:** `bool` -------- .. method:: BeginSuppressUndo() Begins suppressing undo/redo commands. The way undo is suppressed may be implemented differently by each command. If not dealt with by a command implementation, then it will be implemented automatically by not storing the command in the undo history when the action is submitted to the command processor. | **Returns:** `bool` -------- .. method:: BeginSymbolBullet(symbol, leftIndent, leftSubIndent, bulletStyle=wx.richtext.TEXT_ATTR_BULLET_STYLE_SYMBOL) Begins applying a symbol bullet, using a character from the current font. See `BeginNumberedBullet <#BeginNumberedBullet>`_ for an explanation of how indentation is used to render the bulleted paragraph. **Parameters:** * `symbol` (string) * `leftIndent` (int) * `leftSubIndent` (int) * `bulletStyle` (int) | **Returns:** `bool` -------- .. method:: BeginTextColour(colour) Begins using the specified text foreground colour. **Parameters:** * `colour` (`wx.Colour <../Widgets/wx.Colour.html>`_) | **Returns:** `bool` -------- .. method:: BeginURL(url, characterStyle="") Begins applying ``wx.TEXT_ATTR_URL`` to the content. Pass a URL and optionally, a character style to apply, since it is common to mark a URL with a familiar style such as blue text with underlining. **Parameters:** * `url` (string) * `characterStyle` (string) | **Returns:** `bool` -------- .. method:: BeginUnderline() Begins using underline. | **Returns:** `bool` -------- .. method:: CanPasteFromClipboard() Returns ``True`` if content can be pasted from the clipboard. | **Returns:** `bool` -------- .. method:: CleanUpHandlers() Cleans up the file handlers. -------- .. method:: ClearEventHandlers() `No docstrings available for this method.` -------- .. method:: ClearStyleStack() Clears the style stack. -------- .. method:: Copy(obj) Clones the object. **Parameters:** * `obj` (`wx.richtext.RichTextBuffer `_) -------- .. method:: CopyToClipboard(range) Copy the given range to the clipboard. **Parameters:** * `range` (`wx.richtext.RichTextRange `_) | **Returns:** `bool` -------- .. method:: DeleteRangeWithUndo(range, ctrl) Submits a command to delete the given range. **Parameters:** * `range` (`wx.richtext.RichTextRange `_) * `ctrl` (`wx.richtext.RichTextCtrl `_) | **Returns:** `bool` -------- .. method:: EndAlignment() Ends alignment. | **Returns:** `bool` -------- .. method:: EndAllStyles() Ends all styles that have been started with a `Begin...` command. | **Returns:** `bool` -------- .. method:: EndBatchUndo() Ends collapsing undo/redo commands, and submits the combined command. | **Returns:** `bool` -------- .. method:: EndBold() Ends using bold. | **Returns:** `bool` -------- .. method:: EndCharacterStyle() Ends using the named character style. | **Returns:** `bool` -------- .. method:: EndFont() Ends using a font. | **Returns:** `bool` -------- .. method:: EndFontSize() Ends using a point size. | **Returns:** `bool` -------- .. method:: EndItalic() Ends using italic. | **Returns:** `bool` -------- .. method:: EndLeftIndent() Ends using a left indent. | **Returns:** `bool` -------- .. method:: EndLineSpacing() Ends using a line spacing. | **Returns:** `bool` -------- .. method:: EndListStyle() Ends using a specified list style. | **Returns:** `bool` -------- .. method:: EndNumberedBullet() Ends a numbered bullet. | **Returns:** `bool` -------- .. method:: EndParagraphSpacing() Ends paragraph spacing. | **Returns:** `bool` -------- .. method:: EndParagraphStyle() Ends applying a named character style. | **Returns:** `bool` -------- .. method:: EndRightIndent() Ends using a right indent. | **Returns:** `bool` -------- .. method:: EndStandardBullet() Ends using a standard bullet. | **Returns:** `bool` -------- .. method:: EndStyle() Ends the current style. | **Returns:** `bool` -------- .. method:: EndSuppressUndo() Ends suppressing undo/redo commands. | **Returns:** `bool` -------- .. method:: EndSymbolBullet() Ends using a symbol bullet. | **Returns:** `bool` -------- .. method:: EndTextColour() Ends using a text foreground colour. | **Returns:** `bool` -------- .. method:: EndURL() Ends applying a URL. | **Returns:** `bool` -------- .. method:: EndUnderline() Ends using underline. | **Returns:** `bool` -------- .. method:: FindHandlerByExtension(extension, imageType) Finds a handler by extension and type. **Parameters:** * `extension` (string) * `imageType` (int) | **Returns:** `wx.richtext.RichTextFileHandler `_ -------- .. method:: FindHandlerByFilename(filename, imageType) Finds a handler by name and type. **Parameters:** * `filename` (string) * `imageType` (int) | **Returns:** `wx.richtext.RichTextFileHandler `_ -------- .. method:: FindHandlerByName(name) Finds a handler by name. **Parameters:** * `name` (string) | **Returns:** `wx.richtext.RichTextFileHandler `_ -------- .. method:: FindHandlerByType(imageType) Finds a handler by type. **Parameters:** * `imageType` (int) | **Returns:** `wx.richtext.RichTextFileHandler `_ -------- .. method:: GetBatchedCommand() Gets the collapsed command. | **Returns:** `wxRichTextCommand` -------- .. method:: GetBulletProportion() `No docstrings available for this method.` -------- .. method:: GetBulletRightMargin() `No docstrings available for this method.` -------- .. method:: GetCommandProcessor() Gets the command processor. A text buffer always creates its own command processor when it is initialized. | **Returns:** `wx.CommandProcessor` -------- .. method:: GetExtWildcard(combine=False, save=False, types=None) Gets a wildcard incorporating all visible handlers. If `types` is present, it will be filled with the file type corresponding to each filter. This can be used to determine the type to pass to `LoadFile <#LoadFile>`_ given a selected filter. **Parameters:** * `combine` (bool) * `save` (bool) * `types` (list of integers) | **Returns:** `string` -------- .. method:: GetHandlerFlags() `No docstrings available for this method.` -------- .. method:: GetHandlers() Returns the list of file handlers. | **Returns:** `list of strings` -------- .. method:: GetRenderer() Returns the object to be used to render certain aspects of the content, such as bullets. | **Returns:** `wx.richtext.RichTextRenderer` -------- .. method:: GetScale() `No docstrings available for this method.` -------- .. method:: GetStyleForNewParagraph(pos, caretPosition=False, lookUpNewParaStyle=False) | **Parameters:** * `pos` (long) * `caretPosition` (bool) * `lookUpNewParaStyle` (bool) | **Returns:** `wx.richtext.TextAttrEx `_ -------- .. method:: GetStyleStackSize() Get the size of the style stack, for example to check correct nesting. | **Returns:** `long` -------- .. method:: HitTest(dc, pt, textPosition) Finds the text position for the given position, putting the position in `textPosition` if one is found. `pt` is in logical units (a zero y position is at the beginning of the buffer). The function returns one of the following values: =============================================== ============================================= HitTest Flags Value -- Description =============================================== ============================================= ``wx.richtext.RICHTEXT_HITTEST_NONE`` 0x01 -- The point was not on this object ``wx.richtext.RICHTEXT_HITTEST_BEFORE`` 0x02 -- The point was before the position returned from `HitTest` ``wx.richtext.RICHTEXT_HITTEST_AFTER`` 0x04 -- The point was after the position returned from `HitTest` ``wx.richtext.RICHTEXT_HITTEST_ON`` 0x08 -- The point was on the position returned from `HitTest` ``wx.richtext.RICHTEXT_HITTEST_OUTSIDE`` 0x10 -- The point was on space outside content =============================================== ============================================= | **Returns:** `int` -------- .. method:: InitStandardHandlers() Initialises the standard handlers. Currently, only the plain text loading/saving handler is initialised by default. -------- .. method:: InsertHandler(handler) Inserts a handler at the front of the list. **Parameters:** * `handler` (`wx.richtext.RichTextFileHandler `_) -------- .. method:: InsertImageWithUndo(pos, imageBlock, ctrl) Submits a command to insert the given image. **Parameters:** * `pos` (long) * `imageBlock` (`wx.richtext.RichTextImageBlock`) * `ctrl` (`wx.richtext.RichTextCtrl `_) | **Returns:** `bool` -------- .. method:: InsertNewlineWithUndo(pos, ctrl) Submits a command to insert a newline. **Parameters:** * `pos` (long) * `ctrl` (`wx.richtext.RichTextCtrl `_) | **Returns:** `bool` -------- .. method:: InsertParagraphsWithUndo(pos, paragraphs, ctrl, flags=0) Submits a command to insert a new paragraph. **Parameters:** * `pos` (long) * `paragraphs` (`wx.richtext.RichTextParagraphLayoutBox`) * `ctrl` (`wx.richtext.RichTextCtrl `_) * `flags` (int) | **Returns:** `bool` -------- .. method:: InsertTextWithUndo(pos, text, ctrl) Submits a command to insert the given text. **Parameters:** * `pos` (long) * `text` (string) * `ctrl` (`wx.richtext.RichTextCtrl `_) | **Returns:** `bool` -------- .. method:: IsModified() Returns ``True`` if the buffer has been modified. | **Returns:** `bool` -------- .. method:: LoadFile(filename, type=wx.richtext.RICHTEXT_TYPE_ANY) Loads content from a file. **Parameters:** * `filename` (string) * `type` (int) | **Returns:** `bool` -------- .. method:: LoadStream(stream, type=wx.richtext.RICHTEXT_TYPE_ANY) Load content from a text stream. **Parameters:** * `stream` (`wx.InputStream <../Widgets/wx.InputStream.html>`_) * `type` (int) | **Returns:** `bool` -------- .. method:: Modify(modify=True) Marks the buffer as modified or unmodified. **Parameters:** * `modify` (bool) -------- .. method:: PasteFromClipboard(position) Pastes the clipboard content to the buffer at the given position. **Parameters:** * `position` (long) | **Returns:** `bool` -------- .. method:: PopStyleSheet() `No docstrings available for this method.` -------- .. method:: PushStyleSheet(styleSheet) | **Parameters:** * `styleSheet` (`wx.richtext.RichTextStyleSheet `_) | **Returns:** `bool` -------- .. method:: RemoveEventHandler(handler, deleteHandler=False) Removes an event handler from the buffer's list of handlers, deleting the object if `deleteHandler` is ``True``. **Parameters:** * `handler` (`wx.EvtHandler <../Widgets/wx.EvtHandler.html>`_) * `deleteHandler` (bool) | **Returns:** `bool` -------- .. method:: RemoveHandler(name) Removes a handler. **Parameters:** * `name` (string) | **Returns:** `bool` -------- .. method:: ResetAndClearCommands() Clears the buffer, adds a new blank paragraph, and clears the command history. -------- .. method:: SaveFile(filename, type=wx.richtext.RICHTEXT_TYPE_ANY) Saves content to a file. **Parameters:** * `filename` (string) * `type` (int) | **Returns:** `bool` -------- .. method:: SaveStream(stream, type=wx.richtext.RICHTEXT_TYPE_ANY) Saves content to a string stream. **Parameters:** * `stream` (`wx.OutputStream <../Widgets/wx.OutputStream.html>`_) * `type` (int) | **Returns:** `bool` -------- .. method:: SendEvent(event, sendToAll=True) | **Parameters:** * `event` (`wx.Event <../Events/wx.Event.html>`_) * `sendToAll` (bool) | **Returns:** `bool` -------- .. method:: SetBulletProportion(prop) | **Parameters:** * `prop` (float) -------- .. method:: SetBulletRightMargin(margin) | **Parameters:** * `margin` (int) -------- .. method:: SetHandlerFlags(flags) | **Parameters:** * `flags` (int) -------- .. method:: SetRenderer(renderer) Sets `renderer` as the object to be used to render certain aspects of the content, such as bullets. You can override default rendering by deriving a new class from `wx.richtext.RichTextRenderer` or `wx.richtext.RichTextStdRenderer`, overriding one or more virtual functions, and setting an instance of the class using this function. **Parameters:** * `renderer` (`wx.richtext.RichTextRenderer`) -------- .. method:: SetScale(scale) | **Parameters:** * `scale` (double) -------- .. method:: SetStyleSheet(styleSheet) Sets the current style sheet, if any. This will allow the application to use named character and paragraph styles found in the style sheet. **Parameters:** * `styleSheet` (`wx.richtext.RichTextStyleSheet `_) -------- .. method:: SetStyleSheetAndNotify(sheet) | **Parameters:** * `sheet` (`wx.richtext.RichTextStyleSheet `_) | **Returns:** `bool` -------- .. method:: SubmitAction(action) Submit an action immediately, or delay it according to whether collapsing is on. **Parameters:** * `action` (`wx.richtext.RichTextAction`) | **Returns:** `bool` -------- .. method:: SuppressingUndo() Returns ``True`` if undo suppression is currently on. | **Returns:** `bool`