Class: XRC2Ruby::ObjectTypes::BitmapButton
- Defined in:
- lib/wx_sugar/xrc/xrc2ruby_types/buttons.rb
Constant Summary
Constants inherited from Window
Instance Attribute Summary collapse
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#focus ⇒ Object
Returns the value of attribute focus.
-
#hover ⇒ Object
Returns the value of attribute hover.
-
#selected ⇒ Object
Returns the value of attribute selected.
Attributes inherited from Window
#bg, #enabled, #exstyle, #fg, #help, #hidden, #tooltip
Attributes inherited from Object
#centered, #name, #parent, #sub_class, #win_class
Instance Method Summary collapse
-
#setup ⇒ Object
Call extra methods to set up images for alternate states, if these have been defined in the XRC file.
Methods inherited from Window
Methods included from InitArgs
#inherited, #init_arg, #init_args, #translatable_string_init_arg
Methods inherited from Object
#initialize, #inspect, next_id, #output, #var_name
Constructor Details
This class inherits a constructor from XRC2Ruby::ObjectTypes::Object
Instance Attribute Details
#disabled ⇒ Object
Returns the value of attribute disabled.
15 16 17 |
# File 'lib/wx_sugar/xrc/xrc2ruby_types/buttons.rb', line 15 def disabled @disabled end |
#focus ⇒ Object
Returns the value of attribute focus.
15 16 17 |
# File 'lib/wx_sugar/xrc/xrc2ruby_types/buttons.rb', line 15 def focus @focus end |
#hover ⇒ Object
Returns the value of attribute hover.
15 16 17 |
# File 'lib/wx_sugar/xrc/xrc2ruby_types/buttons.rb', line 15 def hover @hover end |
#selected ⇒ Object
Returns the value of attribute selected.
15 16 17 |
# File 'lib/wx_sugar/xrc/xrc2ruby_types/buttons.rb', line 15 def selected @selected end |
Instance Method Details
#setup ⇒ Object
Call extra methods to set up images for alternate states, if these have been defined in the XRC file.
22 23 24 25 26 27 28 29 30 |
# File 'lib/wx_sugar/xrc/xrc2ruby_types/buttons.rb', line 22 def setup [ :focus, :selected, :disabled, :hover ].inject('') do | out, extra_img | if send(extra_img) out << "#{var_name}.bitmap_#{extra_img} = " out << " Wx::Bitmap.new('#{send(extra_img)}')\n" end out end end |