Class: Wx::HTML::HtmlFilter
- 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
Instance Method Summary collapse
-
#can_read(file) ⇒ Boolean
(also: #can_read?)
Returns true if this filter is capable of reading file file.
-
#initialize ⇒ Wx::HTML::HtmlFilter
constructor
Constructor.
-
#read_file(file) ⇒ String
Reads the file and returns string with HTML document.
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize ⇒ Wx::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
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
441 |
# File 'lib/wx/doc/gen/html/html_window.rb', line 441 def read_file(file) end |