Class TkFont::DescendantFont
In: tk/lib/tk/font.rb
Parent: Object

Methods

[]   []=   clone   dup   font   method_missing   new   to_eval  

Public Class methods

[Source]

# File tk/lib/tk/font.rb, line 120
    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

[Source]

# File tk/lib/tk/font.rb, line 149
    def [](slot)
      @compound.__send__(@type + '_configinfo', slot)
    end

[Source]

# File tk/lib/tk/font.rb, line 152
    def []=(slot, value)
      @compound.__send__(@type + '_configure', slot, value)
      value
    end

[Source]

# File tk/lib/tk/font.rb, line 138
    def clone
      fail RuntimeError, "cannot clone a descendant font"
    end

[Source]

# File tk/lib/tk/font.rb, line 135
    def dup
      fail RuntimeError, "cannot dupulicate a descendant font"
    end

[Source]

# File tk/lib/tk/font.rb, line 145
    def font
      @compound.__send__(@type + '_font_id')
    end

[Source]

# File tk/lib/tk/font.rb, line 157
    def method_missing(id, *args)
      @compound.__send__(@type + '_' + id.id2name, *args)
    end

[Source]

# File tk/lib/tk/font.rb, line 142
    def to_eval
      @compound.__send__(@type + '_font_id')
    end

[Validate]

ruby-doc.org is hosted and maintained by James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, Arizona. The site was created in 2002 as part of the Ruby Documentation Project to promote the Ruby language and to help other Ruby hackers.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.