Class: TT::GUI::ToolbarButton
Overview
Instance Attribute Summary collapse
Attributes inherited from Button
Attributes inherited from Control
#bottom, #font_bold, #font_italic, #font_name, #font_size, #height, #left, #name, #parent, #right, #tooltip, #top, #ui_id, #width, #window
Instance Method Summary collapse
- #custom_properties ⇒ TT::JSON
-
#initialize(caption, &on_click) ⇒ ToolbarButton
constructor
A new instance of ToolbarButton.
Methods inherited from Control
#add_event_handler, #call_event, #disabled=, #disabled?, #enabled=, #enabled?, events, has_event?, #inspect, #move, #position, #positioned?, #properties, #release!, #size
Methods included from ControlEvents
Constructor Details
#initialize(caption, &on_click) ⇒ ToolbarButton
Returns a new instance of ToolbarButton
583 584 585 586 587 588 |
# File 'TT_Lib2/gui.rb', line 583 def initialize( , &on_click ) super # Defaults @width = 28 @height = 28 end |
Instance Attribute Details
#icon ⇒ Object
577 578 579 |
# File 'TT_Lib2/gui.rb', line 577 def icon @icon end |
Instance Method Details
#custom_properties ⇒ TT::JSON
592 593 594 595 596 597 598 |
# File 'TT_Lib2/gui.rb', line 592 def custom_properties # (!) Improve custom properties. prop = super #prop['caption'] = @caption prop['icon'] = @icon if @icon prop end |