class Gtk::Label - gtk3-3.2.9 Documentation

# class Gtk::Label

### Public Class Methods

new(text=nil, options={}) click to toggle source

    # File lib/gtk3/label.rb, line 20
    def initialize(text=nil, options={})
      if options == true or options == false or options.nil?
        mnemonic = options
        warn "Gtk::Label.new(text, mnemonic) style has been deprecated. " +
             "Use Gtk::Label.new(text, {:use_underline => #{mnemonic}}) style instead."
        options = {
          :use_underline => mnemonic,
        }
      end
      if options[:use_underline]
        initialize_new_with_mnemonic(text)
      else
        initialize_raw(text || "")
      end
    end

Also aliased as: initialize_raw

### Public Instance Methods

initialize_raw(text=nil, options={})
Alias for: new
set_markup(text, options={}) click to toggle source

    # File lib/gtk3/label.rb, line 38
    def set_markup(text, options={})
      if options == true or options == false or options.nil?
        mnemonic = options
        warn "Gtk::Label#set_markup(text, mnemonic) style has been deprecated. " +
             "Use Gtk::Label#set_marup(text, {:use_underline => #{mnemonic}}) style instead."
        options = {
          :use_underline => mnemonic,
        }
      end
      if options[:use_underline]
        set_markup_with_mnemonic(text)
      else
        set_markup_raw(text)
      end
    end

Also aliased as: set_markup_raw
set_markup_raw(text, options={})
Alias for: set_markup