Method: Gtk::Label#initialize
- Defined in:
- lib/gtk3/label.rb
#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 |