Class: Wx::RTC::RichTextFileHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/rtc/rich_text_file_handler.rb

Overview

The base class for file handlers.

Category: Rich Text

See Also:

Requires:

  • USE_RICHTEXT

Instance Method Summary collapse

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initialize(name = (''), ext = (''), type = 0) ⇒ Wx::RTC::RichTextFileHandler

Creates a file handler object.

Parameters:

  • name (String) (defaults to: (''))
  • ext (String) (defaults to: (''))
  • type (Integer) (defaults to: 0)


26
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 26

def initialize(name=(''), ext=(''), type=0) end

Instance Method Details

#can_handle(filename) ⇒ Boolean Also known as: can_handle?

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

By default, checks the extension.

Parameters:

  • filename (String)

Returns:

  • (Boolean)


61
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 61

def can_handle(filename) end

#can_loadBoolean Also known as: can_load?

Returns true if we can load using this handler.

Returns:

  • (Boolean)


71
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 71

def can_load; end

#can_saveBoolean Also known as: can_save?

Returns true if we can save using this handler.

Returns:

  • (Boolean)


66
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 66

def can_save; end

#get_encodingWx::String Also known as: encoding

Returns the encoding to use when saving a file.

If empty, a suitable encoding is chosen.

Returns:

  • (Wx::String)


144
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 144

def get_encoding; end

#get_extensionString Also known as: extension

Returns the default extension to recognise.

Returns:

  • (String)


104
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 104

def get_extension; end

#get_flagsInteger Also known as: flags

Returns flags controlling how loading and saving is done.

Returns:

  • (Integer)


129
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 129

def get_flags; end

#get_nameString Also known as: name

Returns the name of the handler.

Returns:

  • (String)


93
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 93

def get_name; end

#get_typeInteger Also known as: type

Returns the handler type.

Returns:

  • (Integer)


115
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 115

def get_type; end

#is_visibleBoolean Also known as: visible?

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

Returns:

  • (Boolean)


76
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 76

def is_visible; end

#load_file(buffer, stream) ⇒ Boolean #load_file(buffer, filename) ⇒ Boolean

Overloads:

  • #load_file(buffer, stream) ⇒ Boolean

    Loads the buffer from a stream.

    Not all handlers will implement file loading.

    Parameters:

    Returns:

    • (Boolean)
  • #load_file(buffer, filename) ⇒ Boolean

    Loads the buffer from a file.

    Parameters:

    Returns:

    • (Boolean)


40
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 40

def load_file(*args) end

#save_file(buffer, stream) ⇒ Boolean #save_file(buffer, filename) ⇒ Boolean

Overloads:

  • #save_file(buffer, stream) ⇒ Boolean

    Saves the buffer to a stream.

    Not all handlers will implement file saving.

    Parameters:

    Returns:

    • (Boolean)
  • #save_file(buffer, filename) ⇒ Boolean

    Saves the buffer to a file.

    Parameters:

    Returns:

    • (Boolean)


54
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 54

def save_file(*args) end

#set_encoding(encoding) ⇒ void Also known as: encoding=

This method returns an undefined value.

Sets the encoding to use when saving a file.

If empty, a suitable encoding is chosen.

Parameters:

  • encoding (String)


137
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 137

def set_encoding(encoding) end

#set_extension(ext) ⇒ void Also known as: extension=

This method returns an undefined value.

Sets the default extension to recognise.

Parameters:

  • ext (String)


99
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 99

def set_extension(ext) end

#set_flags(flags) ⇒ void Also known as: flags=

This method returns an undefined value.

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 (Integer)


124
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 124

def set_flags(flags) end

#set_name(name) ⇒ void Also known as: name=

This method returns an undefined value.

Sets the name of the handler.

Parameters:

  • name (String)


88
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 88

def set_name(name) end

#set_type(type) ⇒ void Also known as: type=

This method returns an undefined value.

Sets the handler type.

Parameters:

  • type (Integer)


110
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 110

def set_type(type) end

#set_visible(visible) ⇒ void Also known as: visible=

This method returns an undefined value.

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

Parameters:

  • visible (Boolean)


82
# File 'lib/wx/doc/gen/rtc/rich_text_file_handler.rb', line 82

def set_visible(visible) end