Class: Scarpe::Webview::Button
- Inherits:
-
Drawable
- Object
- Shoes::Linkable
- Drawable
- Scarpe::Webview::Button
- Defined in:
- lib/scarpe/wv/button.rb
Constant Summary
Constants included from Shoes::Log
Shoes::Log::DEFAULT_COMPONENT, Shoes::Log::DEFAULT_DEBUG_LOG_CONFIG, Shoes::Log::DEFAULT_LOG_CONFIG
Instance Attribute Summary
Attributes inherited from Drawable
#children, #parent, #shoes_linkable_id
Attributes inherited from Shoes::Linkable
Instance Method Summary collapse
- #element ⇒ Object
-
#initialize(properties) ⇒ Button
constructor
A new instance of Button.
Methods inherited from Drawable
#add_child, #bind, #destroy_self, display_class_for, #full_window_redraw!, #handler_js_code, #html_element, #html_id, #inspect, #needs_update!, #promise_update, #properties_changed, #remove_child, #set_parent, #shoes_styles, #to_html
Methods included from Shoes::Log
configure_logger, #log_init, logger
Methods inherited from Shoes::Linkable
#bind_shoes_event, #send_self_event, #send_shoes_event, #unsub_all_shoes_events, #unsub_shoes_event
Constructor Details
#initialize(properties) ⇒ Button
Returns a new instance of Button.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/scarpe/wv/button.rb', line 5 def initialize(properties) super # Bind to display-side handler for "click" bind("click") do # This will be sent to the bind_self_event in Button send_self_event(event_name: "click") end bind("hover") do # This will be sent to the bind_self_event in Button send_self_event(event_name: "hover") end end |
Instance Method Details
#element ⇒ Object
20 21 22 |
# File 'lib/scarpe/wv/button.rb', line 20 def element render("button") end |