# class Tk::Iwidgets::Tabnotebook

### Constants

TkCommandNames
WidgetClassName

### Public Class Methods

new(*args) click to toggle source
Calls superclass method TkWindow.new

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 72
    def initialize(*args)
      super(*args)
      @tabset = self.component_widget('tabset')
    end

### Public Instance Methods

add(keys={}) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 77
    def add(keys={})
      window(tk_call(@path, 'add', *hash_kv(keys)))
    end

child_site(idx) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 85
    def child_site(idx)
      window(tk_call(@path, 'childsite', index(idx)))
    end

child_site_list() click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 81
    def child_site_list
      list(tk_call(@path, 'childsite'))
    end

delete(idx1, idx2=nil) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 89
    def delete(idx1, idx2=nil)
      if idx2
        tk_call(@path, 'delete', index(idx1), index(idx2))
      else
        tk_call(@path, 'delete', index(idx1))
      end
      self
    end

index(idx) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 98
    def index(idx)
      #number(tk_call(@path, 'index', tagid(idx)))
      @tabset.index(tagid(idx))
    end

insert(idx, keys={}) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 103
    def insert(idx, keys={})
      window(tk_call(@path, 'insert', index(idx), *hash_kv(keys)))
    end

next() click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 107
    def next
      tk_call(@path, 'next')
      self
    end

prev() click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 112
    def prev
      tk_call(@path, 'prev')
      self
    end

scrollbar(bar=nil)
Alias for: yscrollbar
scrollcommand(cmd=Proc.new) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 127
    def scrollcommand(cmd=Proc.new)
      configure_cmd 'scrollcommand', cmd
      self
    end

Also aliased as: xscrollcommand, yscrollcommand
select(idx) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 117
    def select(idx)
      tk_call(@path, 'select', index(idx))
      self
    end

show_tab(idx) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 122
    def show_tab(idx)
      @tabset.show_tab(idx)
      self
    end

tagid(tagOrId) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 41
    def tagid(tagOrId)
      if tagOrId.kind_of?(Tk::Itk::Component)
        tagOrId.name
      else
        #_get_eval_string(tagOrId)
        tagOrId
      end
    end

view(*index) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 156
    def view(*index)
      if index.size == 0
        idx = num_or_str(tk_send_without_enc('view'))
        if idx.kind_of?(Fixnum) && idx < 0
          nil
        else
          idx
        end
      else
        tk_send_without_enc('view', *index)
        self
      end
    end

Also aliased as: xview, yview
view_moveto(*index) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 172
    def view_moveto(*index)
      view('moveto', *index)
    end

Also aliased as: xview_moveto, yview_moveto
view_scroll(index, what='pages') click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 177
    def view_scroll(index, what='pages')
      view('scroll', index, what)
    end

Also aliased as: xview_scroll, yview_scroll
xscrollbar(bar=nil) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 134
    def xscrollbar(bar=nil)
      if bar
        @scrollbar = bar
        @scrollbar.orient 'horizontal'
        self.scrollcommand {|*arg| @scrollbar.set(*arg)}
        @scrollbar.command {|*arg| self.xview(*arg)}
        Tk.update  # avoid scrollbar trouble
      end
      @scrollbar
    end

xscrollcommand(cmd=Proc.new)
Alias for: scrollcommand
xview(*index)
Alias for: view
xview_moveto(*index)
Alias for: view_moveto
xview_scroll(index, what='pages')
Alias for: view_scroll
yscrollbar(bar=nil) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 144
    def yscrollbar(bar=nil)
      if bar
        @scrollbar = bar
        @scrollbar.orient 'vertical'
        self.scrollcommand {|*arg| @scrollbar.set(*arg)}
        @scrollbar.command {|*arg| self.yview(*arg)}
        Tk.update  # avoid scrollbar trouble
      end
      @scrollbar
    end

Also aliased as: scrollbar
yscrollcommand(cmd=Proc.new)
Alias for: scrollcommand
yview(*index)
Alias for: view
yview_moveto(*index)
Alias for: view_moveto
yview_scroll(index, what='pages')
Alias for: view_scroll

### Private Instance Methods

__boolval_optkeys() click to toggle source
Calls superclass method TkConfigMethod#__boolval_optkeys

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 62
    def __boolval_optkeys
      super() << 'auto' << 'equaltabs' << 'raiseselect' << 'tabborders'
    end

__item_cget_cmd(id) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 26
    def __item_cget_cmd(id)
      [self.path, 'pagecget', id]
    end

__item_config_cmd(id) click to toggle source

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 31
    def __item_config_cmd(id)
      [self.path, 'pageconfigure', id]
    end

__item_strval_optkeys(id) click to toggle source
Calls superclass method

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 36
    def __item_strval_optkeys(id)
      super(id) << 'tabbackground' << 'tabforeground'
    end

__strval_optkeys() click to toggle source
Calls superclass method TkConfigMethod#__strval_optkeys

    # File lib/tkextlib/iwidgets/tabnotebook.rb, line 67
    def __strval_optkeys
      super() << 'backdrop' << 'tabbackground' << 'tabforeground'
    end