OSDN Git Service

ruby-1.9.1-rc1
[splhack/AndroidRuby.git] / lib / ruby-1.9.1-rc1 / ext / tk / lib / tkextlib / bwidget / passwddlg.rb
1 #
2 #  tkextlib/bwidget/passwddlg.rb
3 #                               by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
4 #
5
6 require 'tk'
7 require 'tkextlib/bwidget.rb'
8 require 'tkextlib/bwidget/messagedlg'
9
10 module Tk
11   module BWidget
12     class PasswdDlg < Tk::BWidget::MessageDlg
13     end
14   end
15 end
16
17 class Tk::BWidget::PasswdDlg
18   TkCommandNames = ['PasswdDlg'.freeze].freeze
19   WidgetClassName = 'PasswdDlg'.freeze
20   WidgetClassNames[WidgetClassName] = self
21
22   def __strval_optkeys
23     super() << 'loginhelptext' << 'loginlabel' << 'logintext' << 
24       'passwdlabel' << 'passwdtext'
25   end
26   private :__strval_optkeys
27
28   def __boolval_optkeys
29     super() << 'passwdeditable' << 'homogeneous'
30   end
31   private :__boolval_optkeys
32
33   def __tkvariable_optkeys
34     super() << 'loginhelpvar' << 'logintextvariable' << 
35       'passwdhelpvar' << 'passwdtextvariable'
36   end
37   private :__tkvariable_optkeys
38
39   def create
40     login, passwd = simplelist(tk_call(self.class::TkCommandNames[0], 
41                                        @path, *hash_kv(@keys)))
42     [login, passwd]
43   end
44 end