Class: Gtk::Label
- Inherits:
-
Object
- Object
- Gtk::Label
- Defined in:
- lib/gtk3/label.rb
Instance Method Summary collapse
-
#initialize(text = nil, options = {}) ⇒ Label
constructor
A new instance of Label.
- #initialize_raw ⇒ Object
- #set_markup(text, options = {}) ⇒ Object
- #set_markup_raw ⇒ Object
Constructor Details
#initialize(text = nil, options = {}) ⇒ Label
Returns a new instance of Label.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/gtk3/label.rb', line 20 def initialize(text=nil, ={}) if == true or == false or .nil? mnemonic = warn "Gtk::Label.new(text, mnemonic) style has been deprecated. " + "Use Gtk::Label.new(text, {:use_underline => #{mnemonic}}) style instead." = { :use_underline => mnemonic, } end if [:use_underline] initialize_new_with_mnemonic(text) else initialize_raw(text || "") end end |
Instance Method Details
#initialize_raw ⇒ Object
19 |
# File 'lib/gtk3/label.rb', line 19 alias_method :initialize_raw, :initialize |
#set_markup(text, options = {}) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/gtk3/label.rb', line 38 def set_markup(text, ={}) if == true or == false or .nil? mnemonic = warn "Gtk::Label#set_markup(text, mnemonic) style has been deprecated. " + "Use Gtk::Label#set_marup(text, {:use_underline => #{mnemonic}}) style instead." = { :use_underline => mnemonic, } end if [:use_underline] set_markup_with_mnemonic(text) else set_markup_raw(text) end end |
#set_markup_raw ⇒ Object
37 |
# File 'lib/gtk3/label.rb', line 37 alias_method :set_markup_raw, :set_markup |