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

« back to all changes in this revision

Viewing changes to ext/tk/lib/tkextlib/iwidgets/spintime.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
#  tkextlib/iwidgets/spintime.rb
 
3
#                               by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
 
4
#
 
5
 
 
6
require 'tk'
 
7
require 'tkextlib/iwidgets.rb'
 
8
 
 
9
module Tk
 
10
  module Iwidgets
 
11
    class Spintime < Tk::Itk::Widget
 
12
    end
 
13
  end
 
14
end
 
15
 
 
16
class Tk::Iwidgets::Spintime
 
17
  TkCommandNames = ['::iwidgets::spintime'.freeze].freeze
 
18
  WidgetClassName = 'Spintime'.freeze
 
19
  WidgetClassNames[WidgetClassName] = self
 
20
 
 
21
  def __boolval_optkeys
 
22
    super() << 'houron' << 'militaryon' << 'minutelabel' << 'secondlabel'
 
23
  end
 
24
  private :__boolval_optkeys
 
25
 
 
26
  def __strval_optkeys
 
27
    super() << 'hourlabel' << 'minuteon' << 'secondon'
 
28
  end
 
29
  private :__strval_optkeys
 
30
 
 
31
  def get_string
 
32
    tk_call(@path, 'get', '-string')
 
33
  end
 
34
  alias get get_string
 
35
 
 
36
  def get_clicks
 
37
    number(tk_call(@path, 'get', '-clicks'))
 
38
  end
 
39
 
 
40
  def show(date=None)
 
41
    tk_call(@path, 'show', date)
 
42
    self
 
43
  end
 
44
  def show_now
 
45
    tk_call(@path, 'show', 'now')
 
46
    self
 
47
  end
 
48
end