A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://wxpython.org/Phoenix/docs/html/wx.richtext.RichTextFileHandler.html below:

wx.richtext.RichTextFileHandler — wxPython Phoenix 4.2.4a1 documentation

wx.richtext.RichTextFileHandler¶

The base class for file handlers.

Class Hierarchy¶

Inheritance diagram for class

RichTextFileHandler

:

Known Subclasses¶

wx.richtext.RichTextHTMLHandler, wx.richtext.RichTextPlainTextHandler, wx.richtext.RichTextXMLHandler

Methods Summary¶

__init__

Creates a file handler object.

CanHandle

Returns True if we handle this filename (if using files).

CanLoad

Returns True if we can load using this handler.

CanSave

Returns True if we can save using this handler.

DoLoadFile

Override to load content from stream into buffer.

DoSaveFile

Override to save content to stream from buffer.

GetEncoding

Returns the encoding to use when saving a file.

GetExtension

Returns the default extension to recognise.

GetFlags

Returns flags controlling how loading and saving is done.

GetName

Returns the name of the handler.

GetType

Returns the handler type.

IsVisible

Returns True if this handler should be visible to the user.

LoadFile

Loads the buffer from a stream.

SaveFile

Saves the buffer to a stream.

SetEncoding

Sets the encoding to use when saving a file.

SetExtension

Sets the default extension to recognise.

SetFlags

Sets flags that change the behaviour of loading or saving.

SetName

Sets the name of the handler.

SetType

Sets the handler type.

SetVisible

Sets whether the handler should be visible to the user (via the application’s load and save dialogs).

Properties Summary¶ Class API¶
class wx.richtext.RichTextFileHandler(Object)¶

Possible constructors:

RichTextFileHandler(name='', ext='', type=0) -> None

The base class for file handlers.


Methods¶
__init__(self, name='', ext='', type=0)¶

Creates a file handler object.

Parameters:
  • name (string)

  • ext (string)

  • type (int)

Return type:

None


CanHandle(self, filename)¶

Returns True if we handle this filename (if using files).

By default, checks the extension.

Parameters:

filename (string)

Return type:

bool


CanLoad(self)¶

Returns True if we can load using this handler.

Return type:

bool


CanSave(self)¶

Returns True if we can save using this handler.

Return type:

bool


DoLoadFile(self, buffer, stream)¶

Override to load content from stream into buffer.

Parameters:
Return type:

bool


DoSaveFile(self, buffer, stream)¶

Override to save content to stream from buffer.

Parameters:
Return type:

bool


GetEncoding(self)¶

Returns the encoding to use when saving a file.

If empty, a suitable encoding is chosen.

Return type:

str


GetExtension(self)¶

Returns the default extension to recognise.

Return type:

str


GetFlags(self)¶

Returns flags controlling how loading and saving is done.

Return type:

int


GetName(self)¶

Returns the name of the handler.

Return type:

str


GetType(self)¶

Returns the handler type.

Return type:

int


IsVisible(self)¶

Returns True if this handler should be visible to the user.

Return type:

bool


LoadFile(self, *args, **kw)¶

Overloaded Implementations:

LoadFile (self, buffer, stream)

Loads the buffer from a stream.

Not all handlers will implement file loading.

Parameters:
Return type:

bool

LoadFile (self, buffer, filename)

Loads the buffer from a file.

Parameters:
Return type:

bool



SaveFile(self, *args, **kw)¶

Overloaded Implementations:

SaveFile (self, buffer, stream)

Saves the buffer to a stream.

Not all handlers will implement file saving.

Parameters:
Return type:

bool

SaveFile (self, buffer, filename)

Saves the buffer to a file.

Parameters:
Return type:

bool



SetEncoding(self, encoding)¶

Sets the encoding to use when saving a file.

If empty, a suitable encoding is chosen.

Parameters:

encoding (string)

Return type:

None


SetExtension(self, ext)¶

Sets the default extension to recognise.

Parameters:

ext (string)

Return type:

None


SetFlags(self, flags)¶

Sets flags that change the behaviour of loading or saving.

See the documentation for each handler class to see what flags are relevant for each handler.

You call this function directly if you are using a file handler explicitly (without going through the text control or buffer LoadFile/SaveFile API). Or, you can call the control or buffer’s SetHandlerFlags function to set the flags that will be used for subsequent load and save operations.

Parameters:

flags (int)

Return type:

None


SetName(self, name)¶

Sets the name of the handler.

Parameters:

name (string)

Return type:

None


SetType(self, type)¶

Sets the handler type.

Parameters:

type (int)

Return type:

None


SetVisible(self, visible)¶

Sets whether the handler should be visible to the user (via the application’s load and save dialogs).

Parameters:

visible (bool)

Return type:

None


Properties¶
Encoding¶

See GetEncoding and SetEncoding


Extension¶

See GetExtension and SetExtension


Flags¶

See GetFlags and SetFlags


Name¶

See GetName and SetName


Type¶

See GetType and SetType


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4