Class: Gtk2AppLib::Widgets::OnOffButton
- Inherits:
-
Button
- Object
- Button
- Gtk2AppLib::Widgets::OnOffButton
- Defined in:
- lib/gtk2applib/widgets/on_off_button.rb
Overview
ImageButton is a button with "on" and "off" images.
Instance Method Summary (collapse)
- - (Object) delete
-
- (OnOffButton) initialize(*parameters, &block)
constructor
A new instance of OnOffButton.
- - (Object) is=(object)
Methods inherited from Button
Constructor Details
- (OnOffButton) initialize(*parameters, &block)
A new instance of OnOffButton
6 7 8 9 10 |
# File 'lib/gtk2applib/widgets/on_off_button.rb', line 6 def initialize(*parameters, &block) @on, @off, *parameters = Parameters.map(parameters) super(@off, *parameters, &block) self.is = nil end |
Instance Method Details
- (Object) delete
17 18 19 20 |
# File 'lib/gtk2applib/widgets/on_off_button.rb', line 17 def delete self.is = nil self.image.pixbuf = @off end |
- (Object) is=(object)
12 13 14 15 |
# File 'lib/gtk2applib/widgets/on_off_button.rb', line 12 def is=(object) super self.image.pixbuf = @on end |