In Files

  • tk/lib/tkextlib/tkHTML/htmlwidget.rb

Class/Module Index [+]

Quicksearch

Tk::HTML_Widget::ClippingWindow

Public Class Methods

new(parent, keys={}) click to toggle source
 
               # File tk/lib/tkextlib/tkHTML/htmlwidget.rb, line 47
def self.new(parent, keys={})
  if parent.kind_of?(Hash)
    keys = TkComm._symbolkey2str(parent)
    parent = keys.delete('parent')
  end

  if parent.kind_of?(String)
    ppath = parent.path
  elsif parent
    ppath = parent
  else
    ppath = ''
  end
  HtmlClip_TBL.mutex.synchronize{
    return HtmlClip_TBL[ppath] if HtmlClip_TBL[ppath]
  }

  widgetname = keys.delete('widgetname')
  if widgetname =~ /^(.*)\.[^.]+$/
    ppath2 = $1
    if ppath2[0] != ?.
      ppath2 = ppath + '.' + ppath2
    end
    HtmlClip_TBL.mutex.synchronize{
      return HtmlClip_TBL[ppath2] if HtmlClip_TBL[ppath2]
    }

    ppath = ppath2
  end
  
  parent = TkComm._genobj_for_tkwidget(ppath)
  unless parent.kind_of?(Tk::HTML_Widget)
    fail ArgumentError, "parent must be a Tk::HTML_Widget instance"
  end

  super(parent)
end
            
new(parent) click to toggle source
 
               # File tk/lib/tkextlib/tkHTML/htmlwidget.rb, line 85
def initialize(parent)
  @parent = parent
  @ppath = parent.path
  @path = @id = @ppath + '.x'
  HtmlClip_TBL.mutex.synchronize{
    HtmlClip_TBL[@ppath] = self
  }
end
            

Public Instance Methods

method_missing(m, *args, &b) click to toggle source
 
               # File tk/lib/tkextlib/tkHTML/htmlwidget.rb, line 94
def method_missing(m, *args, &b)
  @parent.__send__(m, *args, &b)
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus