1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
|
# This is the first screen of the Sun mailtool
# Frame .frame1 contains top-row buttons, label and entry
# Frame .frame2 contains bottom-row buttons
frame .frame1 -relief flat -bd 2
frame .frame1.frame11 -relief flat -bd 2
frame .frame1.frame12 -relief flat -bd 2
frame .frame2 -relief flat -bd 2
frame .frame2.frame21 -relief flat -bd 2
frame .frame2.frame22 -relief flat -bd 2
#frame .dummy -width 18c
pack .frame1 .frame2 -side top -fill x
pack .frame2.frame21 -side left -fill x
pack .frame2.frame22 -side left -fill x
pack .frame1.frame11 -side left -fill x
pack .frame1.frame12 -side left -fill x
# Scrolltext frame
frame .frame3 -relief sunken -bd 2
frame .frame3.frame
# File View Edit Compose buttons and associated menus
# Build File button
menubutton .frame1.frame11.file -text {File} -relief raised -width 8 \
-menu {.frame1.frame11.file.menu}
# Build File-menu
menu .frame1.frame11.file.menu
.frame1.frame11.file.menu add command \
-label {Load In-Box} \
-state {active}
.frame1.frame11.file.menu add command \
-label {Print}
.frame1.frame11.file.menu add command \
-label {Save Changes}
.frame1.frame11.file.menu add command \
-label {Done}
.frame1.frame11.file.menu add command \
-label {Mail Files...}
# Build View button
menubutton .frame1.frame11.view -text {View} -relief raised -width 8 \
-menu {.frame1.frame11.view.menu}
# Build View-menu
menu .frame1.frame11.view.menu
.frame1.frame11.view.menu add command \
-label {Messages}
.frame1.frame11.view.menu add command \
-label {Previous}
.frame1.frame11.view.menu add command \
-label {Next} \
-state {active}
.frame1.frame11.view.menu add command \
-label {Sort By}
.frame1.frame11.view.menu add command \
-label {Find...}
# Build Edit button
menubutton .frame1.frame11.edit -text {Edit} -relief raised -width 8 \
-menu {.frame1.frame11.edit.menu}
# Build Edit-menu
menu .frame1.frame11.edit.menu
.frame1.frame11.edit.menu add command \
-label {Cut}
.frame1.frame11.edit.menu add command \
-label {Copy}
.frame1.frame11.edit.menu add command \
-label {Delete}
.frame1.frame11.edit.menu add command \
-label {Undelete}
.frame1.frame11.edit.menu add separator
.frame1.frame11.edit.menu add command \
-label {Properties....}
# Build Compose button
menubutton .frame1.frame11.compose -text {Compose} -relief raised -width 12 \
-menu {.frame1.frame11.compose.menu}
# Build Compose-menu
menu .frame1.frame11.compose.menu
.frame1.frame11.compose.menu add command \
-label {New}
.frame1.frame11.compose.menu add command \
-label {Reply}
.frame1.frame11.compose.menu add command \
-label {Forward}
.frame1.frame11.compose.menu add separator
.frame1.frame11.compose.menu add command \
-label { Vacation}
# Pack the buttons File, View, Edit, Compose
pack .frame1.frame11.file \
.frame1.frame11.view \
.frame1.frame11.edit \
.frame1.frame11.compose \
-side left
update
# Build Done, Next, Delete, Reply buttons and associated menus
# Build Done button
menubutton .frame2.frame21.done -text {Done} -relief raised -width 8 \
-menu {.frame2.frame21.done.menu}
# Build Done-menu (empty)
menu .frame2.frame21.done.menu
# Build Next button
menubutton .frame2.frame21.next -text {Next} -relief raised -width 8 \
-menu {.frame2.frame21.next.menu}
# Build Next-menu (empty)
menu .frame2.frame21.next.menu
# Build Delete button
menubutton .frame2.frame21.delete -text {Delete} -relief raised -width 8 \
-menu {.frame2.frame21.delete.menu}
# Build Delete-menu (empty)
menu .frame2.frame21.delete.menu
# Build Reply button
menubutton .frame2.frame21.reply -text {Reply} -relief raised -width 12 \
-menu {.frame2.frame21.reply.menu}
# Build Reply-menu
menu .frame2.frame21.reply.menu
.frame2.frame21.reply.menu add command \
-label {To Sender}
.frame2.frame21.reply.menu add command \
-label {To All}
.frame2.frame21.reply.menu add command \
-label {To Sender, Include}
.frame2.frame21.reply.menu add command \
-label {To All, Include}
# Pack buttons Done, Next, Delete, Reply
pack .frame2.frame21.done \
.frame2.frame21.next \
.frame2.frame21.delete \
.frame2.frame21.reply \
-side left
update
# Build buttons Move, Copy, Load and associated menus
menubutton .frame2.frame22.move -text {Move} -relief raised -width 8 \
-menu {.frame2.frame22.move.menu}
menu .frame2.frame22.move.menu
.frame2.frame22.move.menu add command \
-label {Entry}
menubutton .frame2.frame22.copy -text {Copy} -relief raised -width 8 \
-menu {.frame2.frame22.copy.menu}
menu .frame2.frame22.copy.menu
.frame2.frame22.copy.menu add command \
-label {Entry}
menubutton .frame2.frame22.load -text {Load} -relief raised -width 8 \
-menu {.frame2.frame22.load.menu}
menu .frame2.frame22.load.menu
.frame2.frame22.load.menu add command \
-label {Entry}
pack .frame2.frame22.move \
.frame2.frame22.copy \
.frame2.frame22.load \
-side left -fill x
update
# Build Mail-File label and Dir-Path entry widgets
label .frame1.frame12.lab_mailfile -relief flat -text {Mail File: }
entry .frame1.frame12.entry_mailfile -width 30 -relief sunken -bd 2
pack .frame1.frame12.entry_mailfile -side right
pack .frame1.frame12.lab_mailfile -side left
update
# Build scrolltext w/ scrollbars
scrollbar .frame3.frame.scrollbar1 \
-command {.frame3.frame.listbox1 xview} \
-orient {horizontal} \
-relief {raised}
scrollbar .frame3.frame.scrollbar2 \
-command {.frame3.frame.listbox1 yview} \
-relief {raised}
text .frame3.frame.listbox1 \
-relief {raised} \
-xscrollcommand {.frame3.frame.scrollbar1 set} \
-yscrollcommand {.frame3.frame.scrollbar2 set}
.frame3.frame.listbox1 insert end {Some Text}
pack .frame3.frame
pack .frame3.frame.scrollbar2 -side left -fill y
pack .frame3.frame.listbox1 -side top -expand 1 -fill both
pack .frame3.frame.scrollbar1 -side bottom -fill x
# Pack frame3 to the rest of container frames
pack .frame3 .frame3.frame -side top -expand 1 -fill both
update
# Build label(???) at the bottom
label .lab_msgnum -relief flat
pack .lab_msgnum -side top -fill x
# Now make everything visible
update
# Enable keyboard traversal of a menu (Is this needed in inferno Tk?)
#tk_menuBar .frame1.frame11 .frame1.frame11.file .frame1.frame11.view \
#.frame1.frame11.edit .frame1.frame11.compose
#tk_menuBar .frame2.frame21 .frame2.frame21.done .frame2.frame21.next \
#.frame2.frame21.delete .frame2.frame21.reply \
#.frame2.frame22 .frame2.frame22.move .frame2.frame22.copy .frame2.frame22.load
focus .frame1.frame11
update
|