arcadia 0.12.2 → 0.13.0

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.
Files changed (57) hide show
  1. data/README +25 -14
  2. data/conf/LC/en-UK.LANG +3 -1
  3. data/conf/arcadia.conf +10 -0
  4. data/conf/arcadia.res.rb +29 -1
  5. data/ext/ae-editor/ae-editor.rb +239 -48
  6. data/ext/ae-file-history/ae-file-history.conf +11 -1
  7. data/ext/ae-file-history/ae-file-history.rb +120 -2
  8. data/ext/ae-ruby-debug/ae-ruby-debug.rb +6 -5
  9. data/ext/ae-subprocess-inspector/ae-subprocess-inspector.rb +7 -3
  10. data/ext/ae-term/ae-term.rb +1 -1
  11. data/lib/a-commons.rb +72 -56
  12. data/lib/a-contracts.rb +23 -1
  13. data/lib/a-core.rb +136 -41
  14. data/lib/a-tkcommons.rb +127 -36
  15. data/tcl/fsdialog/fsdialog.tcl +2 -2
  16. data/tcl/ptwidgets-1.1.0/COPYRIGHT +10 -0
  17. data/tcl/ptwidgets-1.1.0/ChangeLog +194 -0
  18. data/tcl/ptwidgets-1.1.0/README +50 -0
  19. data/tcl/ptwidgets-1.1.0/common/stacktrace.tcl +29 -0
  20. data/tcl/ptwidgets-1.1.0/common/tokenframe.tcl +200 -0
  21. data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_off.png +0 -0
  22. data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_on.png +0 -0
  23. data/tcl/ptwidgets-1.1.0/doc/img/tokenentry.png +0 -0
  24. data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example.png +0 -0
  25. data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example2.png +0 -0
  26. data/tcl/ptwidgets-1.1.0/doc/img/wmarkentry.png +0 -0
  27. data/tcl/ptwidgets-1.1.0/doc/toggleswitch.html +402 -0
  28. data/tcl/ptwidgets-1.1.0/doc/tokenentry.html +1366 -0
  29. data/tcl/ptwidgets-1.1.0/doc/tokensearch.html +1549 -0
  30. data/tcl/ptwidgets-1.1.0/doc/wmarkentry.html +634 -0
  31. data/tcl/ptwidgets-1.1.0/library/toggleswitch.tcl +432 -0
  32. data/tcl/ptwidgets-1.1.0/library/tokenentry.tcl +2208 -0
  33. data/tcl/ptwidgets-1.1.0/library/tokensearch.tcl +2488 -0
  34. data/tcl/ptwidgets-1.1.0/library/wmarkentry.tcl +630 -0
  35. data/tcl/ptwidgets-1.1.0/pkgIndex.tcl +10 -0
  36. data/tcl/ptwidgets-1.1.0/test/Makefile +3 -0
  37. data/tcl/ptwidgets-1.1.0/test/run.tcl +3 -0
  38. data/tcl/ptwidgets-1.1.0/test/test.tcl +89 -0
  39. data/tcl/ptwidgets-1.1.0/test/toggleswitch.test +562 -0
  40. data/tcl/ptwidgets-1.1.0/test/tokenentry.test +1023 -0
  41. data/tcl/ptwidgets-1.1.0/test/tokensearch.test +1023 -0
  42. data/tcl/ptwidgets-1.1.0/test/wmarkentry.test +1325 -0
  43. data/tcl/themes/altTheme.tcl +101 -0
  44. data/tcl/themes/aquaTheme.tcl +59 -0
  45. data/tcl/themes/clamTheme.tcl +140 -0
  46. data/tcl/themes/classicTheme.tcl +108 -0
  47. data/tcl/themes/pkgIndex.tcl +3 -0
  48. data/tcl/themes/ttk.tcl +176 -0
  49. data/tcl/themes/vistaTheme.tcl +224 -0
  50. data/tcl/themes/winTheme.tcl +80 -0
  51. data/tcl/themes/xpTheme.tcl +65 -0
  52. data/tcl/tkfbox/folder.gif +0 -0
  53. data/tcl/tkfbox/textfile.gif +0 -0
  54. data/tcl/tkfbox/tkfbox.tcl +1 -0
  55. data/tcl/tkfbox/tkfbox.tcl~ +1 -0
  56. data/tcl/tkfbox/updir.xbm +1 -0
  57. metadata +43 -2
@@ -203,7 +203,7 @@ proc ::ttk::dialog::file::Create {win class} {
203
203
  destroy $f3.dummy
204
204
  $f3 add [ttk::frame $f3.dir] -weight 0
205
205
  ttk::label $f3.dir.bg -relief sunken
206
- set data(dirArea) [text $f3.dir.t -bg white -width 20 -height 16 \
206
+ set data(dirArea) [text $f3.dir.t -bg yellow -width 20 -height 16 \
207
207
  -font $font -bd 0 -highlightthickness 0 -cursor "" \
208
208
  -wrap none -spacing1 1 -spacing3 1 -exportselection 0 \
209
209
  -state disabled -yscrollcommand [list $f3.dir.y set] \
@@ -1780,4 +1780,4 @@ bind DirDialog <4> {%W yview scroll -5 units}
1780
1780
  bind DirDialog <5> {%W yview scroll 5 units}
1781
1781
  bind DirDialog <ButtonPress-1> {::ttk::dialog::file::TreeSelect %W @%x,%y}
1782
1782
  bind DirDialog <ButtonRelease-1> {::ttk::dialog::file::TreeRelease1 %W}
1783
- bind DirDialog <B1-Motion> {::ttk::dialog::file::TreeMotion1 %W}
1783
+ bind DirDialog <B1-Motion> {::ttk::dialog::file::TreeMotion1 %W}
@@ -0,0 +1,10 @@
1
+ Package ptwidgets
2
+ Copyright (c) 2011-2012 Trevor Williams (E-mail: phase1geo@gmail.com)
3
+
4
+ This library is free software; you can use, modify, and redistribute it
5
+ for any purpose, provided that existing copyright notices are retained
6
+ in all copies and that this notice is included verbatim in any
7
+ distributions.
8
+
9
+ This software is distributed WITHOUT ANY WARRANTY; without even the
10
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -0,0 +1,194 @@
1
+ changeset: 68:c273b90309a8
2
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
3
+ date: Sun Jan 01 22:47:18 2012 -0600
4
+ summary: * Adding copyright information to all *.tcl source files.
5
+
6
+ changeset: 69:a94559621e97
7
+ parent: 68:c273b90309a8
8
+ parent: 66:4414402ca575
9
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
10
+ date: Sun Jan 01 22:48:48 2012 -0600
11
+ summary: * Adding copyright information to all *.tcl source files.
12
+
13
+ changeset: 70:6a755743e1e2
14
+ user: Trevor Williams <phase1geo@gmail.com>
15
+ date: Mon Jan 02 12:46:34 2012 -0600
16
+ summary: * Fixing issues with category options.
17
+
18
+ changeset: 71:88e9a773d2c2
19
+ parent: 69:a94559621e97
20
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
21
+ date: Mon Jan 02 00:39:18 2012 -0600
22
+ summary: * Working on adding empty text box "watermark" string (still needs work).
23
+
24
+ changeset: 72:ec1c20a0db35
25
+ parent: 71:88e9a773d2c2
26
+ parent: 70:6a755743e1e2
27
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
28
+ date: Mon Jan 02 20:38:22 2012 -0600
29
+ summary: Merge
30
+
31
+ changeset: 73:51cafc9dd7ee
32
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
33
+ date: Mon Jan 02 22:05:02 2012 -0600
34
+ summary: * Re-adding code for watermark display.
35
+
36
+ changeset: 74:904353d3e3d3
37
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
38
+ date: Thu Jan 12 11:25:16 2012 -0600
39
+ summary: * Fixing issue with editing a token with a category value containing spaces.
40
+
41
+ changeset: 75:71b27fe2fd0a
42
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
43
+ date: Wed Feb 08 00:12:05 2012 -0600
44
+ summary: * Fixing issues with watermark feature.
45
+
46
+ changeset: 76:22ee4cd30cac
47
+ user: Trevor Williams <phase1geo@gmail.com>
48
+ date: Wed Feb 08 17:39:38 2012 -0600
49
+ summary: * Switching emptystring and emptyfg options for watermark and watermarkfg in tokenentry.
50
+
51
+ changeset: 77:e90c20bd414e
52
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
53
+ date: Wed Feb 08 21:20:40 2012 -0600
54
+ summary: * Adding watermark feature to tokensearch.
55
+
56
+ changeset: 78:87035b91fd79
57
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
58
+ date: Thu Feb 09 00:14:59 2012 -0600
59
+ summary: * Adding initial version of wmarkentry widget (entry widget with an optional watermark).
60
+
61
+ changeset: 79:a7b3a9a032b3
62
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
63
+ date: Thu Feb 09 08:26:43 2012 -0600
64
+ summary: * Fixing issues with configuring the entry widget.
65
+
66
+ changeset: 80:cd1fb704010a
67
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
68
+ date: Fri Feb 10 23:07:03 2012 -0600
69
+ summary: * Adding insert, delete and get commands
70
+
71
+ changeset: 81:a912249e4330
72
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
73
+ date: Sat Feb 11 00:22:58 2012 -0600
74
+ summary: * Overriding the selection command so that selections are handled correctly when the entry is in the empty state.
75
+
76
+ changeset: 82:7119792ee509
77
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
78
+ date: Tue Feb 14 01:36:38 2012 -0600
79
+ summary: * More documentation updates.
80
+
81
+ changeset: 83:fcf57f8c1376
82
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
83
+ date: Tue Feb 14 08:17:14 2012 -0600
84
+ summary: * Handling some missing key bindings.
85
+
86
+ changeset: 84:b8bedfd48cb2
87
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
88
+ date: Fri Feb 17 01:32:12 2012 -0600
89
+ summary: * Fixing wmarkentry issues.
90
+
91
+ changeset: 85:97877b71ace7
92
+ parent: 79:a7b3a9a032b3
93
+ user: Trevor Williams <phase1geo@gmail.com>
94
+ date: Thu Feb 09 09:59:40 2012 -0600
95
+ summary: * Updating README file.
96
+
97
+ changeset: 86:70852211bb5c
98
+ parent: 85:97877b71ace7
99
+ parent: 83:fcf57f8c1376
100
+ user: Trevor Williams <phase1geo@gmail.com>
101
+ date: Tue Feb 14 15:39:10 2012 -0600
102
+ summary: * Merging files.
103
+
104
+ changeset: 87:f0664a759235
105
+ parent: 84:b8bedfd48cb2
106
+ parent: 86:70852211bb5c
107
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
108
+ date: Fri Feb 17 01:32:57 2012 -0600
109
+ summary: Merging
110
+
111
+ changeset: 88:39e74c7e428a
112
+ user: Trevor Williams <phase1geo@gmail.com>
113
+ date: Fri Feb 17 17:22:45 2012 -0600
114
+ summary: * Adding more test cases to the wmarkentry.test file
115
+
116
+ changeset: 89:b8db81c4ae4c
117
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
118
+ date: Fri Apr 06 22:18:07 2012 -0500
119
+ summary: * Fixing watermark entry tests on Mac OS X.
120
+
121
+ changeset: 90:47623fc3d456
122
+ parent: 88:39e74c7e428a
123
+ user: Trevor Williams <phase1geo@gmail.com>
124
+ date: Mon Apr 02 11:47:44 2012 -0500
125
+ summary: * Removing creation of dummy foobar.bmp file (this was used for testing purposes only).
126
+
127
+ changeset: 91:61258e56d513
128
+ parent: 89:b8db81c4ae4c
129
+ parent: 90:47623fc3d456
130
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
131
+ date: Fri Apr 06 22:20:15 2012 -0500
132
+ summary: Merge
133
+
134
+ changeset: 92:ee9aa018974e
135
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
136
+ date: Sun Apr 15 00:04:26 2012 -0500
137
+ summary: * Adding initial version of tokenentry test file (does not completely pass at this point).
138
+
139
+ changeset: 93:16281320f0dd
140
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
141
+ date: Mon May 28 21:34:54 2012 -0500
142
+ summary: * Fixing test failure.
143
+
144
+ changeset: 94:19f722f02cb3
145
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
146
+ date: Mon Jun 11 00:53:00 2012 -0500
147
+ summary: * Updating tokenentry to support watermark.
148
+
149
+ changeset: 95:704698846ab3
150
+ user: Trevor Williams <phase1geo@gmail.com>
151
+ date: Mon Aug 06 00:33:32 2012 -0500
152
+ summary: * Adding tokensearch test file
153
+
154
+ changeset: 96:8fd7a90f888e
155
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
156
+ date: Tue Aug 07 00:29:46 2012 -0500
157
+ summary: * Fixing usability issues on both tokenentry and tokensearch widgets.
158
+
159
+ changeset: 97:77f0daeceb8f
160
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
161
+ date: Tue Aug 07 00:34:02 2012 -0500
162
+ summary: * Fixing issing in tokenentry widget.
163
+
164
+ changeset: 98:29777b228844
165
+ user: Trevor Williams <phase1geo@gmail.com>
166
+ date: Sat Aug 11 02:05:30 2012 -0500
167
+ summary: * Starting work on the onoffswitch widget.
168
+
169
+ changeset: 99:667ddc9137ba
170
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
171
+ date: Sat Aug 11 09:04:49 2012 -0500
172
+ summary: * Move libraries to new directory structure.
173
+
174
+ changeset: 100:f3b5f2be0c87
175
+ user: Trevor Williams <phase1geo@gmail.com>
176
+ date: Fri Aug 17 17:20:59 2012 -0500
177
+ summary: * Fixing issue with creating a tokenentry, tokensearch or wmarkentry without specifying configuration arguments.
178
+
179
+ changeset: 101:84fb5f66e7ba
180
+ user: Trevor Williams <phase1geo@gmail.com>
181
+ date: Fri Aug 17 17:22:09 2012 -0500
182
+ summary: * Updating README to include the new toggleswitch widget.
183
+
184
+ changeset: 102:d5afbae9e0ae
185
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
186
+ date: Sun Aug 19 23:05:48 2012 -0500
187
+ summary: * Fixing issues with tokenentry, tokensearch, and wmarkentry modificied event when a watermark is specified.
188
+
189
+ changeset: 103:5d8e07057267
190
+ tag: tip
191
+ user: Trevor Williams <phase1geo@users.sourceforge.net>
192
+ date: Sun Aug 19 23:38:21 2012 -0500
193
+ summary: * Adding images for the toggleswitch and wmarkentry widgets.
194
+
@@ -0,0 +1,50 @@
1
+ DESCRIPTION
2
+ ===========
3
+
4
+ This package contains several pure Tcl/Tk mega-widgets and their documentation:
5
+
6
+ - tokenentry
7
+ - tokensearch
8
+ - wmarkentry
9
+ - toggleswitch
10
+
11
+
12
+ INSTALLATION
13
+ ============
14
+
15
+ You may install this package by copying the entire ptwidgets directory to the
16
+ directory which contains your tk library. Or you may copy the entire ptwidgets
17
+ directory to another directory location and then get access from within your
18
+ application by including the following code segment (let's assume that you
19
+ copy the ptwidgets directory to /usr/local/lib for our example).
20
+
21
+ ------------------------------------------------------------
22
+ lappend auto_path [file join / usr local lib ptwidgets]
23
+
24
+ package require tokenentry
25
+ package require tokensearch
26
+ package require wmarkentry
27
+ package require toggleswitch
28
+
29
+ ...
30
+ ------------------------------------------------------------
31
+
32
+
33
+ DOCUMENTATION
34
+ =============
35
+
36
+ The full widget documentation can be found in the docs directory in HTML format.
37
+
38
+
39
+ AUTHORS
40
+ =======
41
+
42
+ Trevor Williams (phase1geo@gmail.com)
43
+
44
+
45
+ HOMEPAGE
46
+ ========
47
+
48
+ http://ptwidgets.sourceforge.net
49
+
50
+
@@ -0,0 +1,29 @@
1
+ ##########################################################################
2
+ # Useful process for debugging.
3
+ proc stacktrace {} {
4
+
5
+ set stack "Stack trace:\n"
6
+ for {set i 1} {$i < [info level]} {incr i} {
7
+ set lvl [info level -$i]
8
+ set pname [lindex $lvl 0]
9
+ if {[namespace which -command $pname] eq ""} {
10
+ for {set j [expr $i + 1]} {$j < [info level]} {incr j} {
11
+ if {[namespace which -command [lindex [info level -$j] 0]] ne ""} {
12
+ set pname "[namespace qualifiers [lindex [info level -$j] 0]]::$pname"
13
+ break
14
+ }
15
+ }
16
+ }
17
+ append stack [string repeat " " $i]$pname
18
+ foreach value [lrange $lvl 1 end] arg [info args $pname] {
19
+ if {$value eq ""} {
20
+ info default $pname $arg value
21
+ }
22
+ append stack " $arg='$value'"
23
+ }
24
+ append stack \n
25
+ }
26
+
27
+ return $stack
28
+
29
+ }
@@ -0,0 +1,200 @@
1
+ #===============================================================
2
+ # Common tokenframe module.
3
+ #
4
+ # This module is used by both the tokenentry and tokensearch widgets.
5
+ # It is responsible for creating the various token frame images used
6
+ # to construct the graphical portions of the token.
7
+ #
8
+ # Copyright (c) 2011-2012 Trevor Williams (phase1geo@gmail.com)
9
+ #===============================================================
10
+
11
+ namespace eval tokenframe {
12
+
13
+ ##########################################################################
14
+ # Creates the left side of the token frame as a bitmap string.
15
+ proc create_left {shape height} {
16
+
17
+ set bitmap "#define left_width 8\n#define left_height $height\nstatic char left_bits\[\] = \{\n"
18
+
19
+ switch $shape {
20
+ pill { append bitmap "0xc0, 0xf0, 0x38, 0x0c, 0x06, 0x06, 0x03, 0x03, " }
21
+ tag { append bitmap "0xe0, 0xf0, 0x18, 0x0c, 0x06, 0x03, 0x03, 0x03, " }
22
+ square { append bitmap "0xff, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, " }
23
+ eased { append bitmap "0xfe, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, " }
24
+ ticket { append bitmap "0xf0, 0xf0, 0x18, 0x0c, 0x07, 0x03, 0x03, 0x03, " }
25
+ }
26
+
27
+ for {set i 0} {$i < [expr $height - 16]} {incr i} {
28
+ append bitmap "0x03, "
29
+ }
30
+
31
+ switch $shape {
32
+ pill { append bitmap "0x03, 0x03, 0x06, 0x06, 0x0c, 0x38, 0xf0, 0xc0\};" }
33
+ tag { append bitmap "0x03, 0x03, 0x03, 0x06, 0x0c, 0x18, 0xf0, 0xe0\};" }
34
+ square { append bitmap "0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xff, 0xff\};" }
35
+ eased { append bitmap "0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xff, 0xfe\};" }
36
+ ticket { append bitmap "0x03, 0x03, 0x03, 0x07, 0x0c, 0x18, 0xf0, 0xf0\};" }
37
+ }
38
+
39
+ return $bitmap
40
+
41
+ }
42
+
43
+ ##########################################################################
44
+ # Creates the left side mask of the token frame as a bitmap string.
45
+ proc create_left_mask {shape height} {
46
+
47
+ set bitmap "#define left_mask_width 8\n#define left_mask_height $height\nstatic char left_mask_bits\[\] = \{\n"
48
+
49
+ switch $shape {
50
+ pill { append bitmap "0xff, 0xff, 0x3f, 0x0f, 0x07, 0x07, 0x03, 0x03, " }
51
+ tag { append bitmap "0xff, 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x03, 0x03, " }
52
+ square { append bitmap "0xff, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, " }
53
+ eased { append bitmap "0xff, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, " }
54
+ ticket { append bitmap "0xff, 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x03, 0x03, " }
55
+ }
56
+
57
+ for {set i 0} {$i < [expr $height - 16]} {incr i} {
58
+ append bitmap "0x03, "
59
+ }
60
+
61
+ switch $shape {
62
+ pill { append bitmap "0x03, 0x03, 0x07, 0x07, 0x0f, 0x3f, 0xff, 0xff\};" }
63
+ tag { append bitmap "0x03, 0x03, 0x03, 0x07, 0x0f, 0x1f, 0xff, 0xff\};" }
64
+ square { append bitmap "0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xff, 0xff\};" }
65
+ eased { append bitmap "0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xff, 0xff\};" }
66
+ ticket { append bitmap "0x03, 0x03, 0x03, 0x07, 0x0f, 0x1f, 0xff, 0xff\};" }
67
+ }
68
+
69
+ return $bitmap
70
+
71
+ }
72
+
73
+ ##########################################################################
74
+ # Creates the middle of the token frame as a bitmap string.
75
+ proc create_middle {width height} {
76
+
77
+ set bitmap "#define middle_width $width\n#define middle_height $height\nstatic char middle_bits\[\] = {\n"
78
+ set values [list "0x00" "0x01" "0x03" "0x07" "0x0f" "0x1f" "0x3f" "0x7f" "0xff"]
79
+
80
+ for {set row 0} {$row < $height} {incr row} {
81
+ if {($row < 2) || ($row > [expr $height - 3])} {
82
+ set i 0
83
+ while {$i < [expr $width - 8]} {
84
+ append bitmap "0xff, "
85
+ incr i 8
86
+ }
87
+ append bitmap "[lindex $values [expr $width - $i]], "
88
+ } else {
89
+ for {set i 0} {$i < $width} {incr i 8} {
90
+ append bitmap "0x00, "
91
+ }
92
+ }
93
+ }
94
+
95
+ set bitmap "[string range $bitmap 0 end-2]};"
96
+
97
+ return $bitmap
98
+
99
+ }
100
+
101
+ ##########################################################################
102
+ # Creates an image which contains an arrow along with a upper and lower
103
+ # border.
104
+ proc create_arrow {height} {
105
+
106
+ set bitmap "#define arrow_width 7\n#define arrow_height $height\nstatic char arrow_bits\[\] = {\n0x7f, 0x7f, "
107
+
108
+ for {set i 0} {$i < [expr $height - 10]} {incr i} {
109
+ if {$i == [expr ($height - 10) / 2]} {
110
+ append bitmap "0x3e, 0x22, 0x14, 0x14, 0x08, 0x08, "
111
+ }
112
+ append bitmap "0x00, "
113
+ }
114
+
115
+ append bitmap "0x7f, 0x7f};"
116
+
117
+ return $bitmap
118
+
119
+ }
120
+
121
+ ##########################################################################
122
+ # Creates a mask image for the arrow image.
123
+ proc create_arrow_mask {height} {
124
+
125
+ set bitmap "#define arrow_width 7\n#define arrow_height $height\nstatic char arrow_bits\[\] = {\n0x7f, 0x7f, "
126
+
127
+ for {set i 0} {$i < [expr $height - 10]} {incr i} {
128
+ if {$i == [expr ($height - 10) / 2]} {
129
+ append bitmap "0x3e, 0x3e, 0x1c, 0x1c, 0x08, 0x08, "
130
+ }
131
+ append bitmap "0x00, "
132
+ }
133
+
134
+ append bitmap "0x7f, 0x7f};"
135
+
136
+ return $bitmap
137
+
138
+ }
139
+
140
+ ##########################################################################
141
+ # Creates the right side of the token frame as a bitmap string.
142
+ proc create_right {shape height} {
143
+
144
+ set bitmap "#define right_width 8\n#define right_height $height\nstatic char right_bits\[\] = \{\n"
145
+
146
+ switch $shape {
147
+ pill { append bitmap "0x03, 0x0f, 0x1c, 0x30, 0x60, 0x60, 0xc0, 0xc0, " }
148
+ tag { append bitmap "0x07, 0x0f, 0x18, 0x30, 0x60, 0xc0, 0xc0, 0xc0, " }
149
+ square { append bitmap "0xff, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, " }
150
+ eased { append bitmap "0x7f, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, " }
151
+ ticket { append bitmap "0x0f, 0x0f, 0x18, 0x30, 0xe0, 0xc0, 0xc0, 0xc0, " }
152
+ }
153
+
154
+ for {set i 0} {$i < [expr $height - 16]} {incr i} {
155
+ append bitmap "0xc0, "
156
+ }
157
+
158
+ switch $shape {
159
+ pill { append bitmap "0xc0, 0xc0, 0x60, 0x60, 0x30, 0x1c, 0x0f, 0x03\};" }
160
+ tag { append bitmap "0xc0, 0xc0, 0xc0, 0x60, 0x30, 0x18, 0x0f, 0x07\};" }
161
+ square { append bitmap "0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0xff\};" }
162
+ eased { append bitmap "0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0x7f\};" }
163
+ ticket { append bitmap "0xc0, 0xc0, 0xc0, 0xe0, 0x30, 0x18, 0x0f, 0x0f\};" }
164
+ }
165
+
166
+ return $bitmap
167
+
168
+ }
169
+
170
+ ##########################################################################
171
+ # Creates the right side mask of the token frame as a bitmap string.
172
+ proc create_right_mask {shape height} {
173
+
174
+ set bitmap "#define right_mask_width 8\n#define right_mask_height $height\nstatic char right_mask_bits\[\] = \{\n"
175
+
176
+ switch $shape {
177
+ pill { append bitmap "0xff, 0xff, 0xfc, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, " }
178
+ tag { append bitmap "0xff, 0xff, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0, 0xc0, " }
179
+ square { append bitmap "0xff, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, " }
180
+ eased { append bitmap "0xff, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, " }
181
+ ticket { append bitmap "0xff, 0xff, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0, 0xc0, " }
182
+ }
183
+
184
+ for {set i 0} {$i < [expr $height - 16]} {incr i} {
185
+ append bitmap "0xc0, "
186
+ }
187
+
188
+ switch $shape {
189
+ pill { append bitmap "0xc0, 0xc0, 0xe0, 0xe0, 0xf0, 0xfc, 0xff, 0xff\};" }
190
+ tag { append bitmap "0xc0, 0xc0, 0xc0, 0xe0, 0xf0, 0xf8, 0xff, 0xff\};" }
191
+ square { append bitmap "0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0xff\};" }
192
+ eased { append bitmap "0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0xff\};" }
193
+ ticket { append bitmap "0xc0, 0xc0, 0xc0, 0xe0, 0xf0, 0xf8, 0xff, 0xff\};" }
194
+ }
195
+
196
+ return $bitmap
197
+
198
+ }
199
+
200
+ }