arcadia 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +126 -123
- data/arcadia.rb +770 -756
- data/base/a-contracts.rb +130 -93
- data/base/a-ext.rb +280 -280
- data/base/a-libs.rb +5 -11
- data/base/a-utils.rb +235 -44
- data/conf/arcadia.conf +20 -16
- data/conf/arcadia.init.rb +0 -0
- data/conf/arcadia.res.rb +74 -0
- data/ext/ae-complete-code/ae-complete-code.conf +0 -0
- data/ext/ae-complete-code/ae-complete-code.rb +80 -79
- data/ext/ae-debug/ae-debug.conf +0 -0
- data/ext/ae-debug/ae-debug.rb +2 -6
- data/ext/ae-debug/debug1.57.rb +0 -0
- data/ext/ae-doc-code/ae-doc-code.conf +15 -0
- data/ext/ae-doc-code/ae-doc-code.rb +289 -0
- data/ext/ae-editor/ae-editor.conf +17 -8
- data/ext/ae-editor/ae-editor.rb +738 -396
- data/ext/ae-event-log/ae-event-log.conf +0 -0
- data/ext/ae-event-log/ae-event-log.rb +0 -0
- data/ext/ae-file-history/ae-file-history.conf +2 -2
- data/ext/ae-file-history/ae-file-history.rb +286 -290
- data/ext/ae-inspector/ae-inspector.conf +0 -0
- data/ext/ae-inspector/ae-inspector.rb +0 -0
- data/ext/ae-output-event/ae-output-event.conf +2 -2
- data/ext/ae-output/ae-output.conf +2 -2
- data/ext/ae-output/ae-output.rb +173 -178
- data/ext/ae-palette/ae-palette.conf +0 -0
- data/ext/ae-palette/ae-palette.rb +0 -0
- data/ext/ae-shell/ae-shell.conf +0 -0
- data/ext/ae-shell/ae-shell.rb +54 -54
- data/lib/tk/al-tk.rb +3076 -3082
- data/lib/tk/al-tk.res.rb +0 -0
- data/lib/tk/al-tkarcadia.rb +0 -0
- data/lib/tk/al-tkcustom.rb +0 -0
- data/lib/tkext/al-bwidget.rb +0 -0
- data/lib/tkext/al-iwidgets.rb +0 -0
- data/lib/tkext/al-tile.rb +0 -0
- data/lib/tkext/al-tktable.rb +0 -0
- data/tcl/BWidget-1.8.0/BWman/ArrowButton.html +276 -0
- data/tcl/BWidget-1.8.0/BWman/BWidget.html +228 -0
- data/tcl/BWidget-1.8.0/BWman/Button.html +273 -0
- data/tcl/BWidget-1.8.0/BWman/ButtonBox.html +264 -0
- data/tcl/BWidget-1.8.0/BWman/ComboBox.html +402 -0
- data/tcl/BWidget-1.8.0/BWman/Dialog.html +314 -0
- data/tcl/BWidget-1.8.0/BWman/DragSite.html +139 -0
- data/tcl/BWidget-1.8.0/BWman/DropSite.html +254 -0
- data/tcl/BWidget-1.8.0/BWman/DynamicHelp.html +248 -0
- data/tcl/BWidget-1.8.0/BWman/Entry.html +341 -0
- data/tcl/BWidget-1.8.0/BWman/Label.html +331 -0
- data/tcl/BWidget-1.8.0/BWman/LabelEntry.html +194 -0
- data/tcl/BWidget-1.8.0/BWman/LabelFrame.html +144 -0
- data/tcl/BWidget-1.8.0/BWman/ListBox.html +678 -0
- data/tcl/BWidget-1.8.0/BWman/MainFrame.html +283 -0
- data/tcl/BWidget-1.8.0/BWman/MessageDlg.html +218 -0
- data/tcl/BWidget-1.8.0/BWman/NoteBook.html +374 -0
- data/tcl/BWidget-1.8.0/BWman/PagesManager.html +180 -0
- data/tcl/BWidget-1.8.0/BWman/PanedWindow.html +142 -0
- data/tcl/BWidget-1.8.0/BWman/PanelFrame.html +153 -0
- data/tcl/BWidget-1.8.0/BWman/PasswdDlg.html +214 -0
- data/tcl/BWidget-1.8.0/BWman/ProgressBar.html +152 -0
- data/tcl/BWidget-1.8.0/BWman/ProgressDlg.html +145 -0
- data/tcl/BWidget-1.8.0/BWman/ScrollView.html +130 -0
- data/tcl/BWidget-1.8.0/BWman/ScrollableFrame.html +191 -0
- data/tcl/BWidget-1.8.0/BWman/ScrolledWindow.html +116 -0
- data/tcl/BWidget-1.8.0/BWman/SelectColor.html +164 -0
- data/tcl/BWidget-1.8.0/BWman/SelectFont.html +152 -0
- data/tcl/BWidget-1.8.0/BWman/Separator.html +77 -0
- data/tcl/BWidget-1.8.0/BWman/SpinBox.html +250 -0
- data/tcl/BWidget-1.8.0/BWman/StatusBar.html +147 -0
- data/tcl/BWidget-1.8.0/BWman/TitleFrame.html +107 -0
- data/tcl/BWidget-1.8.0/BWman/Tree.html +947 -0
- data/tcl/BWidget-1.8.0/BWman/Widget.html +502 -0
- data/tcl/BWidget-1.8.0/BWman/contents.html +84 -0
- data/tcl/BWidget-1.8.0/BWman/index.html +7 -0
- data/tcl/BWidget-1.8.0/BWman/navtree.html +41 -0
- data/tcl/BWidget-1.8.0/BWman/options.htm +458 -0
- data/tcl/BWidget-1.8.0/CHANGES.txt +266 -0
- data/tcl/BWidget-1.8.0/ChangeLog +1641 -0
- data/tcl/BWidget-1.8.0/LICENSE.txt +41 -0
- data/tcl/BWidget-1.8.0/README.txt +127 -0
- data/tcl/BWidget-1.8.0/arrow.tcl +551 -0
- data/tcl/BWidget-1.8.0/bitmap.tcl +94 -0
- data/tcl/BWidget-1.8.0/button.tcl +324 -0
- data/tcl/BWidget-1.8.0/buttonbox.tcl +403 -0
- data/tcl/BWidget-1.8.0/color.tcl +493 -0
- data/tcl/BWidget-1.8.0/combobox.tcl +809 -0
- data/tcl/BWidget-1.8.0/demo/basic.tcl +199 -0
- data/tcl/BWidget-1.8.0/demo/bwidget.xbm +46 -0
- data/tcl/BWidget-1.8.0/demo/demo.tcl +212 -0
- data/tcl/BWidget-1.8.0/demo/dnd.tcl +42 -0
- data/tcl/BWidget-1.8.0/demo/manager.tcl +141 -0
- data/tcl/BWidget-1.8.0/demo/select.tcl +59 -0
- data/tcl/BWidget-1.8.0/demo/tmpldlg.tcl +214 -0
- data/tcl/BWidget-1.8.0/demo/tree.tcl +260 -0
- data/tcl/BWidget-1.8.0/demo/x1.xbm +2258 -0
- data/tcl/BWidget-1.8.0/dialog.tcl +345 -0
- data/tcl/BWidget-1.8.0/dragsite.tcl +197 -0
- data/tcl/BWidget-1.8.0/dropsite.tcl +455 -0
- data/tcl/BWidget-1.8.0/dynhelp.tcl +625 -0
- data/tcl/BWidget-1.8.0/entry.tcl +469 -0
- data/tcl/BWidget-1.8.0/font.tcl +566 -0
- data/tcl/BWidget-1.8.0/images/bold.gif +0 -0
- data/tcl/BWidget-1.8.0/images/copy.gif +0 -0
- data/tcl/BWidget-1.8.0/images/cut.gif +0 -0
- data/tcl/BWidget-1.8.0/images/dragfile.gif +0 -0
- data/tcl/BWidget-1.8.0/images/dragicon.gif +0 -0
- data/tcl/BWidget-1.8.0/images/error.gif +0 -0
- data/tcl/BWidget-1.8.0/images/file.gif +0 -0
- data/tcl/BWidget-1.8.0/images/folder.gif +0 -0
- data/tcl/BWidget-1.8.0/images/hourglass.gif +0 -0
- data/tcl/BWidget-1.8.0/images/info.gif +0 -0
- data/tcl/BWidget-1.8.0/images/italic.gif +0 -0
- data/tcl/BWidget-1.8.0/images/minus.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/new.gif +0 -0
- data/tcl/BWidget-1.8.0/images/opcopy.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/open.gif +0 -0
- data/tcl/BWidget-1.8.0/images/openfold.gif +0 -0
- data/tcl/BWidget-1.8.0/images/oplink.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/opmove.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/overstrike.gif +0 -0
- data/tcl/BWidget-1.8.0/images/palette.gif +0 -0
- data/tcl/BWidget-1.8.0/images/passwd.gif +0 -0
- data/tcl/BWidget-1.8.0/images/paste.gif +0 -0
- data/tcl/BWidget-1.8.0/images/plus.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/print.gif +0 -0
- data/tcl/BWidget-1.8.0/images/question.gif +0 -0
- data/tcl/BWidget-1.8.0/images/redo.gif +0 -0
- data/tcl/BWidget-1.8.0/images/save.gif +0 -0
- data/tcl/BWidget-1.8.0/images/target.xbm +9 -0
- data/tcl/BWidget-1.8.0/images/underline.gif +0 -0
- data/tcl/BWidget-1.8.0/images/undo.gif +0 -0
- data/tcl/BWidget-1.8.0/images/warning.gif +0 -0
- data/tcl/BWidget-1.8.0/init.tcl +40 -0
- data/tcl/BWidget-1.8.0/label.tcl +271 -0
- data/tcl/BWidget-1.8.0/labelentry.tcl +100 -0
- data/tcl/BWidget-1.8.0/labelframe.tcl +160 -0
- data/tcl/BWidget-1.8.0/lang/da.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/de.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/en.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/es.rc +53 -0
- data/tcl/BWidget-1.8.0/lang/fr.rc +52 -0
- data/tcl/BWidget-1.8.0/listbox.tcl +1638 -0
- data/tcl/BWidget-1.8.0/mainframe.tcl +711 -0
- data/tcl/BWidget-1.8.0/messagedlg.tcl +128 -0
- data/tcl/BWidget-1.8.0/notebook.tcl +1164 -0
- data/tcl/BWidget-1.8.0/pagesmgr.tcl +294 -0
- data/tcl/BWidget-1.8.0/panedw.tcl +381 -0
- data/tcl/BWidget-1.8.0/panelframe.tcl +246 -0
- data/tcl/BWidget-1.8.0/passwddlg.tcl +178 -0
- data/tcl/BWidget-1.8.0/pkgIndex.tcl +47 -0
- data/tcl/BWidget-1.8.0/progressbar.tcl +208 -0
- data/tcl/BWidget-1.8.0/progressdlg.tcl +87 -0
- data/tcl/BWidget-1.8.0/scrollframe.tcl +226 -0
- data/tcl/BWidget-1.8.0/scrollview.tcl +254 -0
- data/tcl/BWidget-1.8.0/scrollw.tcl +280 -0
- data/tcl/BWidget-1.8.0/separator.tcl +75 -0
- data/tcl/BWidget-1.8.0/spinbox.tcl +331 -0
- data/tcl/BWidget-1.8.0/statusbar.tcl +422 -0
- data/tcl/BWidget-1.8.0/tests/entry.test +173 -0
- data/tcl/BWidget-1.8.0/titleframe.tcl +170 -0
- data/tcl/BWidget-1.8.0/tree.tcl +2228 -0
- data/tcl/BWidget-1.8.0/utils.tcl +645 -0
- data/tcl/BWidget-1.8.0/widget.tcl +1576 -0
- data/tcl/BWidget-1.8.0/wizard.tcl +1028 -0
- data/tcl/BWidget-1.8.0/xpm2image.tcl +115 -0
- metadata +141 -5
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
|
|
2
|
+
namespace eval DemoBasic {
|
|
3
|
+
variable var
|
|
4
|
+
variable count 0
|
|
5
|
+
variable id ""
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
proc DemoBasic::create { nb } {
|
|
10
|
+
set frame [$nb insert end demoBasic -text "Basic"]
|
|
11
|
+
|
|
12
|
+
set topf [frame $frame.topf]
|
|
13
|
+
set titf1 [TitleFrame $topf.titf1 -text "Label"]
|
|
14
|
+
set titf2 [TitleFrame $topf.titf2 -text "Entry"]
|
|
15
|
+
set titf3 [TitleFrame $frame.titf3 -text "Button and ArrowButton"]
|
|
16
|
+
|
|
17
|
+
_label [$titf1 getframe]
|
|
18
|
+
_entry [$titf2 getframe]
|
|
19
|
+
_button [$titf3 getframe]
|
|
20
|
+
|
|
21
|
+
pack $titf1 $titf2 -side left -fill both -padx 4 -expand yes
|
|
22
|
+
pack $topf -pady 2 -fill x
|
|
23
|
+
pack $titf3 -pady 2 -padx 4 -fill x
|
|
24
|
+
|
|
25
|
+
return $frame
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
proc DemoBasic::_label { parent } {
|
|
30
|
+
variable var
|
|
31
|
+
|
|
32
|
+
set lab [Label $parent.label -text "This is a Label widget" \
|
|
33
|
+
-helptext "Label widget"]
|
|
34
|
+
set chk [checkbutton $parent.chk -text "Disabled" \
|
|
35
|
+
-variable DemoBasic::var($lab,-state) \
|
|
36
|
+
-onvalue disabled -offvalue normal \
|
|
37
|
+
-command "$lab configure -state \$DemoBasic::var($lab,-state)"]
|
|
38
|
+
pack $lab -anchor w -pady 4
|
|
39
|
+
pack $chk -anchor w
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
proc DemoBasic::_entry { parent } {
|
|
44
|
+
set ent [Entry $parent.entry -text "Press enter" \
|
|
45
|
+
-command {set DemoBasic::var(entcmd) "-command called" ; after 500 {set DemoBasic::var(entcmd) ""}} \
|
|
46
|
+
-helptext "Entry widget"]
|
|
47
|
+
set chk1 [checkbutton $parent.chk1 -text "Disabled" \
|
|
48
|
+
-variable DemoBasic::var($ent,state) \
|
|
49
|
+
-onvalue disabled -offvalue normal \
|
|
50
|
+
-command "$ent configure -state \$DemoBasic::var($ent,state)"]
|
|
51
|
+
set chk2 [checkbutton $parent.chk2 -text "Non editable" \
|
|
52
|
+
-variable DemoBasic::var($ent,editable) \
|
|
53
|
+
-onvalue false -offvalue true \
|
|
54
|
+
-command "$ent configure -editable \$DemoBasic::var($ent,editable)"]
|
|
55
|
+
set lab [label $parent.cmd -textvariable DemoBasic::var(entcmd) -foreground red]
|
|
56
|
+
pack $ent -pady 4 -anchor w
|
|
57
|
+
pack $chk1 $chk2 -anchor w
|
|
58
|
+
pack $lab -pady 4
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
proc DemoBasic::_button { parent } {
|
|
63
|
+
variable var
|
|
64
|
+
|
|
65
|
+
set frame [frame $parent.butfr]
|
|
66
|
+
set but [Button $frame.but -text "Press me!" \
|
|
67
|
+
-repeatdelay 300 \
|
|
68
|
+
-command "DemoBasic::_butcmd command" \
|
|
69
|
+
-helptext "This is a Button widget"]
|
|
70
|
+
set sep1 [Separator $frame.sep1 -orient vertical]
|
|
71
|
+
set arr1 [ArrowButton $frame.arr1 -type button \
|
|
72
|
+
-width 25 -height 25 \
|
|
73
|
+
-repeatdelay 300 \
|
|
74
|
+
-command "DemoBasic::_butcmd command" \
|
|
75
|
+
-helptext "This is an ArrowButton widget\nof type button"]
|
|
76
|
+
set sep2 [Separator $frame.sep2 -orient vertical]
|
|
77
|
+
set arr2 [ArrowButton $frame.arr2 -type arrow \
|
|
78
|
+
-width 25 -height 25 -relief sunken -ipadx 0 -ipady 0 \
|
|
79
|
+
-repeatdelay 300 \
|
|
80
|
+
-command "DemoBasic::_butcmd command" \
|
|
81
|
+
-helptext "This is an ArrowButton widget\nof type arrow"]
|
|
82
|
+
|
|
83
|
+
pack $but -side left -padx 4
|
|
84
|
+
pack $sep1 -side left -padx 4 -fill y
|
|
85
|
+
pack $arr1 -side left -padx 4
|
|
86
|
+
pack $sep2 -side left -padx 4 -fill y
|
|
87
|
+
pack $arr2 -side left -padx 4
|
|
88
|
+
pack $frame
|
|
89
|
+
|
|
90
|
+
set sep3 [Separator $parent.sep3 -orient horizontal]
|
|
91
|
+
pack $sep3 -fill x -pady 10
|
|
92
|
+
|
|
93
|
+
set labf1 [LabelFrame $parent.labf1 -text "Command" -side top \
|
|
94
|
+
-anchor w -relief sunken -borderwidth 1]
|
|
95
|
+
set subf [$labf1 getframe]
|
|
96
|
+
set chk1 [checkbutton $subf.chk1 -text "Disabled" \
|
|
97
|
+
-variable DemoBasic::var(bstate) -onvalue disabled -offvalue normal \
|
|
98
|
+
-command "DemoBasic::_bstate \$DemoBasic::var(bstate) $but $arr1 $arr2"]
|
|
99
|
+
set chk2 [checkbutton $subf.chk2 -text "Use -armcommand/\n-disarmcommand" \
|
|
100
|
+
-justify left \
|
|
101
|
+
-variable DemoBasic::var(barmcmd) \
|
|
102
|
+
-command "DemoBasic::_barmcmd \$DemoBasic::var(barmcmd) $but $arr1 $arr2"]
|
|
103
|
+
pack $chk1 $chk2 -anchor w
|
|
104
|
+
|
|
105
|
+
set label [label $parent.label -textvariable DemoBasic::var(butcmd) -foreground red]
|
|
106
|
+
pack $label -side bottom -pady 4
|
|
107
|
+
|
|
108
|
+
set labf2 [LabelFrame $parent.labf2 -text "Direction" -side top \
|
|
109
|
+
-anchor w -relief sunken -borderwidth 1]
|
|
110
|
+
set subf [$labf2 getframe]
|
|
111
|
+
set var(bside) top
|
|
112
|
+
foreach dir {top left bottom right} {
|
|
113
|
+
set rad [radiobutton $subf.$dir -text "$dir arrow" \
|
|
114
|
+
-variable DemoBasic::var(bside) -value $dir \
|
|
115
|
+
-command "DemoBasic::_bside \$DemoBasic::var(bside) $arr1 $arr2"]
|
|
116
|
+
pack $rad -anchor w
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
set labf3 [LabelFrame $parent.labf3 -text "Relief" -side top \
|
|
120
|
+
-anchor w -relief sunken -borderwidth 1]
|
|
121
|
+
set subf [$labf3 getframe]
|
|
122
|
+
set var(brelief) raised
|
|
123
|
+
foreach {f lrelief} {f1 {raised sunken ridge groove} f2 {flat solid link}} {
|
|
124
|
+
set f [frame $subf.$f]
|
|
125
|
+
foreach relief $lrelief {
|
|
126
|
+
set rad [radiobutton $f.$relief -text $relief \
|
|
127
|
+
-variable DemoBasic::var(brelief) -value $relief \
|
|
128
|
+
-command "DemoBasic::_brelief \$DemoBasic::var(brelief) $but $arr1 $arr2"]
|
|
129
|
+
pack $rad -anchor w
|
|
130
|
+
}
|
|
131
|
+
pack $f -side left -padx 2 -anchor n
|
|
132
|
+
}
|
|
133
|
+
pack $labf1 $labf2 $labf3 -side left -fill y -padx 4
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
proc DemoBasic::_bstate { state but arr1 arr2 } {
|
|
138
|
+
foreach but [list $but $arr1 $arr2] {
|
|
139
|
+
$but configure -state $state
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
proc DemoBasic::_brelief { relief but arr1 arr2 } {
|
|
145
|
+
$but configure -relief $relief
|
|
146
|
+
if { $relief != "link" } {
|
|
147
|
+
foreach arr [list $arr1 $arr2] {
|
|
148
|
+
$arr configure -relief $relief
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
proc DemoBasic::_bside { side args } {
|
|
155
|
+
foreach arr $args {
|
|
156
|
+
$arr configure -dir $side
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
proc DemoBasic::_barmcmd { value but arr1 arr2 } {
|
|
162
|
+
if { $value } {
|
|
163
|
+
$but configure \
|
|
164
|
+
-armcommand "DemoBasic::_butcmd arm" \
|
|
165
|
+
-disarmcommand "DemoBasic::_butcmd disarm" \
|
|
166
|
+
-command {}
|
|
167
|
+
foreach arr [list $arr1 $arr2] {
|
|
168
|
+
$arr configure \
|
|
169
|
+
-armcommand "DemoBasic::_butcmd arm" \
|
|
170
|
+
-disarmcommand "DemoBasic::_butcmd disarm" \
|
|
171
|
+
-command {}
|
|
172
|
+
}
|
|
173
|
+
} else {
|
|
174
|
+
$but configure -armcommand {} -disarmcommand {} \
|
|
175
|
+
-command "DemoBasic::_butcmd command"
|
|
176
|
+
foreach arr [list $arr1 $arr2] {
|
|
177
|
+
$arr configure -armcommand {} -disarmcommand {} \
|
|
178
|
+
-command "DemoBasic::_butcmd command"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
proc DemoBasic::_butcmd { reason } {
|
|
185
|
+
variable count
|
|
186
|
+
variable id
|
|
187
|
+
|
|
188
|
+
catch {after cancel $id}
|
|
189
|
+
if { $reason == "arm" } {
|
|
190
|
+
incr count
|
|
191
|
+
set DemoBasic::var(butcmd) "$reason command called ($count)"
|
|
192
|
+
} else {
|
|
193
|
+
set count 0
|
|
194
|
+
set DemoBasic::var(butcmd) "$reason command called"
|
|
195
|
+
}
|
|
196
|
+
set id [after 500 {set DemoBasic::var(butcmd) ""}]
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#define bwidget_width 76
|
|
2
|
+
#define bwidget_height 64
|
|
3
|
+
static char bwidget_bits[] = {
|
|
4
|
+
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,
|
|
5
|
+
0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
|
|
6
|
+
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,
|
|
7
|
+
0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
|
|
8
|
+
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,
|
|
9
|
+
0x00,0x00,0x00,0x00,0xf0,0x00,0xb6,0x6d,0xdb,0x16,0x00,0x00,0x00,0x00,0xf0,
|
|
10
|
+
0x00,0xdb,0xb6,0x6d,0xab,0x00,0x00,0x00,0x00,0xf0,0x00,0x55,0x55,0x55,0x75,
|
|
11
|
+
0x01,0x00,0x00,0x00,0xf0,0x00,0x6d,0xdb,0xb6,0xad,0x02,0x00,0x00,0x00,0xf0,
|
|
12
|
+
0x00,0xb6,0x6d,0xdb,0xb6,0x05,0x00,0x00,0x00,0xf0,0x00,0x55,0x55,0x55,0x55,
|
|
13
|
+
0x05,0x00,0x00,0x00,0xf0,0x00,0xda,0xb6,0xad,0x6d,0x0b,0x00,0x00,0x00,0xf0,
|
|
14
|
+
0x00,0x6b,0x03,0xc0,0xb6,0x05,0x00,0x00,0x00,0xf0,0x00,0x56,0x05,0x00,0x55,
|
|
15
|
+
0x0d,0x00,0x00,0x00,0xf0,0x00,0xbb,0x05,0x80,0xdb,0x06,0x00,0x00,0x00,0xf0,
|
|
16
|
+
0x00,0xca,0x06,0x00,0x6c,0x0b,0x00,0x00,0x00,0xf0,0x00,0xb6,0x02,0x00,0xaa,
|
|
17
|
+
0x0a,0x00,0x00,0x00,0xf0,0x00,0xab,0x05,0x00,0x6c,0x0b,0x00,0x00,0x00,0xf0,
|
|
18
|
+
0x00,0xdd,0x06,0x00,0xb6,0x05,0x00,0x00,0x00,0xf0,0x00,0xaa,0x02,0x00,0x55,
|
|
19
|
+
0x05,0x00,0x00,0x00,0xf0,0x00,0xb7,0x05,0xc0,0xda,0x02,0x00,0x00,0x00,0xf0,
|
|
20
|
+
0x00,0xd9,0x06,0x50,0x6b,0x01,0x00,0x00,0x00,0xf0,0x00,0x56,0xb5,0xad,0xad,
|
|
21
|
+
0x00,0x00,0x00,0x00,0xf0,0x00,0xdb,0xd6,0x76,0x15,0x00,0x00,0x00,0x00,0xf0,
|
|
22
|
+
0x00,0x6a,0xab,0xaa,0x2d,0x00,0x00,0x00,0x00,0xf0,0x00,0x56,0x75,0xad,0xb6,
|
|
23
|
+
0x02,0x00,0x00,0x00,0xf0,0x00,0xbb,0xad,0xd6,0xaa,0x05,0x00,0x00,0x00,0xf0,
|
|
24
|
+
0x00,0xca,0xb6,0x6b,0xdb,0x2a,0x00,0x00,0x00,0xf0,0x00,0x77,0xd5,0x5c,0x6d,
|
|
25
|
+
0x2d,0x00,0x00,0x00,0xf0,0x00,0x99,0x05,0x00,0xaa,0x56,0x00,0x00,0x00,0xf0,
|
|
26
|
+
0x00,0xee,0x06,0x00,0x6c,0xbb,0x00,0x00,0x00,0xf0,0x00,0xaa,0x02,0x00,0xb0,
|
|
27
|
+
0x55,0x00,0x00,0x00,0xf0,0x00,0x55,0x05,0x00,0xa8,0xd6,0x00,0x00,0x00,0xf0,
|
|
28
|
+
0x00,0xee,0x06,0x00,0xd0,0x6a,0x00,0x00,0x00,0xf0,0x00,0x55,0x03,0x00,0x68,
|
|
29
|
+
0xb7,0xfc,0x00,0x7e,0xf0,0x00,0x6d,0x05,0x00,0xa8,0xaa,0xfc,0x80,0x7e,0xf0,
|
|
30
|
+
0x00,0xb6,0x05,0x00,0x50,0xbb,0xfe,0x01,0x7e,0xf0,0x00,0x55,0x05,0x00,0x78,
|
|
31
|
+
0xad,0xfe,0x81,0x1f,0xf0,0x00,0xb6,0x05,0x00,0xa4,0xb5,0xfe,0x81,0x1f,0xf0,
|
|
32
|
+
0x00,0x5b,0x05,0x80,0xba,0x56,0xfe,0x83,0x1f,0xf0,0x00,0xaa,0x6b,0x5b,0xd5,
|
|
33
|
+
0x5a,0xff,0x85,0x1f,0xf0,0x00,0xdb,0x5a,0xad,0x57,0x2b,0xff,0xc7,0x0f,0xf0,
|
|
34
|
+
0x00,0x6d,0xad,0xd5,0x6a,0x0d,0xff,0xc7,0x0f,0xf0,0x00,0xaa,0xd6,0xb6,0xba,
|
|
35
|
+
0x05,0xdf,0xc7,0x0f,0xf0,0x00,0xb7,0xb5,0x5a,0xab,0x8a,0xdf,0xcf,0x0f,0xf0,
|
|
36
|
+
0x00,0xd9,0x5a,0xab,0x6d,0x8f,0xcf,0xef,0x07,0xf0,0x00,0x56,0xad,0x75,0xb5,
|
|
37
|
+
0xaf,0x8f,0xef,0x07,0xf0,0x00,0xb5,0xeb,0x5a,0x00,0x9f,0xcf,0xef,0x07,0xf0,
|
|
38
|
+
0x00,0x00,0x00,0x00,0x00,0xff,0x8f,0xff,0x07,0xf0,0x00,0x00,0x00,0x00,0x00,
|
|
39
|
+
0xfe,0x87,0xff,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0xff,0x03,0xff,0x03,0xf0,
|
|
40
|
+
0x00,0x00,0x00,0x00,0x00,0xfe,0x03,0xff,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,
|
|
41
|
+
0xfe,0x03,0xff,0x01,0xf0,0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0xff,0x03,0xf0,
|
|
42
|
+
0x00,0x00,0x00,0x00,0x00,0xfe,0x01,0xfe,0x01,0xf0,0x00,0x00,0x00,0x00,0x00,
|
|
43
|
+
0xfc,0x01,0xfe,0x01,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
|
|
44
|
+
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,
|
|
45
|
+
0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
|
|
46
|
+
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# The next line is executed by /bin/sh, but not tcl \
|
|
3
|
+
exec wish "$0" ${1+"$@"}
|
|
4
|
+
|
|
5
|
+
namespace eval Demo {
|
|
6
|
+
variable _wfont
|
|
7
|
+
|
|
8
|
+
variable notebook
|
|
9
|
+
variable mainframe
|
|
10
|
+
variable status
|
|
11
|
+
variable prgtext
|
|
12
|
+
variable prgindic
|
|
13
|
+
variable font
|
|
14
|
+
variable font_name
|
|
15
|
+
variable toolbar1 1
|
|
16
|
+
variable toolbar2 1
|
|
17
|
+
|
|
18
|
+
set pwd [pwd]
|
|
19
|
+
cd [file dirname [info script]]
|
|
20
|
+
variable DEMODIR [pwd]
|
|
21
|
+
cd $pwd
|
|
22
|
+
|
|
23
|
+
foreach script {
|
|
24
|
+
manager.tcl basic.tcl select.tcl dnd.tcl tree.tcl tmpldlg.tcl
|
|
25
|
+
} {
|
|
26
|
+
namespace inscope :: source $DEMODIR/$script
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
proc Demo::create { } {
|
|
32
|
+
global tk_patchLevel
|
|
33
|
+
variable _wfont
|
|
34
|
+
variable notebook
|
|
35
|
+
variable mainframe
|
|
36
|
+
variable font
|
|
37
|
+
variable prgtext
|
|
38
|
+
variable prgindic
|
|
39
|
+
|
|
40
|
+
set prgtext "Please wait while loading font..."
|
|
41
|
+
set prgindic -1
|
|
42
|
+
_create_intro
|
|
43
|
+
update
|
|
44
|
+
SelectFont::loadfont
|
|
45
|
+
|
|
46
|
+
bind all <F12> { catch {console show} }
|
|
47
|
+
|
|
48
|
+
# Menu description
|
|
49
|
+
set descmenu {
|
|
50
|
+
"&File" all file 0 {
|
|
51
|
+
{command "E&xit" {} "Exit BWidget demo" {} -command exit}
|
|
52
|
+
}
|
|
53
|
+
"&Options" all options 0 {
|
|
54
|
+
{checkbutton "Toolbar &1" {all option} "Show/hide toolbar 1" {}
|
|
55
|
+
-variable Demo::toolbar1
|
|
56
|
+
-command {$Demo::mainframe showtoolbar 0 $Demo::toolbar1}
|
|
57
|
+
}
|
|
58
|
+
{checkbutton "Toolbar &2" {all option} "Show/hide toolbar 2" {}
|
|
59
|
+
-variable Demo::toolbar2
|
|
60
|
+
-command {$Demo::mainframe showtoolbar 1 $Demo::toolbar2}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
set prgtext "Creating MainFrame..."
|
|
66
|
+
set prgindic 0
|
|
67
|
+
set mainframe [MainFrame .mainframe \
|
|
68
|
+
-menu $descmenu \
|
|
69
|
+
-textvariable Demo::status \
|
|
70
|
+
-progressvar Demo::prgindic]
|
|
71
|
+
|
|
72
|
+
# toolbar 1 creation
|
|
73
|
+
incr prgindic
|
|
74
|
+
set tb1 [$mainframe addtoolbar]
|
|
75
|
+
set bbox [ButtonBox $tb1.bbox1 -spacing 0 -padx 1 -pady 1]
|
|
76
|
+
$bbox add -image [Bitmap::get new] \
|
|
77
|
+
-highlightthickness 0 -takefocus 0 -relief link -borderwidth 1 -padx 1 -pady 1 \
|
|
78
|
+
-helptext "Create a new file"
|
|
79
|
+
$bbox add -image [Bitmap::get open] \
|
|
80
|
+
-highlightthickness 0 -takefocus 0 -relief link -borderwidth 1 -padx 1 -pady 1 \
|
|
81
|
+
-helptext "Open an existing file"
|
|
82
|
+
$bbox add -image [Bitmap::get save] \
|
|
83
|
+
-highlightthickness 0 -takefocus 0 -relief link -borderwidth 1 -padx 1 -pady 1 \
|
|
84
|
+
-helptext "Save file"
|
|
85
|
+
pack $bbox -side left -anchor w
|
|
86
|
+
|
|
87
|
+
set sep [Separator $tb1.sep -orient vertical]
|
|
88
|
+
pack $sep -side left -fill y -padx 4 -anchor w
|
|
89
|
+
|
|
90
|
+
incr prgindic
|
|
91
|
+
set bbox [ButtonBox $tb1.bbox2 -spacing 0 -padx 1 -pady 1]
|
|
92
|
+
$bbox add -image [Bitmap::get cut] \
|
|
93
|
+
-highlightthickness 0 -takefocus 0 -relief link -borderwidth 1 -padx 1 -pady 1 \
|
|
94
|
+
-helptext "Cut selection"
|
|
95
|
+
$bbox add -image [Bitmap::get copy] \
|
|
96
|
+
-highlightthickness 0 -takefocus 0 -relief link -borderwidth 1 -padx 1 -pady 1 \
|
|
97
|
+
-helptext "Copy selection"
|
|
98
|
+
$bbox add -image [Bitmap::get paste] \
|
|
99
|
+
-highlightthickness 0 -takefocus 0 -relief link -borderwidth 1 -padx 1 -pady 1 \
|
|
100
|
+
-helptext "Paste selection"
|
|
101
|
+
pack $bbox -side left -anchor w
|
|
102
|
+
|
|
103
|
+
# toolbar 2 creation
|
|
104
|
+
incr prgindic
|
|
105
|
+
set tb2 [$mainframe addtoolbar]
|
|
106
|
+
set _wfont [SelectFont $tb2.font -type toolbar \
|
|
107
|
+
-command "Demo::update_font \[$tb2.font cget -font\]"]
|
|
108
|
+
set font [$_wfont cget -font]
|
|
109
|
+
pack $_wfont -side left -anchor w
|
|
110
|
+
|
|
111
|
+
$mainframe addindicator -text "BWidget [package version BWidget]"
|
|
112
|
+
$mainframe addindicator -textvariable tk_patchLevel
|
|
113
|
+
|
|
114
|
+
# NoteBook creation
|
|
115
|
+
set frame [$mainframe getframe]
|
|
116
|
+
set notebook [NoteBook $frame.nb]
|
|
117
|
+
|
|
118
|
+
set prgtext "Creating Manager..."
|
|
119
|
+
incr prgindic
|
|
120
|
+
set f0 [DemoManager::create $notebook]
|
|
121
|
+
set prgtext "Creating Basic..."
|
|
122
|
+
incr prgindic
|
|
123
|
+
set f1 [DemoBasic::create $notebook]
|
|
124
|
+
set prgtext "Creating Select..."
|
|
125
|
+
incr prgindic
|
|
126
|
+
set f2 [DemoSelect::create $notebook]
|
|
127
|
+
set prgtext "Creating Dialog..."
|
|
128
|
+
incr prgindic
|
|
129
|
+
set f3b [DemoDlg::create $notebook]
|
|
130
|
+
set prgtext "Creating Drag and Drop..."
|
|
131
|
+
incr prgindic
|
|
132
|
+
set f4 [DemoDnd::create $notebook]
|
|
133
|
+
set prgtext "Creating Tree..."
|
|
134
|
+
incr prgindic
|
|
135
|
+
set f5 [DemoTree::create $notebook]
|
|
136
|
+
|
|
137
|
+
set prgtext "Done"
|
|
138
|
+
incr prgindic
|
|
139
|
+
$notebook compute_size
|
|
140
|
+
pack $notebook -fill both -expand yes -padx 4 -pady 4
|
|
141
|
+
$notebook raise [$notebook page 0]
|
|
142
|
+
|
|
143
|
+
pack $mainframe -fill both -expand yes
|
|
144
|
+
update idletasks
|
|
145
|
+
destroy .intro
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
proc Demo::update_font { newfont } {
|
|
150
|
+
variable _wfont
|
|
151
|
+
variable notebook
|
|
152
|
+
variable font
|
|
153
|
+
variable font_name
|
|
154
|
+
|
|
155
|
+
. configure -cursor watch
|
|
156
|
+
if { $font != $newfont } {
|
|
157
|
+
$_wfont configure -font $newfont
|
|
158
|
+
$notebook configure -font $newfont
|
|
159
|
+
set font $newfont
|
|
160
|
+
}
|
|
161
|
+
. configure -cursor ""
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
proc Demo::_create_intro { } {
|
|
166
|
+
variable DEMODIR
|
|
167
|
+
|
|
168
|
+
set top [toplevel .intro -relief raised -borderwidth 2]
|
|
169
|
+
|
|
170
|
+
wm withdraw $top
|
|
171
|
+
wm overrideredirect $top 1
|
|
172
|
+
|
|
173
|
+
set ximg [label $top.x -bitmap @$DEMODIR/x1.xbm \
|
|
174
|
+
-foreground grey90 -background white]
|
|
175
|
+
set bwimg [label $ximg.bw -bitmap @$DEMODIR/bwidget.xbm \
|
|
176
|
+
-foreground grey90 -background white]
|
|
177
|
+
set frame [frame $ximg.f -background white]
|
|
178
|
+
set lab1 [label $frame.lab1 -text "Loading demo" \
|
|
179
|
+
-background white -font {times 8}]
|
|
180
|
+
set lab2 [label $frame.lab2 -textvariable Demo::prgtext \
|
|
181
|
+
-background white -font {times 8} -width 35]
|
|
182
|
+
set prg [ProgressBar $frame.prg -width 50 -height 10 -background white \
|
|
183
|
+
-variable Demo::prgindic -maximum 10]
|
|
184
|
+
pack $lab1 $lab2 $prg
|
|
185
|
+
place $frame -x 0 -y 0 -anchor nw
|
|
186
|
+
place $bwimg -relx 1 -rely 1 -anchor se
|
|
187
|
+
pack $ximg
|
|
188
|
+
BWidget::place $top 0 0 center
|
|
189
|
+
wm deiconify $top
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
proc Demo::main {} {
|
|
194
|
+
variable DEMODIR
|
|
195
|
+
|
|
196
|
+
lappend ::auto_path [file dirname $DEMODIR]
|
|
197
|
+
namespace inscope :: package require BWidget
|
|
198
|
+
|
|
199
|
+
option add *TitleFrame.l.font {helvetica 11 bold italic}
|
|
200
|
+
|
|
201
|
+
wm withdraw .
|
|
202
|
+
wm title . "BWidget demo"
|
|
203
|
+
|
|
204
|
+
Demo::create
|
|
205
|
+
BWidget::place . 0 0 center
|
|
206
|
+
wm deiconify .
|
|
207
|
+
raise .
|
|
208
|
+
focus -force .
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
Demo::main
|
|
212
|
+
wm geom . [wm geom .]
|