Class TkcGroup
In: tk/lib/tk/canvastag.rb
Parent: TkcTag

Methods

exclude   include   new  

Constants

Tk_cGroup_ID = ['tkcg'.freeze, '00000'.taint].freeze

Public Class methods

def create_self(parent, *args)

[Source]

# File tk/lib/tk/canvastag.rb, line 323
  def initialize(parent, *args)
    #unless parent.kind_of?(TkCanvas)

    #  fail ArguemntError, "expect TkCanvas for 1st argument"

    #end

    @c = parent
    @cpath = parent.path
    # @path = @id = Tk_cGroup_ID.join('')

    @path = @id = Tk_cGroup_ID.join(TkCore::INTERP._ip_id_)
    CTagID_TBL[@cpath] = {} unless CTagID_TBL[@cpath]
    CTagID_TBL[@cpath][@id] = self
    Tk_cGroup_ID[1].succ!
    add(*args) if args != []
  end

Public Instance methods

[Source]

# File tk/lib/tk/canvastag.rb, line 345
  def exclude(*tags)
    for i in tags
      i.delete(@id)
    end
    self
  end

private :create_self

[Source]

# File tk/lib/tk/canvastag.rb, line 338
  def include(*tags)
    for i in tags
      i.addtag(@id)
    end
    self
  end

[Validate]