Class: Gtk::TextTag

Inherits:
Object
  • Object
show all
Extended by:
GLib::Deprecatable
Defined in:
lib/gtk3/text-tag.rb,
lib/gtk3/deprecated.rb

Instance Method Summary collapse

Instance Method Details

#set_scale(scale) ⇒ Object Also known as: scale=



31
32
33
34
35
36
37
# File 'lib/gtk3/text-tag.rb', line 31

def set_scale(scale)
  case scale
  when Symbol, String
    scale = Pango::Scale.const_get(scale.to_s.upcase)
  end
  set_scale_raw(scale)
end

#set_scale_rawObject



30
# File 'lib/gtk3/text-tag.rb', line 30

alias_method :set_scale_raw, :set_scale

#set_weight(weight) ⇒ Object Also known as: weight=



20
21
22
23
24
25
26
# File 'lib/gtk3/text-tag.rb', line 20

def set_weight(weight)
  case weight
  when Symbol, String
    weight = Pango::Weight.new(weight).to_i
  end
  set_weight_raw(weight)
end

#set_weight_rawObject



19
# File 'lib/gtk3/text-tag.rb', line 19

alias_method :set_weight_raw, :set_weight