Version: 2.9.4
Public Member Functions | Protected Attributes
wxRichTextFileHandler Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/richtext/richtextbuffer.h>

Inheritance diagram for wxRichTextFileHandler:

Detailed Description

The base class for file handlers.

Library:  wxRichText
Category:  Rich Text
参照:
wxRichTextBuffer, wxRichTextCtrl

Public Member Functions

 wxRichTextFileHandler (const wxString &name=wxEmptyString, const wxString &ext=wxEmptyString, int type=0)
 Creates a file handler object.
virtual bool CanHandle (const wxString &filename) const
 Returns true if we handle this filename (if using files).
virtual bool CanSave () const
 Returns true if we can save using this handler.
virtual bool CanLoad () const
 Returns true if we can load using this handler.
virtual bool IsVisible () const
 Returns true if this handler should be visible to the user.
virtual void SetVisible (bool visible)
 Sets whether the handler should be visible to the user (via the application's load and save dialogs).
void SetName (const wxString &name)
 Sets the name of the handler.
wxString GetName () const
 Returns the name of the handler.
void SetExtension (const wxString &ext)
 Sets the default extension to recognise.
wxString GetExtension () const
 Returns the default extension to recognise.
void SetType (int type)
 Sets the handler type.
int GetType () const
 Returns the handler type.
void SetFlags (int flags)
 Sets flags that change the behaviour of loading or saving.
int GetFlags () const
 Returns flags controlling how loading and saving is done.
void SetEncoding (const wxString &encoding)
 Sets the encoding to use when saving a file.
const wxStringGetEncoding () const
 Returns the encoding to use when saving a file.

Protected Attributes

wxString m_name
wxString m_encoding
wxString m_extension
int m_type
int m_flags
bool m_visible

List of all members.


Constructor & Destructor Documentation

wxRichTextFileHandler::wxRichTextFileHandler ( const wxString name = wxEmptyString,
const wxString ext = wxEmptyString,
int  type = 0 
) [inline]

Creates a file handler object.


Member Function Documentation

virtual bool wxRichTextFileHandler::CanHandle ( const wxString filename) const [virtual]

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

By default, checks the extension.

virtual bool wxRichTextFileHandler::CanLoad ( ) const [inline, virtual]

Returns true if we can load using this handler.

Reimplemented in wxRichTextPlainTextHandler, and wxRichTextXMLHandler.

virtual bool wxRichTextFileHandler::CanSave ( ) const [inline, virtual]

Returns true if we can save using this handler.

Reimplemented in wxRichTextPlainTextHandler, and wxRichTextXMLHandler.

const wxString& wxRichTextFileHandler::GetEncoding ( ) const [inline]

Returns the encoding to use when saving a file.

If empty, a suitable encoding is chosen.

wxString wxRichTextFileHandler::GetExtension ( ) const [inline]

Returns the default extension to recognise.

int wxRichTextFileHandler::GetFlags ( ) const [inline]

Returns flags controlling how loading and saving is done.

wxString wxRichTextFileHandler::GetName ( ) const [inline]

Returns the name of the handler.

int wxRichTextFileHandler::GetType ( ) const [inline]

Returns the handler type.

virtual bool wxRichTextFileHandler::IsVisible ( ) const [inline, virtual]

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

void wxRichTextFileHandler::SetEncoding ( const wxString encoding) [inline]

Sets the encoding to use when saving a file.

If empty, a suitable encoding is chosen.

void wxRichTextFileHandler::SetExtension ( const wxString ext) [inline]

Sets the default extension to recognise.

void wxRichTextFileHandler::SetFlags ( int  flags) [inline]

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.

void wxRichTextFileHandler::SetName ( const wxString name) [inline]

Sets the name of the handler.

void wxRichTextFileHandler::SetType ( int  type) [inline]

Sets the handler type.

virtual void wxRichTextFileHandler::SetVisible ( bool  visible) [inline, virtual]

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


Member Data Documentation

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines