Class: Wx::HTML::HtmlFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/html/html_window.rb

Overview

This class is the parent class of input filters for HtmlWindow.

It allows you to read and display files of different file formats.

Category: Wx::HTML

See Also:

  • Filters

Requires:

  • USE_HTML

Instance Method Summary collapse

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initializeWx::HTML::HtmlFilter

Constructor.



404
# File 'lib/wx/doc/gen/html/html_window.rb', line 404

def initialize; end

Instance Method Details

#can_read(file) ⇒ Boolean Also known as: can_read?

Returns true if this filter is capable of reading file file.

Example:

class MyFilter < Wx::HTML::HtmlFilter
    # ...

    def can_read(file)
      file.get_mime_type == 'application/x-ugh'
    end

    # ...
  end

Parameters:

Returns:

  • (Boolean)


422
# File 'lib/wx/doc/gen/html/html_window.rb', line 422

def can_read(file) end

#read_file(file) ⇒ String

Reads the file and returns string with HTML document.

Example:

class MyFilter < Wx::HTML::HtmlFilter
    # ...

    def read_file(file)
      '<html><body><img src="' + file.get_location + '"></body></html>'
    end

    # ...
  end

Parameters:

Returns:

  • (String)


441
# File 'lib/wx/doc/gen/html/html_window.rb', line 441

def read_file(file) end