Class: Gtk2AppLib::Widgets::Label
- Inherits:
-
Object
- Object
- Gtk2AppLib::Widgets::Label
- Defined in:
- lib/gtk2applib/widgets/label.rb
Overview
I'm a label
Instance Method Summary (collapse)
- - (Boolean) empty?
-
- (Object) set_markup(txt, alt = self.text, font = self.options[:modify_font])
Tries to set a marked up label, and on failure reverts to a regular label.
- - (Object) set_text(txt, font = self.options[:modify_font])
Instance Method Details
- (Boolean) empty?
6 7 8 |
# File 'lib/gtk2applib/widgets/label.rb', line 6 def empty? self.text == '' end |
- (Object) set_markup(txt, alt = self.text, font = self.options[:modify_font])
Tries to set a marked up label, and on failure reverts to a regular label.
16 17 18 19 20 |
# File 'lib/gtk2applib/widgets/label.rb', line 16 def set_markup(txt, alt=self.text, font=self.[:modify_font]) super(txt) self.text = alt if empty? self.modify_font(font) if !font.nil? end |
- (Object) set_text(txt, font = self.options[:modify_font])
24 25 26 27 |
# File 'lib/gtk2applib/widgets/label.rb', line 24 def set_text(txt, font=self.[:modify_font]) self.text = txt self.modify_font(font) if !font.nil? end |