~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to ext/tk/lib/tkextlib/bwidget/panelframe.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2006-05-08 22:23:12 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060508222312-w2wqeaz030ifi59j
Tags: 1.9.0+20060423-3ubuntu1
* Resynchronized with Debian.
* Only change from Debian is the addition of
  debian/patches/903_sparc_fix_define.patch to fix illegal instructions
  at runtime on sparc. (change from 1.9.0+20050921-1ubuntu1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
#  tkextlib/bwidget/panelframe.rb
 
3
#                               by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
 
4
#
 
5
 
 
6
require 'tk'
 
7
require 'tk/frame'
 
8
require 'tkextlib/bwidget.rb'
 
9
 
 
10
module Tk
 
11
  module BWidget
 
12
    class PanelFrame < TkWindow
 
13
    end
 
14
  end
 
15
end
 
16
 
 
17
class Tk::BWidget::PanelFrame
 
18
  TkCommandNames = ['PanelFrame'.freeze].freeze
 
19
  WidgetClassName = 'PanelFrame'.freeze
 
20
  WidgetClassNames[WidgetClassName] = self
 
21
 
 
22
  def __strval_optkeys
 
23
    super() + ['panelforeground', 'panelbackground']
 
24
  end
 
25
  private :__strval_optkeys
 
26
 
 
27
  def add(win, keys={})
 
28
    tk_send('add', win, keys)
 
29
    self
 
30
  end
 
31
 
 
32
  def delete(*wins)
 
33
    tk_send('delete', *wins)
 
34
    self
 
35
  end
 
36
 
 
37
  def get_frame(&b)
 
38
    win = window(tk_send_without_enc('getframe'))
 
39
    win.instance_eval(&b) if b
 
40
    win
 
41
  end
 
42
 
 
43
  def items
 
44
    list(tk_send('items'))
 
45
  end
 
46
 
 
47
  def remove(*wins)
 
48
    tk_send('remove', *wins)
 
49
    self
 
50
  end
 
51
end