Method: XRC2Ruby::ObjectTypes::BitmapButton#setup

Defined in:
lib/wx_sugar/xrc/xrc2ruby_types/buttons.rb

#setupObject

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