class Tk::BWidget::MainFrame

Constants

TkCommandNames
WidgetClassName

Public Instance Methods

add_indicator(keys={}, &b) click to toggle source
# File lib/tkextlib/bwidget/mainframe.rb, line 42
def add_indicator(keys={}, &b)
  win = window(tk_send('addindicator', *hash_kv(keys)))
  if b
    if TkCore::WITH_RUBY_VM  ### Ruby 1.9 !!!!
      win.instance_exec(self, &b)
    else
      win.instance_eval(&b)
    end
  end
  win
end
add_toolbar(&b) click to toggle source
# File lib/tkextlib/bwidget/mainframe.rb, line 54
def add_toolbar(&b)
  win = window(tk_send('addtoolbar'))
  if b
    if TkCore::WITH_RUBY_VM  ### Ruby 1.9 !!!!
      win.instance_exec(self, &b)
    else
      win.instance_eval(&b)
    end
  end
  win
end
get_frame(&b) click to toggle source
# File lib/tkextlib/bwidget/mainframe.rb, line 66
def get_frame(&b)
  win = window(tk_send('getframe'))
  if b
    if TkCore::WITH_RUBY_VM  ### Ruby 1.9 !!!!
      win.instance_exec(self, &b)
    else
      win.instance_eval(&b)
    end
  end
  win
end
get_indicator(idx, &b) click to toggle source
# File lib/tkextlib/bwidget/mainframe.rb, line 78
def get_indicator(idx, &b)
  win = window(tk_send('getindicator', idx))
  if b
    if TkCore::WITH_RUBY_VM  ### Ruby 1.9 !!!!
      win.instance_exec(self, &b)
    else
      win.instance_eval(&b)
    end
  end
  win
end
get_menu(menu_id, &b) click to toggle source
# File lib/tkextlib/bwidget/mainframe.rb, line 90
def get_menu(menu_id, &b)
  win = window(tk_send('getmenu', menu_id))
  if b
    if TkCore::WITH_RUBY_VM  ### Ruby 1.9 !!!!
      win.instance_exec(self, &b)
    else
      win.instance_eval(&b)
    end
  end
  win
end
get_menustate(tag) click to toggle source
# File lib/tkextlib/bwidget/mainframe.rb, line 114
def get_menustate(tag)
  tk_send('getmenustate', tag) # return state name string
end
get_toolbar(idx, &b) click to toggle source
# File lib/tkextlib/bwidget/mainframe.rb, line 102
def get_toolbar(idx, &b)
  win = window(tk_send('gettoolbar', idx))
  if b
    if TkCore::WITH_RUBY_VM  ### Ruby 1.9 !!!!
      win.instance_exec(self, &b)
    else
      win.instance_eval(&b)
    end
  end
  win
end
set_menustate(tag, state) click to toggle source
# File lib/tkextlib/bwidget/mainframe.rb, line 118
def set_menustate(tag, state)
  tk_send('setmenustate', tag, state)
  self
end
show_statusbar(name) click to toggle source
# File lib/tkextlib/bwidget/mainframe.rb, line 123
def show_statusbar(name)
  tk_send('showstatusbar', name)
  self
end
show_toolbar(idx, mode) click to toggle source
# File lib/tkextlib/bwidget/mainframe.rb, line 128
def show_toolbar(idx, mode)
  tk_send('showtoolbar', idx, mode)
  self
end

Private Instance Methods

__strval_optkeys() click to toggle source
Calls superclass method TkConfigMethod#__strval_optkeys
# File lib/tkextlib/bwidget/mainframe.rb, line 23
def __strval_optkeys
  super() << 'progressfg'
end
__tkvariable_optkeys() click to toggle source
Calls superclass method TkConfigMethod#__tkvariable_optkeys
# File lib/tkextlib/bwidget/mainframe.rb, line 28
def __tkvariable_optkeys
  super() << 'progressvar'
end
__val2ruby_optkeys() click to toggle source
# File lib/tkextlib/bwidget/mainframe.rb, line 33
def __val2ruby_optkeys  # { key=>proc, ... }
  # The method is used to convert a opt-value to a ruby's object.
  # When get the value of the option "key", "proc.call(value)" is called.
  {
    'menu'=>proc{|v| simplelist(v).collect!{|elem| simplelist(v)}}
  }
end