2
# text (basic facilities) widget demo (called by 'widget')
5
# toplevel widget ��¸�ߤ���к������
6
if defined?($text_demo) && $text_demo
11
# demo �Ѥ� toplevel widget ������
12
$text_demo = TkToplevel.new {|w|
13
title("Text Demonstration - Basic Facilities")
19
if ((Tk::TK_VERSION.split('.').collect{|n| n.to_i} <=> [8,4]) < 0)
26
TkFrame.new($text_demo) {|frame|
35
}.pack('side'=>'left', 'expand'=>'yes')
39
command proc{showCode 'text'}
40
}.pack('side'=>'left', 'expand'=>'yes')
41
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
44
TkText.new($text_demo){|t|
50
TkScrollbar.new($text_demo) {|s|
51
pack('side'=>'right', 'fill'=>'y')
52
command proc{|*args| t.yview(*args)}
53
t.yscrollcommand proc{|first,last| s.set first,last}
55
pack('expand'=>'yes', 'fill'=>'both')
59
���Υ�����ɥ��ϥƥ����� widget �Ǥ���1�Ԥޤ��Ϥ���ʾ�Υƥ����Ȥ�ɽ
60
�����Խ����뤳�Ȥ��Ǥ��ޤ����ʲ��ϥƥ����� widget �ǤǤ������ˤĤ���
63
1. ���������롣����������С��ǥƥ����Ȥ�ɽ����ʬ��ư�������Ȥ��Ǥ��ޤ���
65
2. ������˥��ƥ����ȤΥ�����ɥ��ǥޥ����ܥ���2 (��ܥ����) ��
66
���ƾ岼�˥ɥ�å����Ƥ�����������������ȥƥ����Ȥ���®�ǥɥ�å����졢
67
���Ƥä�į��뤳�Ȥ��Ǥ��ޤ���
69
3. �ƥ����Ȥ��������ޥ����ܥ���1 (���ܥ���) �����������������
70
�Ȥ��Ƥ���ƥ����Ȥ����Ϥ��Ƥ������������Ϥ�����Τ� widget ������ޤ���
72
4. �������ϰϤ�ʸ��������ˤϥޥ����ܥ���1 �����ɥ�å���
73
�Ƥ������������٥ܥ����Υ�����顢���եȥ������ʤ���ܥ���1 ��
74
���Ȥ������ϰϤ�Ĵ�����Ǥ��ޤ�������������ϰϤκǸ��ޥ������������
75
�Ǥ�ᤤ���֤˥ꥻ�åȤ����ܥ����Υ�����˥ޥ�����ɥ�å����뤳�ȤǤ�
76
��������ϰϤ�Ĵ���Ǥ��ޤ������֥륯��å��ǥ�ɤޤ��ȥ�ץ륯���
77
���ǹ����Τ����뤳�Ȥ��Ǥ��ޤ���
79
5. �õ���ִ����ƥ����Ȥ�õ��ˤϡ��õ����ʸ�������ƥХå�
80
���ڡ������ǥ�ȥ��������Ϥ��Ƥ������������뤤�ϡ��������ƥ����Ȥ�
81
���Ϥ�������줿�ƥ����Ȥ��ִ�����ޤ���
83
6. ������ʬ�Υ��ԡ���������ʬ�Υ�����ɥ�����Τɤ����˥��ԡ�����
84
�ˤϡ��ޤ����ԡ��������������(�����ǡ����뤤���̤Υ��ץꥱ��������)
85
�����ܥ��� 2 ��å����ơ�������������ΰ��֤˥��ԡ����Ƥ���������
87
7. �Խ����ƥ����� widget �� Emacs �Υ����Х���ɤ˲ä���ɸ��Ū�ʤ� Motif
88
���Խ���ǽ�ݡ��Ȥ��Ƥ��ޤ����Хå����ڡ����ȥ���ȥ�����-H ������
89
��������κ�¦��ʸ���������ޤ����ǥ�ȥ����ȥ���ȥ�����-D ������
90
��������α�¦��ʸ���������ޤ���Meta-�Хå����ڡ������������������
91
��¦��ñ���������Meta-D ��������������κ�¦��ñ��������ޤ���
92
����ȥ�����-K �������������뤫������ޤǤ����������ΰ��֤˲���
93
�����ʤ��ä����ϡ����Ԥ������ޤ���#{
95
undo_text = "Control-z �ϺǸ�˹Ԥä��ѹ��μ��ä�(undo)��Ԥ���"
96
case $tk_platform['platform']
97
when "unix", "macintosh"
98
undo_text << "Control-Shift-z"
100
undo_text << "Control-y"
102
undo_text << "��undo�����ѹ��κ�Ŭ��(redo)��Ԥ��ޤ���"
109
8. ������ɥ��Υꥵ���������� widget �� "setGrid" ���ץ�����ˤ�
110
�Ƥ���ޤ��Τǡ�������ɥ���ꥵ����������ˤϹ⤵�����Ͼ��ʸ�����ʸ
111
�����������ܤˤʤ�ޤ����ޤ���������ɥ����������ˤ�Ĺ���Ԥ���ư
112
Ū���ޤ��֤��졢������Ƥ����Ƥ�������褦�ˤʤäƤ��ޤ���