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

« back to all changes in this revision

Viewing changes to ext/tk/sample/demos-jp/dialog2.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
# a dialog box with a global grab (called by 'widget')
 
3
#
 
4
class TkDialog_Demo2 < TkDialog
 
5
  ###############
 
6
  private
 
7
  ###############
 
8
  def title
 
9
    "Dialog with global grab"
 
10
  end
 
11
 
 
12
  def message
 
13
    '���Υ����������ܥå����ϥ������Х륰��֤���Ѥ��Ƥ��ޤ������Υܥ����¹Ԥ���ޤǡ��ǥ����ץ쥤��Τ����ʤ��ΤȤ����äǤ��ޤ��󡣥������Х륰��֤���Ѥ��뤳�Ȥϡ��ޤ��ɤ��ͤ��ǤϤ���ޤ��󡣤ɤ����Ƥ�ɬ�פˤʤ�ޤǻȤ����Ȼפ�ʤ��Dz�������'
 
14
  end
 
15
 
 
16
  def bitmap
 
17
    'info'
 
18
  end
 
19
 
 
20
  def default_button
 
21
    0
 
22
  end
 
23
 
 
24
  def buttons
 
25
#    "λ�� ����󥻥� �����ɻ���"
 
26
    ["λ��", "����󥻥�", "�����ɻ���"]
 
27
  end
 
28
end
 
29
 
 
30
ret =  TkDialog_Demo2.new('message_config'=>{'wraplength'=>'4i'},
 
31
                          'prev_command'=>proc{|dialog|
 
32
                            Tk.after 100, proc{dialog.grab('global')}
 
33
                          }).value
 
34
case ret
 
35
when 0
 
36
  print "���ʤ��ϡ�λ��פ򲡤��ޤ����͡�\n"
 
37
when 1
 
38
  print "���ʤ��ϡ֥���󥻥�פ򲡤��ޤ����͡�\n"
 
39
when 2
 
40
  showCode 'dialog2'
 
41
end
 
42