Class: RubyMVC::Toolkit::WxRuby::WebView
- Inherits:
-
Wx::HtmlWindow
- Object
- Wx::HtmlWindow
- RubyMVC::Toolkit::WxRuby::WebView
show all
- Includes:
- SignalHandler, Common
- Defined in:
- lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Common
#title, #title=
#signal_connect, #signal_disconnect, #signal_emit
Constructor Details
#initialize(options = {}, &block) ⇒ WebView
Returns a new instance of WebView.
34
35
36
37
|
# File 'lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb', line 34
def initialize(options = {}, &block)
super(WxRuby.parent(options))
set_background_colour(Wx::WHITE)
end
|
Instance Attribute Details
#location ⇒ Object
Returns the value of attribute location.
39
40
41
|
# File 'lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb', line 39
def location
@location
end
|
Instance Method Details
#can_go_back? ⇒ Boolean
41
42
43
|
# File 'lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb', line 41
def can_go_back?
history_can_back
end
|
#can_go_forward? ⇒ Boolean
45
46
47
|
# File 'lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb', line 45
def can_go_forward?
history_can_forward
end
|
#go_back ⇒ Object
49
50
51
|
# File 'lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb', line 49
def go_back
history_back
end
|
#go_forward ⇒ Object
53
54
55
|
# File 'lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb', line 53
def go_forward
history_forward
end
|
#load_html(html, base_uri = nil) ⇒ Object
70
71
72
73
74
|
# File 'lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb', line 70
def load_html(html, base_uri = nil)
set_page(html)
@location = base_uri
end
|
#on_link_clicked(link) ⇒ Object
– wxRuby event handlers ++
80
81
82
|
# File 'lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb', line 80
def on_link_clicked(link)
signal_emit("navigation-requested", self, link.href, link.target)
end
|
#open(uri) ⇒ Object
57
58
59
60
|
# File 'lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb', line 57
def open(uri)
@location = uri
load_page(uri)
end
|
#reload ⇒ Object
66
67
68
|
# File 'lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb', line 66
def reload
open(location)
end
|
#stop_loading ⇒ Object
62
63
64
|
# File 'lib/ruby_mvc/toolkit/peers/wxruby/web_view.rb', line 62
def stop_loading
end
|