1# floor.rb
2#
3# This demonstration script creates a canvas widet that displays the
4# floorplan for DEC's Western Research Laboratory.
5#
6# floorDisplay widget demo (called by 'widget')
7#
8
9# floorDisplay --
10# Recreate the floorplan display in the canvas given by "w".  The
11# floor given by "active" is displayed on top with its office structure
12# visible.
13#
14# Arguments:
15# w -           Name of the canvas window.
16# active -      Number of active floor (1, 2, or 3).
17
18def floorDisplay(w,active)
19  return if $activeFloor == active
20
21  w.delete('all')
22  $activeFloor = active
23
24  # First go through the three floors, displaying the backgrounds for
25  # each floor.
26
27  floor_bg1(w,$floor_colors['bg1'],$floor_colors['outline1'])
28  floor_bg2(w,$floor_colors['bg2'],$floor_colors['outline2'])
29  floor_bg3(w,$floor_colors['bg3'],$floor_colors['outline3'])
30
31  # Raise the background for the active floor so that it's on top.
32
33  w.raise("floor#{active}")
34
35  # Create a dummy item just to mark this point in the display list,
36  # so we can insert highlights here.
37
38  TkcRectangle.new(w,0,100,1,101, 'fill'=>'', 'outline'=>'', 'tags'=>'marker')
39
40  # Add the walls and labels for the active floor, along with
41  # transparent polygons that define the rooms on the floor.
42  # Make sure that the room polygons are on top.
43
44  $floorLabels.clear
45  $floorItems.clear
46  send("floor_fg#{active}", w, $floor_colors['offices'])
47  w.raise('room')
48
49  # Offset the floors diagonally from each other.
50
51  w.move('floor1', '2c', '2c')
52  w.move('floor2', '1c', '1c')
53
54  # Create items for the room entry and its label.
55  TkcWindow.new(w, 600, 100, 'anchor'=>'w', 'window'=>$floor_entry)
56  TkcText.new(w, 600, 100, 'anchor'=>'e', 'text'=>"Room: ")
57  w['scrollregion'] = w.bbox('all')
58end
59
60# newRoom --
61# This method is invoked whenever the mouse enters a room
62# in the floorplan.  It changes tags so that the current room is
63# highlighted.
64#
65# Arguments:
66# w  -          The name of the canvas window.
67
68def newRoom(w)
69  id = w.find_withtag('current')[0]
70  $currentRoom.value = $floorLabels[id.id] if id != ""
71  Tk.update(true)
72end
73
74# roomChanged --
75# This method is invoked whenever the currentRoom variable changes.
76# It highlights the current room and unhighlights any previous room.
77#
78# Arguments:
79# w -           The canvas window displaying the floorplan.
80# args -        Not used.
81
82def roomChanged(w,*args)
83  w.delete('highlight')
84  item = $floorItems[$currentRoom.value]
85  return if item == nil
86  new = TkcPolygon.new(w, *(w.coords(item)))
87  new.configure('fill'=>$floor_colors['active'], 'tags'=>'highlight')
88  w.raise(new, 'marker')
89end
90
91# floor_bg1 --
92# This method represents part of the floorplan database.  When
93# invoked, it instantiates the background information for the first
94# floor.
95#
96# Arguments:
97# w -           The canvas window.
98# fill -        Fill color to use for the floor's background.
99# outline -     Color to use for the floor's outline.
100
101def floor_bg1(w,fill,outline)
102  TkcPolygon.new(w,347,80,349,82,351,84,353,85,363,92,375,99,386,104,
103                 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
104                 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
105                 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
106                 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
107                 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
108                 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
109                 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
110                 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
111                 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
112                 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
113                 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
114                 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
115  TkcLine.new(w,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
116  TkcLine.new(w,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
117  TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
118  TkcLine.new(w,0,337,0,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
119  TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
120  TkcLine.new(w,3,114,3,337, 'fill'=>outline, 'tags'=>['floor1','bg'])
121  TkcLine.new(w,258,387,60,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
122  TkcLine.new(w,484,162,398,162, 'fill'=>outline, 'tags'=>['floor1','bg'])
123  TkcLine.new(w,398,162,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
124  TkcLine.new(w,484,278,484,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
125  TkcLine.new(w,484,311,508,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
126  TkcLine.new(w,508,327,508,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
127  TkcLine.new(w,559,327,508,327, 'fill'=>outline, 'tags'=>['floor1','bg'])
128  TkcLine.new(w,644,391,559,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
129  TkcLine.new(w,644,389,644,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
130  TkcLine.new(w,559,129,484,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
131  TkcLine.new(w,484,162,484,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
132  TkcLine.new(w,725,133,559,133, 'fill'=>outline, 'tags'=>['floor1','bg'])
133  TkcLine.new(w,559,129,559,133, 'fill'=>outline, 'tags'=>['floor1','bg'])
134  TkcLine.new(w,725,129,802,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
135  TkcLine.new(w,802,389,802,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
136  TkcLine.new(w,3,337,0,337, 'fill'=>outline, 'tags'=>['floor1','bg'])
137  TkcLine.new(w,559,391,559,327, 'fill'=>outline, 'tags'=>['floor1','bg'])
138  TkcLine.new(w,802,389,644,389, 'fill'=>outline, 'tags'=>['floor1','bg'])
139  TkcLine.new(w,725,133,725,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
140  TkcLine.new(w,8,25,8,114, 'fill'=>outline, 'tags'=>['floor1','bg'])
141  TkcLine.new(w,8,114,3,114, 'fill'=>outline, 'tags'=>['floor1','bg'])
142  TkcLine.new(w,30,25,8,25, 'fill'=>outline, 'tags'=>['floor1','bg'])
143  TkcLine.new(w,484,278,395,278, 'fill'=>outline, 'tags'=>['floor1','bg'])
144  TkcLine.new(w,30,25,30,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
145  TkcLine.new(w,93,5,30,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
146  TkcLine.new(w,98,5,93,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
147  TkcLine.new(w,104,7,98,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
148  TkcLine.new(w,110,10,104,7, 'fill'=>outline, 'tags'=>['floor1','bg'])
149  TkcLine.new(w,116,16,110,10, 'fill'=>outline, 'tags'=>['floor1','bg'])
150  TkcLine.new(w,119,20,116,16, 'fill'=>outline, 'tags'=>['floor1','bg'])
151  TkcLine.new(w,122,28,119,20, 'fill'=>outline, 'tags'=>['floor1','bg'])
152  TkcLine.new(w,123,32,122,28, 'fill'=>outline, 'tags'=>['floor1','bg'])
153  TkcLine.new(w,123,68,123,32, 'fill'=>outline, 'tags'=>['floor1','bg'])
154  TkcLine.new(w,220,68,123,68, 'fill'=>outline, 'tags'=>['floor1','bg'])
155  TkcLine.new(w,386,129,386,104, 'fill'=>outline, 'tags'=>['floor1','bg'])
156  TkcLine.new(w,386,104,375,99, 'fill'=>outline, 'tags'=>['floor1','bg'])
157  TkcLine.new(w,375,99,363,92, 'fill'=>outline, 'tags'=>['floor1','bg'])
158  TkcLine.new(w,353,85,363,92, 'fill'=>outline, 'tags'=>['floor1','bg'])
159  TkcLine.new(w,220,68,220,34, 'fill'=>outline, 'tags'=>['floor1','bg'])
160  TkcLine.new(w,337,70,352,56, 'fill'=>outline, 'tags'=>['floor1','bg'])
161  TkcLine.new(w,352,56,358,48, 'fill'=>outline, 'tags'=>['floor1','bg'])
162  TkcLine.new(w,358,48,363,39, 'fill'=>outline, 'tags'=>['floor1','bg'])
163  TkcLine.new(w,363,39,365,29, 'fill'=>outline, 'tags'=>['floor1','bg'])
164  TkcLine.new(w,365,29,348,25, 'fill'=>outline, 'tags'=>['floor1','bg'])
165  TkcLine.new(w,348,25,335,22, 'fill'=>outline, 'tags'=>['floor1','bg'])
166  TkcLine.new(w,335,22,321,14, 'fill'=>outline, 'tags'=>['floor1','bg'])
167  TkcLine.new(w,321,14,300,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
168  TkcLine.new(w,300,5,283,1, 'fill'=>outline, 'tags'=>['floor1','bg'])
169  TkcLine.new(w,283,1,260,0, 'fill'=>outline, 'tags'=>['floor1','bg'])
170  TkcLine.new(w,260,0,246,0, 'fill'=>outline, 'tags'=>['floor1','bg'])
171  TkcLine.new(w,246,0,242,2, 'fill'=>outline, 'tags'=>['floor1','bg'])
172  TkcLine.new(w,242,2,236,4, 'fill'=>outline, 'tags'=>['floor1','bg'])
173  TkcLine.new(w,236,4,231,8, 'fill'=>outline, 'tags'=>['floor1','bg'])
174  TkcLine.new(w,231,8,227,13, 'fill'=>outline, 'tags'=>['floor1','bg'])
175  TkcLine.new(w,223,17,227,13, 'fill'=>outline, 'tags'=>['floor1','bg'])
176  TkcLine.new(w,221,22,223,17, 'fill'=>outline, 'tags'=>['floor1','bg'])
177  TkcLine.new(w,220,34,221,22, 'fill'=>outline, 'tags'=>['floor1','bg'])
178  TkcLine.new(w,340,360,335,363, 'fill'=>outline, 'tags'=>['floor1','bg'])
179  TkcLine.new(w,335,363,331,365, 'fill'=>outline, 'tags'=>['floor1','bg'])
180  TkcLine.new(w,331,365,326,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
181  TkcLine.new(w,326,366,304,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
182  TkcLine.new(w,304,355,304,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
183  TkcLine.new(w,395,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
184  TkcLine.new(w,404,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
185  TkcLine.new(w,409,290,404,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
186  TkcLine.new(w,413,292,409,290, 'fill'=>outline, 'tags'=>['floor1','bg'])
187  TkcLine.new(w,418,297,413,292, 'fill'=>outline, 'tags'=>['floor1','bg'])
188  TkcLine.new(w,421,302,418,297, 'fill'=>outline, 'tags'=>['floor1','bg'])
189  TkcLine.new(w,422,309,421,302, 'fill'=>outline, 'tags'=>['floor1','bg'])
190  TkcLine.new(w,421,318,422,309, 'fill'=>outline, 'tags'=>['floor1','bg'])
191  TkcLine.new(w,421,318,417,325, 'fill'=>outline, 'tags'=>['floor1','bg'])
192  TkcLine.new(w,417,325,411,330, 'fill'=>outline, 'tags'=>['floor1','bg'])
193  TkcLine.new(w,411,330,405,332, 'fill'=>outline, 'tags'=>['floor1','bg'])
194  TkcLine.new(w,405,332,397,333, 'fill'=>outline, 'tags'=>['floor1','bg'])
195  TkcLine.new(w,397,333,344,333, 'fill'=>outline, 'tags'=>['floor1','bg'])
196  TkcLine.new(w,344,333,340,334, 'fill'=>outline, 'tags'=>['floor1','bg'])
197  TkcLine.new(w,340,334,336,336, 'fill'=>outline, 'tags'=>['floor1','bg'])
198  TkcLine.new(w,336,336,335,338, 'fill'=>outline, 'tags'=>['floor1','bg'])
199  TkcLine.new(w,335,338,332,342, 'fill'=>outline, 'tags'=>['floor1','bg'])
200  TkcLine.new(w,331,347,332,342, 'fill'=>outline, 'tags'=>['floor1','bg'])
201  TkcLine.new(w,332,351,331,347, 'fill'=>outline, 'tags'=>['floor1','bg'])
202  TkcLine.new(w,334,354,332,351, 'fill'=>outline, 'tags'=>['floor1','bg'])
203  TkcLine.new(w,336,357,334,354, 'fill'=>outline, 'tags'=>['floor1','bg'])
204  TkcLine.new(w,341,359,336,357, 'fill'=>outline, 'tags'=>['floor1','bg'])
205  TkcLine.new(w,341,359,340,360, 'fill'=>outline, 'tags'=>['floor1','bg'])
206  TkcLine.new(w,395,288,395,278, 'fill'=>outline, 'tags'=>['floor1','bg'])
207  TkcLine.new(w,304,355,258,355, 'fill'=>outline, 'tags'=>['floor1','bg'])
208  TkcLine.new(w,347,80,344,76, 'fill'=>outline, 'tags'=>['floor1','bg'])
209  TkcLine.new(w,344,76,337,70, 'fill'=>outline, 'tags'=>['floor1','bg'])
210  TkcLine.new(w,349,82,347,80, 'fill'=>outline, 'tags'=>['floor1','bg'])
211  TkcLine.new(w,351,84,349,82, 'fill'=>outline, 'tags'=>['floor1','bg'])
212  TkcLine.new(w,353,85,351,84, 'fill'=>outline, 'tags'=>['floor1','bg'])
213end
214
215# floor_bg2 --
216# This method represents part of the floorplan database.  When
217# invoked, it instantiates the background information for the first
218# floor.
219#
220# Arguments:
221# w -           The canvas window.
222# fill -        Fill color to use for the floor's background.
223# outline -     Color to use for the floor's outline.
224
225def floor_bg2(w,fill,outline)
226  TkcPolygon.new(w,559,129,484,129,484,162,398,162,398,129,315,129,
227                 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
228                 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
229                 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
230                 367,802,367,802,129,725,129,725,133,559,133,559,129,
231                 'tags'=>['floor2','bg'], 'fill'=>fill)
232  TkcLine.new(w,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
233  TkcLine.new(w,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
234  TkcLine.new(w,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
235  TkcLine.new(w,802,129,725,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
236  TkcLine.new(w,725,133,725,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
237  TkcLine.new(w,559,129,559,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
238  TkcLine.new(w,559,133,725,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
239  TkcLine.new(w,484,162,484,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
240  TkcLine.new(w,559,129,484,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
241  TkcLine.new(w,802,367,644,367, 'fill'=>outline, 'tags'=>['floor2','bg'])
242  TkcLine.new(w,644,367,644,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
243  TkcLine.new(w,644,391,558,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
244  TkcLine.new(w,558,327,558,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
245  TkcLine.new(w,558,327,508,327, 'fill'=>outline, 'tags'=>['floor2','bg'])
246  TkcLine.new(w,508,327,508,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
247  TkcLine.new(w,484,311,508,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
248  TkcLine.new(w,484,280,484,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
249  TkcLine.new(w,398,162,484,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
250  TkcLine.new(w,484,280,395,280, 'fill'=>outline, 'tags'=>['floor2','bg'])
251  TkcLine.new(w,395,280,395,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
252  TkcLine.new(w,258,387,60,387, 'fill'=>outline, 'tags'=>['floor2','bg'])
253  TkcLine.new(w,3,133,3,339, 'fill'=>outline, 'tags'=>['floor2','bg'])
254  TkcLine.new(w,3,339,0,339, 'fill'=>outline, 'tags'=>['floor2','bg'])
255  TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
256  TkcLine.new(w,0,339,0,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
257  TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
258  TkcLine.new(w,258,329,258,387, 'fill'=>outline, 'tags'=>['floor2','bg'])
259  TkcLine.new(w,350,329,258,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
260  TkcLine.new(w,395,311,350,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
261  TkcLine.new(w,398,129,315,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
262  TkcLine.new(w,176,133,315,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
263  TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
264  TkcLine.new(w,3,133,96,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
265  TkcLine.new(w,315,133,315,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
266  TkcLine.new(w,176,133,176,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
267  TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
268end
269
270# floor_bg3 --
271# This method represents part of the floorplan database.  When
272# invoked, it instantiates the background information for the first
273# floor.
274#
275# Arguments:
276# w -           The canvas window.
277# fill -        Fill color to use for the floor's background.
278# outline -     Color to use for the floor's outline.
279
280def floor_bg3(w,fill,outline)
281  TkcPolygon.new(w,159,300,107,300,107,248,159,248,159,129,96,129,96,
282                 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
283                 'tags'=>['floor3','bg'], 'fill'=>fill)
284  TkcPolygon.new(w,258,370,258,329,350,329,350,311,399,311,399,129,
285                 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
286                 'tags'=>['floor3','bg'], 'fill'=>fill)
287  TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
288  TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
289  TkcLine.new(w,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
290  TkcLine.new(w,315,133,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
291  TkcLine.new(w,315,133,315,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
292  TkcLine.new(w,399,129,315,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
293  TkcLine.new(w,399,311,399,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
294  TkcLine.new(w,399,311,350,311, 'fill'=>outline, 'tags'=>['floor3','bg'])
295  TkcLine.new(w,350,329,350,311, 'fill'=>outline, 'tags'=>['floor3','bg'])
296  TkcLine.new(w,350,329,258,329, 'fill'=>outline, 'tags'=>['floor3','bg'])
297  TkcLine.new(w,258,370,258,329, 'fill'=>outline, 'tags'=>['floor3','bg'])
298  TkcLine.new(w,60,370,258,370, 'fill'=>outline, 'tags'=>['floor3','bg'])
299  TkcLine.new(w,60,370,60,391, 'fill'=>outline, 'tags'=>['floor3','bg'])
300  TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor3','bg'])
301  TkcLine.new(w,0,391,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
302  TkcLine.new(w,21,331,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
303  TkcLine.new(w,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
304  TkcLine.new(w,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
305  TkcLine.new(w,107,300,159,300,159,248,107,248,107,300,
306              'fill'=>outline, 'tags'=>['floor3','bg'])
307end
308
309# floor_fg1 --
310# This method represents part of the floorplan database.  When
311# invoked, it instantiates the foreground information for the first
312# floor (office outlines and numbers).
313#
314# Arguments:
315# w -           The canvas window.
316# color -       Color to use for drawing foreground information.
317
318def floor_fg1(w,color)
319  i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
320                     'fill'=>'', 'tags'=>['floor1','room'])
321  $floorLabels[i.id] = '101'
322  $floorItems['101'] = i
323  TkcText.new(w,358,209, 'text'=>'101', 'fill'=>color,
324              'anchor'=>'c', 'tags'=>['floor1','label'])
325  i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
326                     'fill'=>'', 'tags'=>['floor1','room'])
327  $floorLabels[i.id] = 'Pub Lift1'
328  $floorItems['Pub Lift1'] = i
329  TkcText.new(w,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
330              'anchor'=>'c', 'tags'=>['floor1','label'])
331  i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
332                     'fill'=>'', 'tags'=>['floor1','room'])
333  $floorLabels[i.id] = 'Priv Lift1'
334  $floorItems['Priv Lift1'] = i
335  TkcText.new(w,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
336              'anchor'=>'c', 'tags'=>['floor1','label'])
337  i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
338                     'fill'=>'', 'tags'=>['floor1','room'])
339  $floorLabels[i.id] = '110'
340  $floorItems['110'] = i
341  TkcText.new(w,21.5,363, 'text'=>'110', 'fill'=>color,
342              'anchor'=>'c', 'tags'=>['floor1','label'])
343  i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
344                     'fill'=>'', 'tags'=>['floor1','room'])
345  $floorLabels[i.id] = '109'
346  $floorItems['109'] = i
347  TkcText.new(w,67,363, 'text'=>'109', 'fill'=>color,
348              'anchor'=>'c', 'tags'=>['floor1','label'])
349  i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
350                     'fill'=>'', 'tags'=>['floor1','room'])
351  $floorLabels[i.id] = '111'
352  $floorItems['111'] = i
353  TkcText.new(w,28.5,276.5, 'text'=>'111', 'fill'=>color,
354              'anchor'=>'c', 'tags'=>['floor1','label'])
355  i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
356                     'fill'=>'', 'tags'=>['floor1','room'])
357  $floorLabels[i.id] = '117B'
358  $floorItems['117B'] = i
359  TkcText.new(w,88.5,278.5, 'text'=>'117B', 'fill'=>color,
360              'anchor'=>'c', 'tags'=>['floor1','label'])
361  i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
362                     'fill'=>'', 'tags'=>['floor1','room'])
363  $floorLabels[i.id] = '112'
364  $floorItems['112'] = i
365  TkcText.new(w,28.5,227.5, 'text'=>'112', 'fill'=>color,
366              'anchor'=>'c', 'tags'=>['floor1','label'])
367  i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
368                     'fill'=>'', 'tags'=>['floor1','room'])
369  $floorLabels[i.id] = '113'
370  $floorItems['113'] = i
371  TkcText.new(w,28.5,179.5, 'text'=>'113', 'fill'=>color,
372              'anchor'=>'c', 'tags'=>['floor1','label'])
373  i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
374                     'fill'=>'', 'tags'=>['floor1','room'])
375  $floorLabels[i.id] = '117A'
376  $floorItems['117A'] = i
377  TkcText.new(w,82,180.5, 'text'=>'117A', 'fill'=>color,
378              'anchor'=>'c', 'tags'=>['floor1','label'])
379  i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
380                     'fill'=>'', 'tags'=>['floor1','room'])
381  $floorLabels[i.id] = '117'
382  $floorItems['117'] = i
383  TkcText.new(w,65,235, 'text'=>'117', 'fill'=>color,
384              'anchor'=>'c', 'tags'=>['floor1','label'])
385  i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
386                     'fill'=>'', 'tags'=>['floor1','room'])
387  $floorLabels[i.id] = '114'
388  $floorItems['114'] = i
389  TkcText.new(w,28.5,135, 'text'=>'114', 'fill'=>color,
390              'anchor'=>'c', 'tags'=>['floor1','label'])
391  i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
392                     'fill'=>'', 'tags'=>['floor1','room'])
393  $floorLabels[i.id] = '115'
394  $floorItems['115'] = i
395  TkcText.new(w,74,141.5, 'text'=>'115', 'fill'=>color,
396              'anchor'=>'c', 'tags'=>['floor1','label'])
397  i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
398                     'fill'=>'', 'tags'=>['floor1','room'])
399  $floorLabels[i.id] = '116'
400  $floorItems['116'] = i
401  TkcText.new(w,48.5,70, 'text'=>'116', 'fill'=>color,
402              'anchor'=>'c', 'tags'=>['floor1','label'])
403  i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
404                     'fill'=>'', 'tags'=>['floor1','room'])
405  $floorLabels[i.id] = '118'
406  $floorItems['118'] = i
407  TkcText.new(w,108.5,102, 'text'=>'118', 'fill'=>color,
408              'anchor'=>'c', 'tags'=>['floor1','label'])
409  i = TkcPolygon.new(w,178,128,178,132,216,132,216,91,
410                     163,91,163,112,149,112,149,128,
411                     'fill'=>'', 'tags'=>['floor1','room'])
412  $floorLabels[i.id] = '120'
413  $floorItems['120'] = i
414  TkcText.new(w,189.5,111.5, 'text'=>'120', 'fill'=>color,
415              'anchor'=>'c', 'tags'=>['floor1','label'])
416  i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192,
417                     156,192,156,169,175,169,175,246,79,246,
418                     'fill'=>'', 'tags'=>['floor1','room'])
419  $floorLabels[i.id] = '122'
420  $floorItems['122'] = i
421  TkcText.new(w,131,207.5, 'text'=>'122', 'fill'=>color,
422              'anchor'=>'c', 'tags'=>['floor1','label'])
423  i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
424                     'fill'=>'', 'tags'=>['floor1','room'])
425  $floorLabels[i.id] = '121'
426  $floorItems['121'] = i
427  TkcText.new(w,146,180, 'text'=>'121', 'fill'=>color,
428              'anchor'=>'c', 'tags'=>['floor1','label'])
429  i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
430                     'fill'=>'', 'tags'=>['floor1','room'])
431  $floorLabels[i.id] = '106A'
432  $floorItems['106A'] = i
433  TkcText.new(w,112.5,304.5, 'text'=>'106A', 'fill'=>color,
434              'anchor'=>'c', 'tags'=>['floor1','label'])
435  i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
436                     'fill'=>'', 'tags'=>['floor1','room'])
437  $floorLabels[i.id] = '105'
438  $floorItems['105'] = i
439  TkcText.new(w,124.5,278.5, 'text'=>'105', 'fill'=>color,
440              'anchor'=>'c', 'tags'=>['floor1','label'])
441  i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
442                     'fill'=>'', 'tags'=>['floor1','room'])
443  $floorLabels[i.id] = '106B'
444  $floorItems['106B'] = i
445  TkcText.new(w,163,304.5, 'text'=>'106B', 'fill'=>color,
446              'anchor'=>'c', 'tags'=>['floor1','label'])
447  i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
448                     'fill'=>'', 'tags'=>['floor1','room'])
449  $floorLabels[i.id] = '104'
450  $floorItems['104'] = i
451  TkcText.new(w,184,278.5, 'text'=>'104', 'fill'=>color,
452              'anchor'=>'c', 'tags'=>['floor1','label'])
453  i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
454                     'fill'=>'', 'tags'=>['floor1','room'])
455  $floorLabels[i.id] = '108'
456  $floorItems['108'] = i
457  TkcText.new(w,114.5,361, 'text'=>'108', 'fill'=>color,
458              'anchor'=>'c', 'tags'=>['floor1','label'])
459  i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
460                     'fill'=>'', 'tags'=>['floor1','room'])
461  $floorLabels[i.id] = '107'
462  $floorItems['107'] = i
463  TkcText.new(w,198,361, 'text'=>'107', 'fill'=>color,
464              'anchor'=>'c', 'tags'=>['floor1','label'])
465  i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
466                     'fill'=>'', 'tags'=>['floor1','room'])
467  $floorLabels[i.id] = 'Smoking'
468  $floorItems['Smoking'] = i
469  TkcText.new(w,280,341, 'text'=>'Smoking', 'fill'=>color,
470              'anchor'=>'c', 'tags'=>['floor1','label'])
471  i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
472                     'fill'=>'', 'tags'=>['floor1','room'])
473  $floorLabels[i.id] = '123'
474  $floorItems['123'] = i
475  TkcText.new(w,245.5,190.5, 'text'=>'123', 'fill'=>color,
476              'anchor'=>'c', 'tags'=>['floor1','label'])
477  i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
478                     'fill'=>'', 'tags'=>['floor1','room'])
479  $floorLabels[i.id] = '103'
480  $floorItems['103'] = i
481  TkcText.new(w,259,287, 'text'=>'103', 'fill'=>color,
482              'anchor'=>'c', 'tags'=>['floor1','label'])
483  i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
484                     'fill'=>'', 'tags'=>['floor1','room'])
485  $floorLabels[i.id] = '124'
486  $floorItems['124'] = i
487  TkcText.new(w,356,150, 'text'=>'124', 'fill'=>color,
488              'anchor'=>'c', 'tags'=>['floor1','label'])
489  i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
490                     'fill'=>'', 'tags'=>['floor1','room'])
491  $floorLabels[i.id] = '125'
492  $floorItems['125'] = i
493  TkcText.new(w,392,217.5, 'text'=>'125', 'fill'=>color,
494              'anchor'=>'c', 'tags'=>['floor1','label'])
495  i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
496                     'fill'=>'', 'tags'=>['floor1','room'])
497  $floorLabels[i.id] = '126'
498  $floorItems['126'] = i
499  TkcText.new(w,436.5,185.5, 'text'=>'126', 'fill'=>color,
500              'anchor'=>'c', 'tags'=>['floor1','label'])
501  i = TkcPolygon.new(w,409,209,409,229,399,229,399,253,
502                     486,253,486,239,474,239,474,209,
503                     'fill'=>'', 'tags'=>['floor1','room'])
504  $floorLabels[i.id] = '127'
505  $floorItems['127'] = i
506  TkcText.new(w,436.5,'231', 'text'=>'127', 'fill'=>color,
507              'anchor'=>'c', 'tags'=>['floor1','label'])
508  i = TkcPolygon.new(w,501,164,501,174,495,174,495,188,
509                     490,188,490,204,476,204,476,164,
510                     'fill'=>'', 'tags'=>['floor1','room'])
511  $floorLabels[i.id] = 'MShower'
512  $floorItems['MShower'] = i
513  TkcText.new(w,488.5,'184', 'text'=>'MShower', 'fill'=>color,
514              'anchor'=>'c', 'tags'=>['floor1','label'])
515  i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
516                     'fill'=>'', 'tags'=>['floor1','room'])
517  $floorLabels[i.id] = 'Closet'
518  $floorItems['Closet'] = i
519  TkcText.new(w,502.5,190, 'text'=>'Closet', 'fill'=>color,
520              'anchor'=>'c', 'tags'=>['floor1','label'])
521  i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
522                     'fill'=>'', 'tags'=>['floor1','room'])
523  $floorLabels[i.id] = 'WShower'
524  $floorItems['WShower'] = i
525  TkcText.new(w,494.5,230, 'text'=>'WShower', 'fill'=>color,
526              'anchor'=>'c', 'tags'=>['floor1','label'])
527  i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166,
528                     697,166,697,275,553,275,531,254,515,254,
529                     515,174,503,174,503,161,486,161,
530                     'fill'=>'', 'tags'=>['floor1','room'])
531  $floorLabels[i.id] = '130'
532  $floorItems['130'] = i
533  TkcText.new(w,638.5,205, 'text'=>'130', 'fill'=>color,
534              'anchor'=>'c', 'tags'=>['floor1','label'])
535  i = TkcPolygon.new(w,308,242,339,242,339,248,342,248,
536                     342,246,397,246,397,276,393,276,
537                     393,309,300,309,300,248,308,248,
538                     'fill'=>'', 'tags'=>['floor1','room'])
539  $floorLabels[i.id] = '102'
540  $floorItems['102'] = i
541  TkcText.new(w,367.5,278.5, 'text'=>'102', 'fill'=>color,
542              'anchor'=>'c', 'tags'=>['floor1','label'])
543  i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
544                     'fill'=>'', 'tags'=>['floor1','room'])
545  $floorLabels[i.id] = '128'
546  $floorItems['128'] = i
547  TkcText.new(w,441.5,265.5, 'text'=>'128', 'fill'=>color,
548              'anchor'=>'c', 'tags'=>['floor1','label'])
549  i = TkcPolygon.new(w,510,309,486,309,486,255,530,255,
550                     552,277,561,277,561,325,510,325,
551                     'fill'=>'', 'tags'=>['floor1','room'])
552  $floorLabels[i.id] = '129'
553  $floorItems['129'] = i
554  TkcText.new(w,535.5,293, 'text'=>'129', 'fill'=>color,
555              'anchor'=>'c', 'tags'=>['floor1','label'])
556  i = TkcPolygon.new(w,696,281,740,281,740,387,642,387,
557                     642,389,561,389,561,277,696,277,
558                     'fill'=>'', 'tags'=>['floor1','room'])
559  $floorLabels[i.id] = '133'
560  $floorItems['133'] = i
561  TkcText.new(w,628.5,335, 'text'=>'133', 'fill'=>color,
562              'anchor'=>'c', 'tags'=>['floor1','label'])
563  i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
564                     'fill'=>'', 'tags'=>['floor1','room'])
565  $floorLabels[i.id] = '132'
566  $floorItems['132'] = i
567  TkcText.new(w,771,334, 'text'=>'132', 'fill'=>color,
568              'anchor'=>'c', 'tags'=>['floor1','label'])
569  i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
570                     'fill'=>'', 'tags'=>['floor1','room'])
571  $floorLabels[i.id] = '134'
572  $floorItems['134'] = i
573  TkcText.new(w,749.5,224, 'text'=>'134', 'fill'=>color,
574              'anchor'=>'c', 'tags'=>['floor1','label'])
575  i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
576                     'fill'=>'', 'tags'=>['floor1','room'])
577  $floorLabels[i.id] = '135'
578  $floorItems['135'] = i
579  TkcText.new(w,763,148.5, 'text'=>'135', 'fill'=>color,
580              'anchor'=>'c', 'tags'=>['floor1','label'])
581  i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366,
582                     304,312,396,312,396,288,400,288,404,288,
583                     409,290,413,292,418,297,421,302,422,309,
584                     421,318,417,325,411,330,405,332,397,333,
585                     344,333,340,334,336,336,335,338,332,342,
586                     331,347,332,351,334,354,336,357,341,359,
587                     'fill'=>'', 'tags'=>['floor1','room'])
588  $floorLabels[i.id] = 'Ramona Stair'
589  $floorItems['Ramona Stair'] = i
590  TkcText.new(w,368,323, 'text'=>'Ramona Stair', 'fill'=>color,
591              'anchor'=>'c', 'tags'=>['floor1','label'])
592  i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20,
593                     122,28,123,32,123,68,220,68,220,87,90,87,90,23,
594                     'fill'=>'', 'tags'=>['floor1','room'])
595  $floorLabels[i.id] = 'University Stair'
596  $floorItems['University Stair'] = i
597  TkcText.new(w,155,77.5, 'text'=>'University Stair', 'fill'=>color,
598              'anchor'=>'c', 'tags'=>['floor1','label'])
599  i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56,
600                     358,48,363,39,365,29,348,25,335,22,321,14,
601                     300,5,283,1,260,0,246,0,242,2,236,4,231,8,
602                     227,13,223,17,221,22,220,34,260,34,
603                     'fill'=>'', 'tags'=>['floor1','room'])
604  $floorLabels[i.id] = 'Plaza Stair'
605  $floorItems['Plaza Stair'] = i
606  TkcText.new(w,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color,
607              'anchor'=>'c', 'tags'=>['floor1','label'])
608  i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49,
609                     323,56,337,70,350,83,365,94,377,100,
610                     386,104,386,128,220,128,
611                     'fill'=>'', 'tags'=>['floor1','room'])
612  $floorLabels[i.id] = 'Plaza Deck'
613  $floorItems['Plaza Deck'] = i
614  TkcText.new(w,303,81, 'text'=>'Plaza Deck', 'fill'=>color,
615              'anchor'=>'c', 'tags'=>['floor1','label'])
616  i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310,
617                     'fill'=>'', 'tags'=>['floor1','room'])
618  $floorLabels[i.id] = '106'
619  $floorItems['106'] = i
620  TkcText.new(w,131.5,318.5, 'text'=>'106', 'fill'=>color,
621              'anchor'=>'c', 'tags'=>['floor1','label'])
622  i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115,
623                     95,128,114,128,114,151,157,151,157,153,112,153,
624                     112,130,97,130,97,168,175,168,175,131,146,131,
625                     'fill'=>'', 'tags'=>['floor1','room'])
626  $floorLabels[i.id] = '119'
627  $floorItems['119'] = i
628  TkcText.new(w,143.5,133, 'text'=>'119', 'fill'=>color,
629              'anchor'=>'c', 'tags'=>['floor1','label'])
630  TkcLine.new(w,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall'])
631  TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall'])
632  TkcLine.new(w,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall'])
633  TkcLine.new(w,78,169,176,169, 'fill'=>color, 'tags'=>['floor1','wall'])
634  TkcLine.new(w,176,247,176,129, 'fill'=>color, 'tags'=>['floor1','wall'])
635  TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor1','wall'])
636  TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor1','wall'])
637  TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor1','wall'])
638  TkcLine.new(w,340,247,340,224, 'fill'=>color, 'tags'=>['floor1','wall'])
639  TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor1','wall'])
640  TkcLine.new(w,376,246,376,170, 'fill'=>color, 'tags'=>['floor1','wall'])
641  TkcLine.new(w,307,247,307,170, 'fill'=>color, 'tags'=>['floor1','wall'])
642  TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor1','wall'])
643  TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor1','wall'])
644  TkcLine.new(w,147,129,176,129, 'fill'=>color, 'tags'=>['floor1','wall'])
645  TkcLine.new(w,202,133,176,133, 'fill'=>color, 'tags'=>['floor1','wall'])
646  TkcLine.new(w,398,129,315,129, 'fill'=>color, 'tags'=>['floor1','wall'])
647  TkcLine.new(w,258,352,258,387, 'fill'=>color, 'tags'=>['floor1','wall'])
648  TkcLine.new(w,60,387,60,391, 'fill'=>color, 'tags'=>['floor1','wall'])
649  TkcLine.new(w,0,337,0,391, 'fill'=>color, 'tags'=>['floor1','wall'])
650  TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor1','wall'])
651  TkcLine.new(w,3,114,3,337, 'fill'=>color, 'tags'=>['floor1','wall'])
652  TkcLine.new(w,258,387,60,387, 'fill'=>color, 'tags'=>['floor1','wall'])
653  TkcLine.new(w,52,237,52,273, 'fill'=>color, 'tags'=>['floor1','wall'])
654  TkcLine.new(w,52,189,52,225, 'fill'=>color, 'tags'=>['floor1','wall'])
655  TkcLine.new(w,52,140,52,177, 'fill'=>color, 'tags'=>['floor1','wall'])
656  TkcLine.new(w,395,306,395,311, 'fill'=>color, 'tags'=>['floor1','wall'])
657  TkcLine.new(w,531,254,398,254, 'fill'=>color, 'tags'=>['floor1','wall'])
658  TkcLine.new(w,475,178,475,238, 'fill'=>color, 'tags'=>['floor1','wall'])
659  TkcLine.new(w,502,162,398,162, 'fill'=>color, 'tags'=>['floor1','wall'])
660  TkcLine.new(w,398,129,398,188, 'fill'=>color, 'tags'=>['floor1','wall'])
661  TkcLine.new(w,383,188,376,188, 'fill'=>color, 'tags'=>['floor1','wall'])
662  TkcLine.new(w,408,188,408,194, 'fill'=>color, 'tags'=>['floor1','wall'])
663  TkcLine.new(w,398,227,398,254, 'fill'=>color, 'tags'=>['floor1','wall'])
664  TkcLine.new(w,408,227,398,227, 'fill'=>color, 'tags'=>['floor1','wall'])
665  TkcLine.new(w,408,222,408,227, 'fill'=>color, 'tags'=>['floor1','wall'])
666  TkcLine.new(w,408,206,408,210, 'fill'=>color, 'tags'=>['floor1','wall'])
667  TkcLine.new(w,408,208,475,208, 'fill'=>color, 'tags'=>['floor1','wall'])
668  TkcLine.new(w,484,278,484,311, 'fill'=>color, 'tags'=>['floor1','wall'])
669  TkcLine.new(w,484,311,508,311, 'fill'=>color, 'tags'=>['floor1','wall'])
670  TkcLine.new(w,508,327,508,311, 'fill'=>color, 'tags'=>['floor1','wall'])
671  TkcLine.new(w,559,327,508,327, 'fill'=>color, 'tags'=>['floor1','wall'])
672  TkcLine.new(w,644,391,559,391, 'fill'=>color, 'tags'=>['floor1','wall'])
673  TkcLine.new(w,644,389,644,391, 'fill'=>color, 'tags'=>['floor1','wall'])
674  TkcLine.new(w,514,205,475,205, 'fill'=>color, 'tags'=>['floor1','wall'])
675  TkcLine.new(w,496,189,496,187, 'fill'=>color, 'tags'=>['floor1','wall'])
676  TkcLine.new(w,559,129,484,129, 'fill'=>color, 'tags'=>['floor1','wall'])
677  TkcLine.new(w,484,162,484,129, 'fill'=>color, 'tags'=>['floor1','wall'])
678  TkcLine.new(w,725,133,559,133, 'fill'=>color, 'tags'=>['floor1','wall'])
679  TkcLine.new(w,559,129,559,133, 'fill'=>color, 'tags'=>['floor1','wall'])
680  TkcLine.new(w,725,149,725,167, 'fill'=>color, 'tags'=>['floor1','wall'])
681  TkcLine.new(w,725,129,802,129, 'fill'=>color, 'tags'=>['floor1','wall'])
682  TkcLine.new(w,802,389,802,129, 'fill'=>color, 'tags'=>['floor1','wall'])
683  TkcLine.new(w,739,167,802,167, 'fill'=>color, 'tags'=>['floor1','wall'])
684  TkcLine.new(w,396,188,408,188, 'fill'=>color, 'tags'=>['floor1','wall'])
685  TkcLine.new(w,0,337,9,337, 'fill'=>color, 'tags'=>['floor1','wall'])
686  TkcLine.new(w,58,337,21,337, 'fill'=>color, 'tags'=>['floor1','wall'])
687  TkcLine.new(w,43,391,43,337, 'fill'=>color, 'tags'=>['floor1','wall'])
688  TkcLine.new(w,105,337,75,337, 'fill'=>color, 'tags'=>['floor1','wall'])
689  TkcLine.new(w,91,387,91,337, 'fill'=>color, 'tags'=>['floor1','wall'])
690  TkcLine.new(w,154,337,117,337, 'fill'=>color, 'tags'=>['floor1','wall'])
691  TkcLine.new(w,139,387,139,337, 'fill'=>color, 'tags'=>['floor1','wall'])
692  TkcLine.new(w,227,337,166,337, 'fill'=>color, 'tags'=>['floor1','wall'])
693  TkcLine.new(w,258,337,251,337, 'fill'=>color, 'tags'=>['floor1','wall'])
694  TkcLine.new(w,258,328,302,328, 'fill'=>color, 'tags'=>['floor1','wall'])
695  TkcLine.new(w,302,355,302,311, 'fill'=>color, 'tags'=>['floor1','wall'])
696  TkcLine.new(w,395,311,302,311, 'fill'=>color, 'tags'=>['floor1','wall'])
697  TkcLine.new(w,484,278,395,278, 'fill'=>color, 'tags'=>['floor1','wall'])
698  TkcLine.new(w,395,294,395,278, 'fill'=>color, 'tags'=>['floor1','wall'])
699  TkcLine.new(w,473,278,473,275, 'fill'=>color, 'tags'=>['floor1','wall'])
700  TkcLine.new(w,473,256,473,254, 'fill'=>color, 'tags'=>['floor1','wall'])
701  TkcLine.new(w,533,257,531,254, 'fill'=>color, 'tags'=>['floor1','wall'])
702  TkcLine.new(w,553,276,551,274, 'fill'=>color, 'tags'=>['floor1','wall'])
703  TkcLine.new(w,698,276,553,276, 'fill'=>color, 'tags'=>['floor1','wall'])
704  TkcLine.new(w,559,391,559,327, 'fill'=>color, 'tags'=>['floor1','wall'])
705  TkcLine.new(w,802,389,644,389, 'fill'=>color, 'tags'=>['floor1','wall'])
706  TkcLine.new(w,741,314,741,389, 'fill'=>color, 'tags'=>['floor1','wall'])
707  TkcLine.new(w,698,280,698,167, 'fill'=>color, 'tags'=>['floor1','wall'])
708  TkcLine.new(w,707,280,698,280, 'fill'=>color, 'tags'=>['floor1','wall'])
709  TkcLine.new(w,802,280,731,280, 'fill'=>color, 'tags'=>['floor1','wall'])
710  TkcLine.new(w,741,280,741,302, 'fill'=>color, 'tags'=>['floor1','wall'])
711  TkcLine.new(w,698,167,727,167, 'fill'=>color, 'tags'=>['floor1','wall'])
712  TkcLine.new(w,725,137,725,129, 'fill'=>color, 'tags'=>['floor1','wall'])
713  TkcLine.new(w,514,254,514,175, 'fill'=>color, 'tags'=>['floor1','wall'])
714  TkcLine.new(w,496,175,514,175, 'fill'=>color, 'tags'=>['floor1','wall'])
715  TkcLine.new(w,502,175,502,162, 'fill'=>color, 'tags'=>['floor1','wall'])
716  TkcLine.new(w,475,166,475,162, 'fill'=>color, 'tags'=>['floor1','wall'])
717  TkcLine.new(w,496,176,496,175, 'fill'=>color, 'tags'=>['floor1','wall'])
718  TkcLine.new(w,491,189,496,189, 'fill'=>color, 'tags'=>['floor1','wall'])
719  TkcLine.new(w,491,205,491,189, 'fill'=>color, 'tags'=>['floor1','wall'])
720  TkcLine.new(w,487,238,475,238, 'fill'=>color, 'tags'=>['floor1','wall'])
721  TkcLine.new(w,487,240,487,238, 'fill'=>color, 'tags'=>['floor1','wall'])
722  TkcLine.new(w,487,252,487,254, 'fill'=>color, 'tags'=>['floor1','wall'])
723  TkcLine.new(w,315,133,304,133, 'fill'=>color, 'tags'=>['floor1','wall'])
724  TkcLine.new(w,256,133,280,133, 'fill'=>color, 'tags'=>['floor1','wall'])
725  TkcLine.new(w,78,247,270,247, 'fill'=>color, 'tags'=>['floor1','wall'])
726  TkcLine.new(w,307,247,294,247, 'fill'=>color, 'tags'=>['floor1','wall'])
727  TkcLine.new(w,214,133,232,133, 'fill'=>color, 'tags'=>['floor1','wall'])
728  TkcLine.new(w,217,247,217,266, 'fill'=>color, 'tags'=>['floor1','wall'])
729  TkcLine.new(w,217,309,217,291, 'fill'=>color, 'tags'=>['floor1','wall'])
730  TkcLine.new(w,217,309,172,309, 'fill'=>color, 'tags'=>['floor1','wall'])
731  TkcLine.new(w,154,309,148,309, 'fill'=>color, 'tags'=>['floor1','wall'])
732  TkcLine.new(w,175,300,175,309, 'fill'=>color, 'tags'=>['floor1','wall'])
733  TkcLine.new(w,151,300,175,300, 'fill'=>color, 'tags'=>['floor1','wall'])
734  TkcLine.new(w,151,247,151,309, 'fill'=>color, 'tags'=>['floor1','wall'])
735  TkcLine.new(w,78,237,78,265, 'fill'=>color, 'tags'=>['floor1','wall'])
736  TkcLine.new(w,78,286,78,309, 'fill'=>color, 'tags'=>['floor1','wall'])
737  TkcLine.new(w,106,309,78,309, 'fill'=>color, 'tags'=>['floor1','wall'])
738  TkcLine.new(w,130,309,125,309, 'fill'=>color, 'tags'=>['floor1','wall'])
739  TkcLine.new(w,99,309,99,247, 'fill'=>color, 'tags'=>['floor1','wall'])
740  TkcLine.new(w,127,299,99,299, 'fill'=>color, 'tags'=>['floor1','wall'])
741  TkcLine.new(w,127,309,127,299, 'fill'=>color, 'tags'=>['floor1','wall'])
742  TkcLine.new(w,155,191,137,191, 'fill'=>color, 'tags'=>['floor1','wall'])
743  TkcLine.new(w,137,169,137,191, 'fill'=>color, 'tags'=>['floor1','wall'])
744  TkcLine.new(w,78,171,78,169, 'fill'=>color, 'tags'=>['floor1','wall'])
745  TkcLine.new(w,78,190,78,218, 'fill'=>color, 'tags'=>['floor1','wall'])
746  TkcLine.new(w,86,192,86,169, 'fill'=>color, 'tags'=>['floor1','wall'])
747  TkcLine.new(w,86,192,78,192, 'fill'=>color, 'tags'=>['floor1','wall'])
748  TkcLine.new(w,52,301,3,301, 'fill'=>color, 'tags'=>['floor1','wall'])
749  TkcLine.new(w,52,286,52,301, 'fill'=>color, 'tags'=>['floor1','wall'])
750  TkcLine.new(w,52,252,3,252, 'fill'=>color, 'tags'=>['floor1','wall'])
751  TkcLine.new(w,52,203,3,203, 'fill'=>color, 'tags'=>['floor1','wall'])
752  TkcLine.new(w,3,156,52,156, 'fill'=>color, 'tags'=>['floor1','wall'])
753  TkcLine.new(w,8,25,8,114, 'fill'=>color, 'tags'=>['floor1','wall'])
754  TkcLine.new(w,63,114,3,114, 'fill'=>color, 'tags'=>['floor1','wall'])
755  TkcLine.new(w,75,114,97,114, 'fill'=>color, 'tags'=>['floor1','wall'])
756  TkcLine.new(w,108,114,129,114, 'fill'=>color, 'tags'=>['floor1','wall'])
757  TkcLine.new(w,129,114,129,89, 'fill'=>color, 'tags'=>['floor1','wall'])
758  TkcLine.new(w,52,114,52,128, 'fill'=>color, 'tags'=>['floor1','wall'])
759  TkcLine.new(w,132,89,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
760  TkcLine.new(w,88,25,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
761  TkcLine.new(w,88,114,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
762  TkcLine.new(w,218,89,144,89, 'fill'=>color, 'tags'=>['floor1','wall'])
763  TkcLine.new(w,147,111,147,129, 'fill'=>color, 'tags'=>['floor1','wall'])
764  TkcLine.new(w,162,111,147,111, 'fill'=>color, 'tags'=>['floor1','wall'])
765  TkcLine.new(w,162,109,162,111, 'fill'=>color, 'tags'=>['floor1','wall'])
766  TkcLine.new(w,162,96,162,89, 'fill'=>color, 'tags'=>['floor1','wall'])
767  TkcLine.new(w,218,89,218,94, 'fill'=>color, 'tags'=>['floor1','wall'])
768  TkcLine.new(w,218,89,218,119, 'fill'=>color, 'tags'=>['floor1','wall'])
769  TkcLine.new(w,8,25,88,25, 'fill'=>color, 'tags'=>['floor1','wall'])
770  TkcLine.new(w,258,337,258,328, 'fill'=>color, 'tags'=>['floor1','wall'])
771  TkcLine.new(w,113,129,96,129, 'fill'=>color, 'tags'=>['floor1','wall'])
772  TkcLine.new(w,302,355,258,355, 'fill'=>color, 'tags'=>['floor1','wall'])
773  TkcLine.new(w,386,104,386,129, 'fill'=>color, 'tags'=>['floor1','wall'])
774  TkcLine.new(w,377,100,386,104, 'fill'=>color, 'tags'=>['floor1','wall'])
775  TkcLine.new(w,365,94,377,100, 'fill'=>color, 'tags'=>['floor1','wall'])
776  TkcLine.new(w,350,83,365,94, 'fill'=>color, 'tags'=>['floor1','wall'])
777  TkcLine.new(w,337,70,350,83, 'fill'=>color, 'tags'=>['floor1','wall'])
778  TkcLine.new(w,337,70,323,56, 'fill'=>color, 'tags'=>['floor1','wall'])
779  TkcLine.new(w,312,49,323,56, 'fill'=>color, 'tags'=>['floor1','wall'])
780  TkcLine.new(w,295,40,312,49, 'fill'=>color, 'tags'=>['floor1','wall'])
781  TkcLine.new(w,282,37,295,40, 'fill'=>color, 'tags'=>['floor1','wall'])
782  TkcLine.new(w,260,34,282,37, 'fill'=>color, 'tags'=>['floor1','wall'])
783  TkcLine.new(w,253,34,260,34, 'fill'=>color, 'tags'=>['floor1','wall'])
784  TkcLine.new(w,386,128,386,104, 'fill'=>color, 'tags'=>['floor1','wall'])
785  TkcLine.new(w,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall'])
786  TkcLine.new(w,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall'])
787  TkcLine.new(w,113,152,113,129, 'fill'=>color, 'tags'=>['floor1','wall'])
788end
789
790# floor_fg2 --
791# This method represents part of the floorplan database.  When
792# invoked, it instantiates the foreground information for the second
793# floor (office outlines and numbers).
794#
795# Arguments:
796# w -           The canvas window.
797# color -       Color to use for drawing foreground information.
798
799def floor_fg2(w,color)
800  i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222,
801                     800,222,800,168,748,168,
802                     'fill'=>'', 'tags'=>['floor2','room'])
803  $floorLabels[i.id] = '238'
804  $floorItems['238'] = i
805  TkcText.new(w,774,195, 'text'=>'238', 'fill'=>color,
806              'anchor'=>'c', 'tags'=>['floor2','label'])
807  i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131,
808                     'fill'=>'', 'tags'=>['floor2','room'])
809  $floorLabels[i.id] = '237'
810  $floorItems['237'] = i
811  TkcText.new(w,763,148.5, 'text'=>'237', 'fill'=>color,
812              'anchor'=>'c', 'tags'=>['floor2','label'])
813  i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324,
814                     643,324,643,291,641,291,641,205,696,205,
815                     696,291,694,291,694,314,715,314,715,291,
816                     715,205,755,205,755,190,724,190,724,187,
817                     'fill'=>'', 'tags'=>['floor2','room'])
818  $floorLabels[i.id] = '246'
819  $floorItems['246'] = i
820  TkcText.new(w,600,264, 'text'=>'246', 'fill'=>color,
821              'anchor'=>'c', 'tags'=>['floor2','label'])
822  i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
823                     'fill'=>'', 'tags'=>['floor2','room'])
824  $floorLabels[i.id] = '247'
825  $floorItems['247'] = i
826  TkcText.new(w,668.5,296.5, 'text'=>'247', 'fill'=>color,
827              'anchor'=>'c', 'tags'=>['floor2','label'])
828  i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246,
829                     397,246,397,255,476,255,476,250,482,250,559,250,
830                     559,274,482,274,482,278,396,278,396,274,232,274,
831                     'fill'=>'', 'tags'=>['floor2','room'])
832  $floorLabels[i.id] = '202'
833  $floorItems['202'] = i
834  TkcText.new(w,285.5,260, 'text'=>'202', 'fill'=>color,
835              'anchor'=>'c', 'tags'=>['floor2','label'])
836  i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196,
837                     306,196,306,180,175,180,175,169,156,169,
838                     156,196,176,196,176,228,
839                     'fill'=>'', 'tags'=>['floor2','room'])
840  $floorLabels[i.id] = '206'
841  $floorItems['206'] = i
842  TkcText.new(w,143,267, 'text'=>'206', 'fill'=>color,
843              'anchor'=>'c', 'tags'=>['floor2','label'])
844  i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
845                     'fill'=>'', 'tags'=>['floor2','room'])
846  $floorLabels[i.id] = '212'
847  $floorItems['212'] = i
848  TkcText.new(w,28.5,307.5, 'text'=>'212', 'fill'=>color,
849              'anchor'=>'c', 'tags'=>['floor2','label'])
850  i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
851                     'fill'=>'', 'tags'=>['floor2','room'])
852  $floorLabels[i.id] = '245'
853  $floorItems['245'] = i
854  TkcText.new(w,521.5,300.5, 'text'=>'245', 'fill'=>color,
855              'anchor'=>'c', 'tags'=>['floor2','label'])
856  i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
857                     'fill'=>'', 'tags'=>['floor2','room'])
858  $floorLabels[i.id] = '244'
859  $floorItems['244'] = i
860  TkcText.new(w,579.5,357.5, 'text'=>'244', 'fill'=>color,
861              'anchor'=>'c', 'tags'=>['floor2','label'])
862  i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
863                     'fill'=>'', 'tags'=>['floor2','room'])
864  $floorLabels[i.id] = '243'
865  $floorItems['243'] = i
866  TkcText.new(w,622,357.5, 'text'=>'243', 'fill'=>color,
867              'anchor'=>'c', 'tags'=>['floor2','label'])
868  i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
869                     'fill'=>'', 'tags'=>['floor2','room'])
870  $floorLabels[i.id] = '242'
871  $floorItems['242'] = i
872  TkcText.new(w,666.5,340.5, 'text'=>'242', 'fill'=>color,
873              'anchor'=>'c', 'tags'=>['floor2','label'])
874  i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
875                     'fill'=>'', 'tags'=>['floor2','room'])
876  $floorLabels[i.id] = 'Barbecue Deck'
877  $floorItems['Barbecue Deck'] = i
878  TkcText.new(w,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color,
879              'anchor'=>'c', 'tags'=>['floor2','label'])
880  i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
881                     'fill'=>'', 'tags'=>['floor2','room'])
882  $floorLabels[i.id] = '240'
883  $floorItems['240'] = i
884  TkcText.new(w,736,288, 'text'=>'240', 'fill'=>color,
885              'anchor'=>'c', 'tags'=>['floor2','label'])
886  i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
887                     'fill'=>'', 'tags'=>['floor2','room'])
888  $floorLabels[i.id] = '241'
889  $floorItems['241'] = i
890  TkcText.new(w,722,340.5, 'text'=>'241', 'fill'=>color,
891              'anchor'=>'c', 'tags'=>['floor2','label'])
892  i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
893                     'fill'=>'', 'tags'=>['floor2','room'])
894  $floorLabels[i.id] = '239'
895  $floorItems['239'] = i
896  TkcText.new(w,736,233.5, 'text'=>'239', 'fill'=>color,
897              'anchor'=>'c', 'tags'=>['floor2','label'])
898  i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
899                     'fill'=>'', 'tags'=>['floor2','room'])
900  $floorLabels[i.id] = '248'
901  $floorItems['248'] = i
902  TkcText.new(w,669,241.5, 'text'=>'248', 'fill'=>color,
903              'anchor'=>'c', 'tags'=>['floor2','label'])
904  i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
905                     'fill'=>'', 'tags'=>['floor2','room'])
906  $floorLabels[i.id] = '236'
907  $floorItems['236'] = i
908  TkcText.new(w,700,160, 'text'=>'236', 'fill'=>color,
909              'anchor'=>'c', 'tags'=>['floor2','label'])
910  i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
911                     'fill'=>'', 'tags'=>['floor2','room'])
912  $floorLabels[i.id] = '235'
913  $floorItems['235'] = i
914  TkcText.new(w,651.5,160, 'text'=>'235', 'fill'=>color,
915              'anchor'=>'c', 'tags'=>['floor2','label'])
916  i = TkcPolygon.new(w,626,143,633,143,633,135,572,135,
917                     572,143,579,143,579,185,626,185,
918                     'fill'=>'', 'tags'=>['floor2','room'])
919  $floorLabels[i.id] = '234'
920  $floorItems['234'] = i
921  TkcText.new(w,606,160, 'text'=>'234', 'fill'=>color,
922              'anchor'=>'c', 'tags'=>['floor2','label'])
923  i = TkcPolygon.new(w,557,135,571,135,571,145,578,145,
924                     578,185,527,185,527,131,557,131,
925                     'fill'=>'', 'tags'=>['floor2','room'])
926  $floorLabels[i.id] = '233'
927  $floorItems['233'] = i
928  TkcText.new(w,552.5,158, 'text'=>'233', 'fill'=>color,
929              'anchor'=>'c', 'tags'=>['floor2','label'])
930  i = TkcPolygon.new(w,476,249,557,249,557,205,476,205,
931                     'fill'=>'', 'tags'=>['floor2','room'])
932  $floorLabels[i.id] = '230'
933  $floorItems['230'] = i
934  TkcText.new(w,516.5,227, 'text'=>'230', 'fill'=>color,
935              'anchor'=>'c', 'tags'=>['floor2','label'])
936  i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
937                     'fill'=>'', 'tags'=>['floor2','room'])
938  $floorLabels[i.id] = '232'
939  $floorItems['232'] = i
940  TkcText.new(w,500.5,158, 'text'=>'232', 'fill'=>color,
941              'anchor'=>'c', 'tags'=>['floor2','label'])
942  i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
943                     'fill'=>'', 'tags'=>['floor2','room'])
944  $floorLabels[i.id] = '229'
945  $floorItems['229'] = i
946  TkcText.new(w,485.5,195, 'text'=>'229', 'fill'=>color,
947              'anchor'=>'c', 'tags'=>['floor2','label'])
948  i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
949                     'fill'=>'', 'tags'=>['floor2','room'])
950  $floorLabels[i.id] = '227'
951  $floorItems['227'] = i
952  TkcText.new(w,436.5,185.5, 'text'=>'227', 'fill'=>color,
953              'anchor'=>'c', 'tags'=>['floor2','label'])
954  i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
955                     'fill'=>'', 'tags'=>['floor2','room'])
956  $floorLabels[i.id] = '228'
957  $floorItems['228'] = i
958  TkcText.new(w,436.5,231, 'text'=>'228', 'fill'=>color,
959              'anchor'=>'c', 'tags'=>['floor2','label'])
960  i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
961                     'fill'=>'', 'tags'=>['floor2','room'])
962  $floorLabels[i.id] = '226'
963  $floorItems['226'] = i
964  TkcText.new(w,392,217.5, 'text'=>'226', 'fill'=>color,
965              'anchor'=>'c', 'tags'=>['floor2','label'])
966  i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
967                     'fill'=>'', 'tags'=>['floor2','room'])
968  $floorLabels[i.id] = '225'
969  $floorItems['225'] = i
970  TkcText.new(w,356.5,150, 'text'=>'225', 'fill'=>color,
971              'anchor'=>'c', 'tags'=>['floor2','label'])
972  i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
973                     'fill'=>'', 'tags'=>['floor2','room'])
974  $floorLabels[i.id] = '224'
975  $floorItems['224'] = i
976  TkcText.new(w,270,223.5, 'text'=>'224', 'fill'=>color,
977              'anchor'=>'c', 'tags'=>['floor2','label'])
978  i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
979                     'fill'=>'', 'tags'=>['floor2','room'])
980  $floorLabels[i.id] = '223'
981  $floorItems['223'] = i
982  TkcText.new(w,292,157, 'text'=>'223', 'fill'=>color,
983              'anchor'=>'c', 'tags'=>['floor2','label'])
984  i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
985                     'fill'=>'', 'tags'=>['floor2','room'])
986  $floorLabels[i.id] = '222'
987  $floorItems['222'] = i
988  TkcText.new(w,244.5,157, 'text'=>'222', 'fill'=>color,
989              'anchor'=>'c', 'tags'=>['floor2','label'])
990  i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
991                     'fill'=>'', 'tags'=>['floor2','room'])
992  $floorLabels[i.id] = '221'
993  $floorItems['221'] = i
994  TkcText.new(w,198,157, 'text'=>'221', 'fill'=>color,
995              'anchor'=>'c', 'tags'=>['floor2','label'])
996  i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
997                     'fill'=>'', 'tags'=>['floor2','room'])
998  $floorLabels[i.id] = '204'
999  $floorItems['204'] = i
1000  TkcText.new(w,324,301.5, 'text'=>'204', 'fill'=>color,
1001              'anchor'=>'c', 'tags'=>['floor2','label'])
1002  i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
1003                     'fill'=>'', 'tags'=>['floor2','room'])
1004  $floorLabels[i.id] = '205'
1005  $floorItems['205'] = i
1006  TkcText.new(w,265.5,307, 'text'=>'205', 'fill'=>color,
1007              'anchor'=>'c', 'tags'=>['floor2','label'])
1008  i = TkcPolygon.new(w,256,385,256,340,212,340,212,385,
1009                     'fill'=>'', 'tags'=>['floor2','room'])
1010  $floorLabels[i.id] = '207'
1011  $floorItems['207'] = i
1012  TkcText.new(w,234,362.5, 'text'=>'207', 'fill'=>color,
1013              'anchor'=>'c', 'tags'=>['floor2','label'])
1014  i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
1015                     'fill'=>'', 'tags'=>['floor2','room'])
1016  $floorLabels[i.id] = '208'
1017  $floorItems['208'] = i
1018  TkcText.new(w,187,362.5, 'text'=>'208', 'fill'=>color,
1019              'anchor'=>'c', 'tags'=>['floor2','label'])
1020  i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
1021                     'fill'=>'', 'tags'=>['floor2','room'])
1022  $floorLabels[i.id] = '209'
1023  $floorItems['209'] = i
1024  TkcText.new(w,138.5,362.5, 'text'=>'209', 'fill'=>color,
1025              'anchor'=>'c', 'tags'=>['floor2','label'])
1026  i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
1027                     'fill'=>'', 'tags'=>['floor2','room'])
1028  $floorLabels[i.id] = '217'
1029  $floorItems['217'] = i
1030  TkcText.new(w,71,192, 'text'=>'217', 'fill'=>color,
1031              'anchor'=>'c', 'tags'=>['floor2','label'])
1032  i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
1033                     'fill'=>'', 'tags'=>['floor2','room'])
1034  $floorLabels[i.id] = '217A'
1035  $floorItems['217A'] = i
1036  TkcText.new(w,93,179.5, 'text'=>'217A', 'fill'=>color,
1037              'anchor'=>'c', 'tags'=>['floor2','label'])
1038  i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
1039                     'fill'=>'', 'tags'=>['floor2','room'])
1040  $floorLabels[i.id] = '216'
1041  $floorItems['216'] = i
1042  TkcText.new(w,71,145.5, 'text'=>'216', 'fill'=>color,
1043              'anchor'=>'c', 'tags'=>['floor2','label'])
1044  i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
1045                     'fill'=>'', 'tags'=>['floor2','room'])
1046  $floorLabels[i.id] = '215'
1047  $floorItems['215'] = i
1048  TkcText.new(w,28.5,157, 'text'=>'215', 'fill'=>color,
1049              'anchor'=>'c', 'tags'=>['floor2','label'])
1050  i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
1051                     'fill'=>'', 'tags'=>['floor2','room'])
1052  $floorLabels[i.id] = '214'
1053  $floorItems['214'] = i
1054  TkcText.new(w,28.5,203.5, 'text'=>'214', 'fill'=>color,
1055              'anchor'=>'c', 'tags'=>['floor2','label'])
1056  i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
1057                     'fill'=>'', 'tags'=>['floor2','room'])
1058  $floorLabels[i.id] = '213'
1059  $floorItems['213'] = i
1060  TkcText.new(w,28.5,252, 'text'=>'213', 'fill'=>color,
1061              'anchor'=>'c', 'tags'=>['floor2','label'])
1062  i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
1063                     'fill'=>'', 'tags'=>['floor2','room'])
1064  $floorLabels[i.id] = '210'
1065  $floorItems['210'] = i
1066  TkcText.new(w,90.5,362.5, 'text'=>'210', 'fill'=>color,
1067              'anchor'=>'c', 'tags'=>['floor2','label'])
1068  i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
1069                     'fill'=>'', 'tags'=>['floor2','room'])
1070  $floorLabels[i.id] = '211'
1071  $floorItems['211'] = i
1072  TkcText.new(w,33,364.5, 'text'=>'211', 'fill'=>color,
1073              'anchor'=>'c', 'tags'=>['floor2','label'])
1074  i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
1075                     'fill'=>'', 'tags'=>['floor2','room'])
1076  $floorLabels[i.id] = '203'
1077  $floorItems['203'] = i
1078  TkcText.new(w,367.5,292.5, 'text'=>'203', 'fill'=>color,
1079              'anchor'=>'c', 'tags'=>['floor2','label'])
1080  i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198,
1081                     154,198,154,192,109,192,109,169,99,169,
1082                     'fill'=>'', 'tags'=>['floor2','room'])
1083  $floorLabels[i.id] = '220'
1084  $floorItems['220'] = i
1085  TkcText.new(w,132.5,208.5, 'text'=>'220', 'fill'=>color,
1086              'anchor'=>'c', 'tags'=>['floor2','label'])
1087  i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
1088                     'fill'=>'', 'tags'=>['floor2','room'])
1089  $floorLabels[i.id] = 'Priv Lift2'
1090  $floorItems['Priv Lift2'] = i
1091  TkcText.new(w,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
1092              'anchor'=>'c', 'tags'=>['floor2','label'])
1093  i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
1094                     'fill'=>'', 'tags'=>['floor2','room'])
1095  $floorLabels[i.id] = 'Pub Lift 2'
1096  $floorItems['Pub Lift 2'] = i
1097  TkcText.new(w,323,223, 'text'=>'Pub Lift 2', 'fill'=>color,
1098              'anchor'=>'c', 'tags'=>['floor2','label'])
1099  i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
1100                     'fill'=>'', 'tags'=>['floor2','room'])
1101  $floorLabels[i.id] = '218'
1102  $floorItems['218'] = i
1103  TkcText.new(w,136,149.5, 'text'=>'218', 'fill'=>color,
1104              'anchor'=>'c', 'tags'=>['floor2','label'])
1105  i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
1106                     'fill'=>'', 'tags'=>['floor2','room'])
1107  $floorLabels[i.id] = '219'
1108  $floorItems['219'] = i
1109  TkcText.new(w,132.5,180, 'text'=>'219', 'fill'=>color,
1110              'anchor'=>'c', 'tags'=>['floor2','label'])
1111  i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
1112                     'fill'=>'', 'tags'=>['floor2','room'])
1113  $floorLabels[i.id] = '201'
1114  $floorItems['201'] = i
1115  TkcText.new(w,358,209, 'text'=>'201', 'fill'=>color,
1116              'anchor'=>'c', 'tags'=>['floor2','label'])
1117  TkcLine.new(w,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall'])
1118  TkcLine.new(w,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall'])
1119  TkcLine.new(w,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall'])
1120  TkcLine.new(w,634,144,627,144, 'fill'=>color, 'tags'=>['floor2','wall'])
1121  TkcLine.new(w,572,133,572,144, 'fill'=>color, 'tags'=>['floor2','wall'])
1122  TkcLine.new(w,572,144,579,144, 'fill'=>color, 'tags'=>['floor2','wall'])
1123  TkcLine.new(w,398,129,398,162, 'fill'=>color, 'tags'=>['floor2','wall'])
1124  TkcLine.new(w,174,197,175,197, 'fill'=>color, 'tags'=>['floor2','wall'])
1125  TkcLine.new(w,175,197,175,227, 'fill'=>color, 'tags'=>['floor2','wall'])
1126  TkcLine.new(w,757,206,757,221, 'fill'=>color, 'tags'=>['floor2','wall'])
1127  TkcLine.new(w,396,188,408,188, 'fill'=>color, 'tags'=>['floor2','wall'])
1128  TkcLine.new(w,727,189,725,189, 'fill'=>color, 'tags'=>['floor2','wall'])
1129  TkcLine.new(w,747,167,802,167, 'fill'=>color, 'tags'=>['floor2','wall'])
1130  TkcLine.new(w,747,167,747,189, 'fill'=>color, 'tags'=>['floor2','wall'])
1131  TkcLine.new(w,755,189,739,189, 'fill'=>color, 'tags'=>['floor2','wall'])
1132  TkcLine.new(w,769,224,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
1133  TkcLine.new(w,802,224,802,129, 'fill'=>color, 'tags'=>['floor2','wall'])
1134  TkcLine.new(w,802,129,725,129, 'fill'=>color, 'tags'=>['floor2','wall'])
1135  TkcLine.new(w,725,189,725,129, 'fill'=>color, 'tags'=>['floor2','wall'])
1136  TkcLine.new(w,725,186,690,186, 'fill'=>color, 'tags'=>['floor2','wall'])
1137  TkcLine.new(w,676,133,676,186, 'fill'=>color, 'tags'=>['floor2','wall'])
1138  TkcLine.new(w,627,144,627,186, 'fill'=>color, 'tags'=>['floor2','wall'])
1139  TkcLine.new(w,629,186,593,186, 'fill'=>color, 'tags'=>['floor2','wall'])
1140  TkcLine.new(w,579,144,579,186, 'fill'=>color, 'tags'=>['floor2','wall'])
1141  TkcLine.new(w,559,129,559,133, 'fill'=>color, 'tags'=>['floor2','wall'])
1142  TkcLine.new(w,725,133,559,133, 'fill'=>color, 'tags'=>['floor2','wall'])
1143  TkcLine.new(w,484,162,484,129, 'fill'=>color, 'tags'=>['floor2','wall'])
1144  TkcLine.new(w,559,129,484,129, 'fill'=>color, 'tags'=>['floor2','wall'])
1145  TkcLine.new(w,526,129,526,186, 'fill'=>color, 'tags'=>['floor2','wall'])
1146  TkcLine.new(w,540,186,581,186, 'fill'=>color, 'tags'=>['floor2','wall'])
1147  TkcLine.new(w,528,186,523,186, 'fill'=>color, 'tags'=>['floor2','wall'])
1148  TkcLine.new(w,511,186,475,186, 'fill'=>color, 'tags'=>['floor2','wall'])
1149  TkcLine.new(w,496,190,496,186, 'fill'=>color, 'tags'=>['floor2','wall'])
1150  TkcLine.new(w,496,205,496,202, 'fill'=>color, 'tags'=>['floor2','wall'])
1151  TkcLine.new(w,475,205,527,205, 'fill'=>color, 'tags'=>['floor2','wall'])
1152  TkcLine.new(w,558,205,539,205, 'fill'=>color, 'tags'=>['floor2','wall'])
1153  TkcLine.new(w,558,205,558,249, 'fill'=>color, 'tags'=>['floor2','wall'])
1154  TkcLine.new(w,558,249,475,249, 'fill'=>color, 'tags'=>['floor2','wall'])
1155  TkcLine.new(w,662,206,642,206, 'fill'=>color, 'tags'=>['floor2','wall'])
1156  TkcLine.new(w,695,206,675,206, 'fill'=>color, 'tags'=>['floor2','wall'])
1157  TkcLine.new(w,695,278,642,278, 'fill'=>color, 'tags'=>['floor2','wall'])
1158  TkcLine.new(w,642,291,642,206, 'fill'=>color, 'tags'=>['floor2','wall'])
1159  TkcLine.new(w,695,291,695,206, 'fill'=>color, 'tags'=>['floor2','wall'])
1160  TkcLine.new(w,716,208,716,206, 'fill'=>color, 'tags'=>['floor2','wall'])
1161  TkcLine.new(w,757,206,716,206, 'fill'=>color, 'tags'=>['floor2','wall'])
1162  TkcLine.new(w,757,221,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
1163  TkcLine.new(w,793,224,802,224, 'fill'=>color, 'tags'=>['floor2','wall'])
1164  TkcLine.new(w,757,262,716,262, 'fill'=>color, 'tags'=>['floor2','wall'])
1165  TkcLine.new(w,716,220,716,264, 'fill'=>color, 'tags'=>['floor2','wall'])
1166  TkcLine.new(w,716,315,716,276, 'fill'=>color, 'tags'=>['floor2','wall'])
1167  TkcLine.new(w,757,315,703,315, 'fill'=>color, 'tags'=>['floor2','wall'])
1168  TkcLine.new(w,757,325,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
1169  TkcLine.new(w,757,367,644,367, 'fill'=>color, 'tags'=>['floor2','wall'])
1170  TkcLine.new(w,689,367,689,315, 'fill'=>color, 'tags'=>['floor2','wall'])
1171  TkcLine.new(w,647,315,644,315, 'fill'=>color, 'tags'=>['floor2','wall'])
1172  TkcLine.new(w,659,315,691,315, 'fill'=>color, 'tags'=>['floor2','wall'])
1173  TkcLine.new(w,600,325,600,391, 'fill'=>color, 'tags'=>['floor2','wall'])
1174  TkcLine.new(w,627,325,644,325, 'fill'=>color, 'tags'=>['floor2','wall'])
1175  TkcLine.new(w,644,391,644,315, 'fill'=>color, 'tags'=>['floor2','wall'])
1176  TkcLine.new(w,615,325,575,325, 'fill'=>color, 'tags'=>['floor2','wall'])
1177  TkcLine.new(w,644,391,558,391, 'fill'=>color, 'tags'=>['floor2','wall'])
1178  TkcLine.new(w,563,325,558,325, 'fill'=>color, 'tags'=>['floor2','wall'])
1179  TkcLine.new(w,558,391,558,314, 'fill'=>color, 'tags'=>['floor2','wall'])
1180  TkcLine.new(w,558,327,508,327, 'fill'=>color, 'tags'=>['floor2','wall'])
1181  TkcLine.new(w,558,275,484,275, 'fill'=>color, 'tags'=>['floor2','wall'])
1182  TkcLine.new(w,558,302,558,275, 'fill'=>color, 'tags'=>['floor2','wall'])
1183  TkcLine.new(w,508,327,508,311, 'fill'=>color, 'tags'=>['floor2','wall'])
1184  TkcLine.new(w,484,311,508,311, 'fill'=>color, 'tags'=>['floor2','wall'])
1185  TkcLine.new(w,484,275,484,311, 'fill'=>color, 'tags'=>['floor2','wall'])
1186  TkcLine.new(w,475,208,408,208, 'fill'=>color, 'tags'=>['floor2','wall'])
1187  TkcLine.new(w,408,206,408,210, 'fill'=>color, 'tags'=>['floor2','wall'])
1188  TkcLine.new(w,408,222,408,227, 'fill'=>color, 'tags'=>['floor2','wall'])
1189  TkcLine.new(w,408,227,398,227, 'fill'=>color, 'tags'=>['floor2','wall'])
1190  TkcLine.new(w,398,227,398,254, 'fill'=>color, 'tags'=>['floor2','wall'])
1191  TkcLine.new(w,408,188,408,194, 'fill'=>color, 'tags'=>['floor2','wall'])
1192  TkcLine.new(w,383,188,376,188, 'fill'=>color, 'tags'=>['floor2','wall'])
1193  TkcLine.new(w,398,188,398,162, 'fill'=>color, 'tags'=>['floor2','wall'])
1194  TkcLine.new(w,398,162,484,162, 'fill'=>color, 'tags'=>['floor2','wall'])
1195  TkcLine.new(w,475,162,475,254, 'fill'=>color, 'tags'=>['floor2','wall'])
1196  TkcLine.new(w,398,254,475,254, 'fill'=>color, 'tags'=>['floor2','wall'])
1197  TkcLine.new(w,484,280,395,280, 'fill'=>color, 'tags'=>['floor2','wall'])
1198  TkcLine.new(w,395,311,395,275, 'fill'=>color, 'tags'=>['floor2','wall'])
1199  TkcLine.new(w,307,197,293,197, 'fill'=>color, 'tags'=>['floor2','wall'])
1200  TkcLine.new(w,278,197,233,197, 'fill'=>color, 'tags'=>['floor2','wall'])
1201  TkcLine.new(w,233,197,233,249, 'fill'=>color, 'tags'=>['floor2','wall'])
1202  TkcLine.new(w,307,179,284,179, 'fill'=>color, 'tags'=>['floor2','wall'])
1203  TkcLine.new(w,233,249,278,249, 'fill'=>color, 'tags'=>['floor2','wall'])
1204  TkcLine.new(w,269,179,269,133, 'fill'=>color, 'tags'=>['floor2','wall'])
1205  TkcLine.new(w,220,179,220,133, 'fill'=>color, 'tags'=>['floor2','wall'])
1206  TkcLine.new(w,155,191,110,191, 'fill'=>color, 'tags'=>['floor2','wall'])
1207  TkcLine.new(w,90,190,98,190, 'fill'=>color, 'tags'=>['floor2','wall'])
1208  TkcLine.new(w,98,169,98,190, 'fill'=>color, 'tags'=>['floor2','wall'])
1209  TkcLine.new(w,52,133,52,165, 'fill'=>color, 'tags'=>['floor2','wall'])
1210  TkcLine.new(w,52,214,52,177, 'fill'=>color, 'tags'=>['floor2','wall'])
1211  TkcLine.new(w,52,226,52,262, 'fill'=>color, 'tags'=>['floor2','wall'])
1212  TkcLine.new(w,52,274,52,276, 'fill'=>color, 'tags'=>['floor2','wall'])
1213  TkcLine.new(w,234,275,234,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1214  TkcLine.new(w,226,339,258,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1215  TkcLine.new(w,211,387,211,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1216  TkcLine.new(w,214,339,177,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1217  TkcLine.new(w,258,387,60,387, 'fill'=>color, 'tags'=>['floor2','wall'])
1218  TkcLine.new(w,3,133,3,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1219  TkcLine.new(w,165,339,129,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1220  TkcLine.new(w,117,339,80,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1221  TkcLine.new(w,68,339,59,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1222  TkcLine.new(w,0,339,46,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1223  TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor2','wall'])
1224  TkcLine.new(w,0,339,0,391, 'fill'=>color, 'tags'=>['floor2','wall'])
1225  TkcLine.new(w,60,387,60,391, 'fill'=>color, 'tags'=>['floor2','wall'])
1226  TkcLine.new(w,258,329,258,387, 'fill'=>color, 'tags'=>['floor2','wall'])
1227  TkcLine.new(w,350,329,258,329, 'fill'=>color, 'tags'=>['floor2','wall'])
1228  TkcLine.new(w,395,311,350,311, 'fill'=>color, 'tags'=>['floor2','wall'])
1229  TkcLine.new(w,398,129,315,129, 'fill'=>color, 'tags'=>['floor2','wall'])
1230  TkcLine.new(w,176,133,315,133, 'fill'=>color, 'tags'=>['floor2','wall'])
1231  TkcLine.new(w,176,129,96,129, 'fill'=>color, 'tags'=>['floor2','wall'])
1232  TkcLine.new(w,3,133,96,133, 'fill'=>color, 'tags'=>['floor2','wall'])
1233  TkcLine.new(w,66,387,66,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1234  TkcLine.new(w,115,387,115,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1235  TkcLine.new(w,163,387,163,339, 'fill'=>color, 'tags'=>['floor2','wall'])
1236  TkcLine.new(w,234,275,276,275, 'fill'=>color, 'tags'=>['floor2','wall'])
1237  TkcLine.new(w,288,275,309,275, 'fill'=>color, 'tags'=>['floor2','wall'])
1238  TkcLine.new(w,298,275,298,329, 'fill'=>color, 'tags'=>['floor2','wall'])
1239  TkcLine.new(w,341,283,350,283, 'fill'=>color, 'tags'=>['floor2','wall'])
1240  TkcLine.new(w,321,275,341,275, 'fill'=>color, 'tags'=>['floor2','wall'])
1241  TkcLine.new(w,375,275,395,275, 'fill'=>color, 'tags'=>['floor2','wall'])
1242  TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor2','wall'])
1243  TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor2','wall'])
1244  TkcLine.new(w,307,250,307,170, 'fill'=>color, 'tags'=>['floor2','wall'])
1245  TkcLine.new(w,376,245,376,170, 'fill'=>color, 'tags'=>['floor2','wall'])
1246  TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor2','wall'])
1247  TkcLine.new(w,340,245,340,224, 'fill'=>color, 'tags'=>['floor2','wall'])
1248  TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor2','wall'])
1249  TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor2','wall'])
1250  TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor2','wall'])
1251  TkcLine.new(w,293,250,307,250, 'fill'=>color, 'tags'=>['floor2','wall'])
1252  TkcLine.new(w,271,179,238,179, 'fill'=>color, 'tags'=>['floor2','wall'])
1253  TkcLine.new(w,226,179,195,179, 'fill'=>color, 'tags'=>['floor2','wall'])
1254  TkcLine.new(w,176,129,176,179, 'fill'=>color, 'tags'=>['floor2','wall'])
1255  TkcLine.new(w,182,179,176,179, 'fill'=>color, 'tags'=>['floor2','wall'])
1256  TkcLine.new(w,174,169,176,169, 'fill'=>color, 'tags'=>['floor2','wall'])
1257  TkcLine.new(w,162,169,90,169, 'fill'=>color, 'tags'=>['floor2','wall'])
1258  TkcLine.new(w,96,169,96,129, 'fill'=>color, 'tags'=>['floor2','wall'])
1259  TkcLine.new(w,175,227,90,227, 'fill'=>color, 'tags'=>['floor2','wall'])
1260  TkcLine.new(w,90,190,90,227, 'fill'=>color, 'tags'=>['floor2','wall'])
1261  TkcLine.new(w,52,179,3,179, 'fill'=>color, 'tags'=>['floor2','wall'])
1262  TkcLine.new(w,52,228,3,228, 'fill'=>color, 'tags'=>['floor2','wall'])
1263  TkcLine.new(w,52,276,3,276, 'fill'=>color, 'tags'=>['floor2','wall'])
1264  TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor2','wall'])
1265  TkcLine.new(w,110,191,110,169, 'fill'=>color, 'tags'=>['floor2','wall'])
1266  TkcLine.new(w,155,189,155,197, 'fill'=>color, 'tags'=>['floor2','wall'])
1267  TkcLine.new(w,350,283,350,329, 'fill'=>color, 'tags'=>['floor2','wall'])
1268  TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor2','wall'])
1269  TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor2','wall'])
1270end
1271
1272# floor_fg3 --
1273# This method represents part of the floorplan database.  When
1274# invoked, it instantiates the foreground information for the third
1275# floor (office outlines and numbers).
1276#
1277# Arguments:
1278# w -           The canvas window.
1279# color -       Color to use for drawing foreground information.
1280
1281def floor_fg3(w,color)
1282  i = TkcPolygon.new(w,89,228,89,180,70,180,70,228,
1283                     'fill'=>'', 'tags'=>['floor3','room'])
1284  $floorLabels[i.id] = '316'
1285  $floorItems['316'] = i
1286  TkcText.new(w,79.5,204, 'text'=>'316', 'fill'=>color,
1287              'anchor'=>'c', 'tags'=>['floor3','label'])
1288  i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
1289                     'fill'=>'', 'tags'=>['floor3','room'])
1290  $floorLabels[i.id] = '309'
1291  $floorItems['309'] = i
1292  TkcText.new(w,138.5,345.5, 'text'=>'309', 'fill'=>color,
1293              'anchor'=>'c', 'tags'=>['floor3','label'])
1294  i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
1295                     'fill'=>'', 'tags'=>['floor3','room'])
1296  $floorLabels[i.id] = '308'
1297  $floorItems['308'] = i
1298  TkcText.new(w,187.5,345.5, 'text'=>'308', 'fill'=>color,
1299              'anchor'=>'c', 'tags'=>['floor3','label'])
1300  i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
1301                     'fill'=>'', 'tags'=>['floor3','room'])
1302  $floorLabels[i.id] = '307'
1303  $floorItems['307'] = i
1304  TkcText.new(w,234,345.5, 'text'=>'307', 'fill'=>color,
1305              'anchor'=>'c', 'tags'=>['floor3','label'])
1306  i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
1307                     'fill'=>'', 'tags'=>['floor3','room'])
1308  $floorLabels[i.id] = '305'
1309  $floorItems['305'] = i
1310  TkcText.new(w,270.5,301.5, 'text'=>'305', 'fill'=>color,
1311              'anchor'=>'c', 'tags'=>['floor3','label'])
1312  i = TkcPolygon.new(w,251,219,251,203,244,203,244,219,
1313                     'fill'=>'', 'tags'=>['floor3','room'])
1314  $floorLabels[i.id] = '324B'
1315  $floorItems['324B'] = i
1316  TkcText.new(w,247.5,211, 'text'=>'324B', 'fill'=>color,
1317              'anchor'=>'c', 'tags'=>['floor3','label'])
1318  i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
1319                     'fill'=>'', 'tags'=>['floor3','room'])
1320  $floorLabels[i.id] = '324A'
1321  $floorItems['324A'] = i
1322  TkcText.new(w,247.5,240.5, 'text'=>'324A', 'fill'=>color,
1323              'anchor'=>'c', 'tags'=>['floor3','label'])
1324  i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
1325                     'fill'=>'', 'tags'=>['floor3','room'])
1326  $floorLabels[i.id] = '320'
1327  $floorItems['320'] = i
1328  TkcText.new(w,200,157, 'text'=>'320', 'fill'=>color,
1329              'anchor'=>'c', 'tags'=>['floor3','label'])
1330  i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
1331                     'fill'=>'', 'tags'=>['floor3','room'])
1332  $floorLabels[i.id] = '310'
1333  $floorItems['310'] = i
1334  TkcText.new(w,90.5,345.5, 'text'=>'310', 'fill'=>color,
1335              'anchor'=>'c', 'tags'=>['floor3','label'])
1336  i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
1337                     'fill'=>'', 'tags'=>['floor3','room'])
1338  $floorLabels[i.id] = '312'
1339  $floorItems['312'] = i
1340  TkcText.new(w,45.5,299, 'text'=>'312', 'fill'=>color,
1341              'anchor'=>'c', 'tags'=>['floor3','label'])
1342  i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
1343                     'fill'=>'', 'tags'=>['floor3','room'])
1344  $floorLabels[i.id] = '313'
1345  $floorItems['313'] = i
1346  TkcText.new(w,45.5,252, 'text'=>'313', 'fill'=>color,
1347              'anchor'=>'c', 'tags'=>['floor3','label'])
1348  i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
1349                     'fill'=>'', 'tags'=>['floor3','room'])
1350  $floorLabels[i.id] = '314'
1351  $floorItems['314'] = i
1352  TkcText.new(w,40.5,203.5, 'text'=>'314', 'fill'=>color,
1353              'anchor'=>'c', 'tags'=>['floor3','label'])
1354  i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
1355                     'fill'=>'', 'tags'=>['floor3','room'])
1356  $floorLabels[i.id] = '315'
1357  $floorItems['315'] = i
1358  TkcText.new(w,59,157, 'text'=>'315', 'fill'=>color,
1359              'anchor'=>'c', 'tags'=>['floor3','label'])
1360  i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
1361                     'fill'=>'', 'tags'=>['floor3','room'])
1362  $floorLabels[i.id] = '316B'
1363  $floorItems['316B'] = i
1364  TkcText.new(w,95,215, 'text'=>'316B', 'fill'=>color,
1365              'anchor'=>'c', 'tags'=>['floor3','label'])
1366  i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
1367                     'fill'=>'', 'tags'=>['floor3','room'])
1368  $floorLabels[i.id] = '316A'
1369  $floorItems['316A'] = i
1370  TkcText.new(w,95,191, 'text'=>'316A', 'fill'=>color,
1371              'anchor'=>'c', 'tags'=>['floor3','label'])
1372  i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198,
1373                     174,198,174,226,101,226,101,179,97,179,
1374                     'fill'=>'', 'tags'=>['floor3','room'])
1375  $floorLabels[i.id] = '319'
1376  $floorItems['319'] = i
1377  TkcText.new(w,141.5,209, 'text'=>'319', 'fill'=>color,
1378              'anchor'=>'c', 'tags'=>['floor3','label'])
1379  i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323,
1380                     'fill'=>'', 'tags'=>['floor3','room'])
1381  $floorLabels[i.id] = '311'
1382  $floorItems['311'] = i
1383  TkcText.new(w,29.5,361, 'text'=>'311', 'fill'=>color,
1384              'anchor'=>'c', 'tags'=>['floor3','label'])
1385  i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
1386                     'fill'=>'', 'tags'=>['floor3','room'])
1387  $floorLabels[i.id] = '318'
1388  $floorItems['318'] = i
1389  TkcText.new(w,132.5,180, 'text'=>'318', 'fill'=>color,
1390              'anchor'=>'c', 'tags'=>['floor3','label'])
1391  i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
1392                     'fill'=>'', 'tags'=>['floor3','room'])
1393  $floorLabels[i.id] = '317'
1394  $floorItems['317'] = i
1395  TkcText.new(w,136,149.5, 'text'=>'317', 'fill'=>color,
1396              'anchor'=>'c', 'tags'=>['floor3','label'])
1397  i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
1398                     'fill'=>'', 'tags'=>['floor3','room'])
1399  $floorLabels[i.id] = '323'
1400  $floorItems['323'] = i
1401  TkcText.new(w,290,207.5, 'text'=>'323', 'fill'=>color,
1402              'anchor'=>'c', 'tags'=>['floor3','label'])
1403  i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
1404                     'fill'=>'', 'tags'=>['floor3','room'])
1405  $floorLabels[i.id] = '325'
1406  $floorItems['325'] = i
1407  TkcText.new(w,290,235.5, 'text'=>'325', 'fill'=>color,
1408              'anchor'=>'c', 'tags'=>['floor3','label'])
1409  i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
1410                     'fill'=>'', 'tags'=>['floor3','room'])
1411  $floorLabels[i.id] = '321'
1412  $floorItems['321'] = i
1413  TkcText.new(w,243.5,157, 'text'=>'321', 'fill'=>color,
1414              'anchor'=>'c', 'tags'=>['floor3','label'])
1415  i = TkcPolygon.new(w,314,169,306,169,306,192,273,192,
1416                     264,181,264,135,314,135,
1417                     'fill'=>'', 'tags'=>['floor3','room'])
1418  $floorLabels[i.id] = '322'
1419  $floorItems['322'] = i
1420  TkcText.new(w,293.5,163.5, 'text'=>'322', 'fill'=>color,
1421              'anchor'=>'c', 'tags'=>['floor3','label'])
1422  i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
1423                     'fill'=>'', 'tags'=>['floor3','room'])
1424  $floorLabels[i.id] = 'Pub Lift3'
1425  $floorItems['Pub Lift3'] = i
1426  TkcText.new(w,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
1427              'anchor'=>'c', 'tags'=>['floor3','label'])
1428  i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
1429                     'fill'=>'', 'tags'=>['floor3','room'])
1430  $floorLabels[i.id] = 'Priv Lift3'
1431  $floorItems['Priv Lift3'] = i
1432  TkcText.new(w,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
1433              'anchor'=>'c', 'tags'=>['floor3','label'])
1434  i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
1435                     'fill'=>'', 'tags'=>['floor3','room'])
1436  $floorLabels[i.id] = '303'
1437  $floorItems['303'] = i
1438  TkcText.new(w,373.5,292.5, 'text'=>'303', 'fill'=>color,
1439              'anchor'=>'c', 'tags'=>['floor3','label'])
1440  i = TkcPolygon.new(w,272,203,272,249,252,249,252,230,
1441                     244,230,244,221,252,221,252,203,
1442                     'fill'=>'', 'tags'=>['floor3','room'])
1443  $floorLabels[i.id] = '324'
1444  $floorItems['324'] = i
1445  TkcText.new(w,262,226, 'text'=>'324', 'fill'=>color,
1446              'anchor'=>'c', 'tags'=>['floor3','label'])
1447  i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
1448                     'fill'=>'', 'tags'=>['floor3','room'])
1449  $floorLabels[i.id] = '304'
1450  $floorItems['304'] = i
1451  TkcText.new(w,324,301.5, 'text'=>'304', 'fill'=>color,
1452              'anchor'=>'c', 'tags'=>['floor3','label'])
1453  i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
1454                     'fill'=>'', 'tags'=>['floor3','room'])
1455  $floorLabels[i.id] = '301'
1456  $floorItems['301'] = i
1457  TkcText.new(w,358,209, 'text'=>'301', 'fill'=>color,
1458              'anchor'=>'c', 'tags'=>['floor3','label'])
1459  i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
1460                     'fill'=>'', 'tags'=>['floor3','room'])
1461  $floorLabels[i.id] = '327'
1462  $floorItems['327'] = i
1463  TkcText.new(w,387,215.5, 'text'=>'327', 'fill'=>color,
1464              'anchor'=>'c', 'tags'=>['floor3','label'])
1465  i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
1466                     'fill'=>'', 'tags'=>['floor3','room'])
1467  $floorLabels[i.id] = '326'
1468  $floorItems['326'] = i
1469  TkcText.new(w,365.5,150, 'text'=>'326', 'fill'=>color,
1470              'anchor'=>'c', 'tags'=>['floor3','label'])
1471  i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282,
1472                     375,274,397,274,397,248,339,248,339,242,308,242,
1473                     'fill'=>'', 'tags'=>['floor3','room'])
1474  $floorLabels[i.id] = '302'
1475  $floorItems['302'] = i
1476  TkcText.new(w,319.5,261, 'text'=>'302', 'fill'=>color,
1477              'anchor'=>'c', 'tags'=>['floor3','label'])
1478  i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203,
1479                     272,193,263,180,242,180,175,180,175,169,156,169,
1480                     156,196,177,196,177,228,107,228,70,228,70,275,107,275,
1481                     107,248,160,248,160,301,107,301,107,275,70,275,
1482                     'fill'=>'', 'tags'=>['floor3','room'])
1483  $floorLabels[i.id] = '306'
1484  $floorItems['306'] = i
1485  TkcText.new(w,200.5,284.5, 'text'=>'306', 'fill'=>color,
1486              'anchor'=>'c', 'tags'=>['floor3','label'])
1487  TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall'])
1488  TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall'])
1489  TkcLine.new(w,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall'])
1490  TkcLine.new(w,399,129,399,311, 'fill'=>color, 'tags'=>['floor3','wall'])
1491  TkcLine.new(w,258,202,243,202, 'fill'=>color, 'tags'=>['floor3','wall'])
1492  TkcLine.new(w,350,283,350,329, 'fill'=>color, 'tags'=>['floor3','wall'])
1493  TkcLine.new(w,251,231,243,231, 'fill'=>color, 'tags'=>['floor3','wall'])
1494  TkcLine.new(w,243,220,251,220, 'fill'=>color, 'tags'=>['floor3','wall'])
1495  TkcLine.new(w,243,250,243,202, 'fill'=>color, 'tags'=>['floor3','wall'])
1496  TkcLine.new(w,155,197,155,190, 'fill'=>color, 'tags'=>['floor3','wall'])
1497  TkcLine.new(w,110,192,110,169, 'fill'=>color, 'tags'=>['floor3','wall'])
1498  TkcLine.new(w,155,192,110,192, 'fill'=>color, 'tags'=>['floor3','wall'])
1499  TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor3','wall'])
1500  TkcLine.new(w,176,197,176,227, 'fill'=>color, 'tags'=>['floor3','wall'])
1501  TkcLine.new(w,69,280,69,274, 'fill'=>color, 'tags'=>['floor3','wall'])
1502  TkcLine.new(w,21,276,69,276, 'fill'=>color, 'tags'=>['floor3','wall'])
1503  TkcLine.new(w,69,262,69,226, 'fill'=>color, 'tags'=>['floor3','wall'])
1504  TkcLine.new(w,21,228,69,228, 'fill'=>color, 'tags'=>['floor3','wall'])
1505  TkcLine.new(w,21,179,75,179, 'fill'=>color, 'tags'=>['floor3','wall'])
1506  TkcLine.new(w,69,179,69,214, 'fill'=>color, 'tags'=>['floor3','wall'])
1507  TkcLine.new(w,90,220,90,227, 'fill'=>color, 'tags'=>['floor3','wall'])
1508  TkcLine.new(w,90,204,90,202, 'fill'=>color, 'tags'=>['floor3','wall'])
1509  TkcLine.new(w,90,203,100,203, 'fill'=>color, 'tags'=>['floor3','wall'])
1510  TkcLine.new(w,90,187,90,179, 'fill'=>color, 'tags'=>['floor3','wall'])
1511  TkcLine.new(w,90,227,176,227, 'fill'=>color, 'tags'=>['floor3','wall'])
1512  TkcLine.new(w,100,179,100,227, 'fill'=>color, 'tags'=>['floor3','wall'])
1513  TkcLine.new(w,100,179,87,179, 'fill'=>color, 'tags'=>['floor3','wall'])
1514  TkcLine.new(w,96,179,96,129, 'fill'=>color, 'tags'=>['floor3','wall'])
1515  TkcLine.new(w,162,169,96,169, 'fill'=>color, 'tags'=>['floor3','wall'])
1516  TkcLine.new(w,173,169,176,169, 'fill'=>color, 'tags'=>['floor3','wall'])
1517  TkcLine.new(w,182,179,176,179, 'fill'=>color, 'tags'=>['floor3','wall'])
1518  TkcLine.new(w,176,129,176,179, 'fill'=>color, 'tags'=>['floor3','wall'])
1519  TkcLine.new(w,195,179,226,179, 'fill'=>color, 'tags'=>['floor3','wall'])
1520  TkcLine.new(w,224,133,224,179, 'fill'=>color, 'tags'=>['floor3','wall'])
1521  TkcLine.new(w,264,179,264,133, 'fill'=>color, 'tags'=>['floor3','wall'])
1522  TkcLine.new(w,238,179,264,179, 'fill'=>color, 'tags'=>['floor3','wall'])
1523  TkcLine.new(w,273,207,273,193, 'fill'=>color, 'tags'=>['floor3','wall'])
1524  TkcLine.new(w,273,235,273,250, 'fill'=>color, 'tags'=>['floor3','wall'])
1525  TkcLine.new(w,273,224,273,219, 'fill'=>color, 'tags'=>['floor3','wall'])
1526  TkcLine.new(w,273,193,307,193, 'fill'=>color, 'tags'=>['floor3','wall'])
1527  TkcLine.new(w,273,222,307,222, 'fill'=>color, 'tags'=>['floor3','wall'])
1528  TkcLine.new(w,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall'])
1529  TkcLine.new(w,384,247,376,247, 'fill'=>color, 'tags'=>['floor3','wall'])
1530  TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor3','wall'])
1531  TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor3','wall'])
1532  TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor3','wall'])
1533  TkcLine.new(w,340,247,340,224, 'fill'=>color, 'tags'=>['floor3','wall'])
1534  TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor3','wall'])
1535  TkcLine.new(w,376,247,376,170, 'fill'=>color, 'tags'=>['floor3','wall'])
1536  TkcLine.new(w,307,250,307,170, 'fill'=>color, 'tags'=>['floor3','wall'])
1537  TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor3','wall'])
1538  TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor3','wall'])
1539  TkcLine.new(w,376,283,366,283, 'fill'=>color, 'tags'=>['floor3','wall'])
1540  TkcLine.new(w,376,283,376,275, 'fill'=>color, 'tags'=>['floor3','wall'])
1541  TkcLine.new(w,399,275,376,275, 'fill'=>color, 'tags'=>['floor3','wall'])
1542  TkcLine.new(w,341,275,320,275, 'fill'=>color, 'tags'=>['floor3','wall'])
1543  TkcLine.new(w,341,283,350,283, 'fill'=>color, 'tags'=>['floor3','wall'])
1544  TkcLine.new(w,298,275,298,329, 'fill'=>color, 'tags'=>['floor3','wall'])
1545  TkcLine.new(w,308,275,298,275, 'fill'=>color, 'tags'=>['floor3','wall'])
1546  TkcLine.new(w,243,322,243,275, 'fill'=>color, 'tags'=>['floor3','wall'])
1547  TkcLine.new(w,243,275,284,275, 'fill'=>color, 'tags'=>['floor3','wall'])
1548  TkcLine.new(w,258,322,226,322, 'fill'=>color, 'tags'=>['floor3','wall'])
1549  TkcLine.new(w,212,370,212,322, 'fill'=>color, 'tags'=>['floor3','wall'])
1550  TkcLine.new(w,214,322,177,322, 'fill'=>color, 'tags'=>['floor3','wall'])
1551  TkcLine.new(w,163,370,163,322, 'fill'=>color, 'tags'=>['floor3','wall'])
1552  TkcLine.new(w,165,322,129,322, 'fill'=>color, 'tags'=>['floor3','wall'])
1553  TkcLine.new(w,84,322,117,322, 'fill'=>color, 'tags'=>['floor3','wall'])
1554  TkcLine.new(w,71,322,64,322, 'fill'=>color, 'tags'=>['floor3','wall'])
1555  TkcLine.new(w,115,322,115,370, 'fill'=>color, 'tags'=>['floor3','wall'])
1556  TkcLine.new(w,66,322,66,370, 'fill'=>color, 'tags'=>['floor3','wall'])
1557  TkcLine.new(w,52,322,21,322, 'fill'=>color, 'tags'=>['floor3','wall'])
1558  TkcLine.new(w,21,331,0,331, 'fill'=>color, 'tags'=>['floor3','wall'])
1559  TkcLine.new(w,21,331,21,133, 'fill'=>color, 'tags'=>['floor3','wall'])
1560  TkcLine.new(w,96,133,21,133, 'fill'=>color, 'tags'=>['floor3','wall'])
1561  TkcLine.new(w,176,129,96,129, 'fill'=>color, 'tags'=>['floor3','wall'])
1562  TkcLine.new(w,315,133,176,133, 'fill'=>color, 'tags'=>['floor3','wall'])
1563  TkcLine.new(w,315,129,399,129, 'fill'=>color, 'tags'=>['floor3','wall'])
1564  TkcLine.new(w,399,311,350,311, 'fill'=>color, 'tags'=>['floor3','wall'])
1565  TkcLine.new(w,350,329,258,329, 'fill'=>color, 'tags'=>['floor3','wall'])
1566  TkcLine.new(w,258,322,258,370, 'fill'=>color, 'tags'=>['floor3','wall'])
1567  TkcLine.new(w,60,370,258,370, 'fill'=>color, 'tags'=>['floor3','wall'])
1568  TkcLine.new(w,60,370,60,391, 'fill'=>color, 'tags'=>['floor3','wall'])
1569  TkcLine.new(w,0,391,0,331, 'fill'=>color, 'tags'=>['floor3','wall'])
1570  TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor3','wall'])
1571  TkcLine.new(w,307,250,307,242, 'fill'=>color, 'tags'=>['floor3','wall'])
1572  TkcLine.new(w,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall'])
1573  TkcLine.new(w,258,250,243,250, 'fill'=>color, 'tags'=>['floor3','wall'])
1574end
1575
1576# Below is the "main program" that creates the floorplan demonstration.
1577
1578# toplevel widget
1579if defined?($floor_demo) && $floor_demo
1580  $floor_demo.destroy
1581  $floor_demo = nil
1582end
1583
1584# demo toplevel widget
1585$floor_demo = TkToplevel.new {|w|
1586  title("Floorplan Canvas Demonstration")
1587  iconname("Floorplan")
1588  positionWindow(w)
1589  geometry('+20+20')
1590  minsize(100,100)
1591}
1592
1593base_frame = TkFrame.new($floor_demo).pack(:fill=>:both, :expand=>true)
1594
1595# label
1596TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
1597            'text'=>"This window contains a canvas widget showing the floorplan of Digital Equipment Corporation's Western Research Laboratory.  It has three levels.  At any given time one of the levels is active, meaning that you can see its room structure.  To activate a level, click the left mouse button anywhere on it.  As the mouse moves over the active level, the room under the mouse lights up and its room number appears in the \"Room:\" entry.  You can also type a room number in the entry and the room will light up."){
1598  pack('side'=>'top')
1599}
1600
1601# frame
1602$floor_buttons = TkFrame.new(base_frame) {|frame|
1603  TkButton.new(frame) {
1604    text 'Dismiss'
1605    command proc{
1606      tmppath = $floor_demo
1607      $floor_demo = nil
1608      tmppath.destroy
1609    }
1610  }.pack('side'=>'left', 'expand'=>'yes')
1611
1612  TkButton.new(frame) {
1613    text 'Show Code'
1614    command proc{showCode 'floor'}
1615  }.pack('side'=>'left', 'expand'=>'yes')
1616}
1617$floor_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
1618
1619#
1620$floorLabels = {}
1621$floorItems = {}
1622
1623# canvas
1624if $tk_version =~ /^4\.[01]/
1625  $floor_canvas_frame = TkFrame.new(base_frame,'bd'=>2,'relief'=>'sunken',
1626                                    'highlightthickness'=>2)
1627  $floor_canvas = TkCanvas.new($floor_canvas_frame,
1628                               'width'=>900, 'height'=>500, 'borderwidth'=>0,
1629                               'highlightthickness'=>0) {|c|
1630    TkScrollbar.new(base_frame, 'orient'=>'horiz',
1631                    'command'=>proc{|*args| c.xview(*args)}){|hs|
1632      c.xscrollcommand(proc{|first,last| hs.set first,last})
1633      pack('side'=>'bottom', 'fill'=>'x')
1634    }
1635    TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}){|vs|
1636      c.yscrollcommand(proc{|first,last| vs.set first,last})
1637      pack('side'=>'right', 'fill'=>'y')
1638    }
1639  }
1640  $floor_canvas_frame.pack('side'=>'top','fill'=>'both', 'expand'=>'yes')
1641  $floor_canvas.pack('expand'=>'yes', 'fill'=>'both')
1642
1643else
1644  TkFrame.new(base_frame) {|f|
1645    pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes')
1646
1647    h = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'horizontal')
1648    v = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'vertical')
1649
1650    TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1|
1651      $floor_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500,
1652                                   'borderwidth'=>0,
1653                                   'highlightthickness'=>0) {
1654        xscrollcommand(proc{|first,last| h.set first,last})
1655        yscrollcommand(proc{|first,last| v.set first,last})
1656        pack('expand'=>'yes', 'fill'=>'both')
1657      }
1658      grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
1659           'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
1660    }
1661
1662    v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
1663           'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
1664    h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
1665           'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
1666
1667    TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
1668    TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
1669
1670    pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
1671
1672    v.command(proc{|*args| $floor_canvas.yview(*args)})
1673    h.command(proc{|*args| $floor_canvas.xview(*args)})
1674  }
1675end
1676
1677
1678# Create an entry for displaying and typing in current room.
1679
1680$currentRoom = TkVariable.new
1681$floor_entry = TkEntry.new($floor_canvas, 'width'=>10, 'relief'=>'sunken',
1682                           'bd'=>2, 'textvariable'=>$currentRoom)
1683
1684# Choose colors, then fill in the floorplan.
1685
1686$floor_colors = {}
1687if TkWinfo.depth($floor_canvas) > 1
1688  $floor_colors['bg1'] = '#a9c1da'
1689  $floor_colors['outline1'] = '#77889a'
1690  $floor_colors['bg2'] = '#9ab0c6'
1691  $floor_colors['outline2'] = '#687786'
1692  $floor_colors['bg3'] = '#8ba0b3'
1693  $floor_colors['outline3'] = '#596673'
1694  $floor_colors['offices'] = 'Black'
1695  $floor_colors['active'] = '#c4d1df'
1696else
1697  $floor_colors['bg1'] = 'white'
1698  $floor_colors['outline1'] = 'black'
1699  $floor_colors['bg2'] = 'white'
1700  $floor_colors['outline2'] = 'black'
1701  $floor_colors['bg3'] = 'white'
1702  $floor_colors['outline3'] = 'black'
1703  $floor_colors['offices'] = 'Black'
1704  $floor_colors['active'] = 'black'
1705end
1706
1707$activeFloor = ''
1708floorDisplay $floor_canvas,3
1709
1710# Set up event bindings for canvas:
1711
1712$floor_canvas.itembind('floor1', '1', proc{floorDisplay $floor_canvas,1})
1713$floor_canvas.itembind('floor2', '1', proc{floorDisplay $floor_canvas,2})
1714$floor_canvas.itembind('floor3', '1', proc{floorDisplay $floor_canvas,3})
1715$floor_canvas.itembind('room', 'Enter', proc{newRoom $floor_canvas})
1716$floor_canvas.itembind('room', 'Leave', proc{$currentRoom.value = ''})
1717$floor_canvas.bind('2', proc{|x,y| $floor_canvas.scan_mark x,y}, '%x %y')
1718$floor_canvas.bind('B2-Motion',
1719                   proc{|x,y| $floor_canvas.scan_dragto x,y}, '%x %y')
1720$floor_canvas.bind('Destroy', proc{$currentRoom.unset})
1721$currentRoom.value = ''
1722$currentRoom.trace('w',proc{roomChanged $floor_canvas})
1723
1724