~ubuntu-branches/ubuntu/hardy/ruby1.8/hardy-updates

« back to all changes in this revision

Viewing changes to ext/tk/lib/tkextlib/tile/tsquare.rb

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-03-13 22:11:58 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070313221158-h3oql37brlaf2go2
Tags: 1.8.6-1
* new upstream version, 1.8.6.
* libruby1.8 conflicts with libopenssl-ruby1.8 (< 1.8.6) (closes: #410018)
* changed packaging style to cdbs from dbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
#  tsquare widget
 
3
#                               by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
 
4
#
 
5
require 'tk'
 
6
require 'tkextlib/tile.rb'
 
7
 
 
8
module Tk
 
9
  module Tile
 
10
    class TSquare < TkWindow
 
11
    end
 
12
    Square = TSquare
 
13
  end
 
14
end
 
15
 
 
16
class Tk::Tile::TSquare < TkWindow
 
17
  include Tk::Tile::TileWidget
 
18
 
 
19
  if Tk::Tile::USE_TTK_NAMESPACE
 
20
    TkCommandNames = ['::ttk::square'.freeze].freeze
 
21
  else
 
22
    TkCommandNames = ['::tsquare'.freeze].freeze
 
23
  end
 
24
  WidgetClassName = 'TSquare'.freeze
 
25
  WidgetClassNames[WidgetClassName] = self
 
26
 
 
27
  def self.style(*args)
 
28
    [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
 
29
  end
 
30
end