Class: TkFont::DescendantFont (Ruby 2.3.4)

In Files

  • tk/lib/tk/font.rb

Class/Module Index [+]

Quicksearch

TkFont::DescendantFont

Public Class Methods

new(compound, type)
 
               # File tk/lib/tk/font.rb, line 148
def initialize(compound, type)
  unless compound.kind_of?(TkFont)
    fail ArgumentError, "a TkFont object is expected for the 1st argument"
  end

  @compound = compound
  case type
  when 'kanji', 'latin', 'ascii'
    @type = type
  when :kanji, :latin, :ascii
    @type = type.to_s
  else
    fail ArgumentError, "unknown type '#{type}'"
  end
end
            

Public Instance Methods

[](slot)
 
               # File tk/lib/tk/font.rb, line 181
def [](slot)
  @compound.__send__(@type + '_configinfo', slot)
end
            
[]=(slot, value)
 
               # File tk/lib/tk/font.rb, line 184
def []=(slot, value)
  @compound.__send__(@type + '_configure', slot, value)
  value
end
            
clone()
 
               # File tk/lib/tk/font.rb, line 167
def clone
  fail RuntimeError, "cannot clone a descendant font"
end
            
dup()
 
               # File tk/lib/tk/font.rb, line 164
def dup
  fail RuntimeError, "cannot dupulicate a descendant font"
end
            
font()
 
               # File tk/lib/tk/font.rb, line 174
def font
  @compound.__send__(@type + '_font_id')
end
            
Also aliased as: font_id, name, to_s
font_id()
Alias for: font
method_missing(id, *args)
 
               # File tk/lib/tk/font.rb, line 189
def method_missing(id, *args)
  @compound.__send__(@type + '_' + id.id2name, *args)
end
            
name()
Alias for: font
to_eval()
 
               # File tk/lib/tk/font.rb, line 171
def to_eval
  @compound.__send__(@type + '_font_id')
end
            
to_s()
Alias for: font