"Fossies" - the Fresh Open Source Software Archive

Member "install-tl-20200916/tlpkg/tltcl/lib/tk8.6/demos/floor.tcl" (17 Mar 2020, 79576 Bytes) of package /windows/misc/install-tl.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Tcl/Tk source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 # floor.tcl --
    2 #
    3 # This demonstration script creates a canvas widet that displays the
    4 # floorplan for DEC's Western Research Laboratory.
    5 
    6 if {![info exists widgetDemo]} {
    7     error "This script should be run from the \"widget\" demo."
    8 }
    9 
   10 package require Tk
   11 
   12 # floorDisplay --
   13 # Recreate the floorplan display in the canvas given by "w".  The
   14 # floor given by "active" is displayed on top with its office structure
   15 # visible.
   16 #
   17 # Arguments:
   18 # w -       Name of the canvas window.
   19 # active -  Number of active floor (1, 2, or 3).
   20 
   21 proc floorDisplay {w active} {
   22     global floorLabels floorItems colors activeFloor
   23 
   24     if {$activeFloor == $active} {
   25     return
   26     }
   27 
   28     $w delete all
   29     set activeFloor $active
   30 
   31     # First go through the three floors, displaying the backgrounds for
   32     # each floor.
   33 
   34     bg1 $w $colors(bg1) $colors(outline1)
   35     bg2 $w $colors(bg2) $colors(outline2)
   36     bg3 $w $colors(bg3) $colors(outline3)
   37 
   38     # Raise the background for the active floor so that it's on top.
   39 
   40     $w raise floor$active
   41 
   42     # Create a dummy item just to mark this point in the display list,
   43     # so we can insert highlights here.
   44 
   45     $w create rect 0 100 1 101 -fill {} -outline {} -tags marker
   46 
   47     # Add the walls and labels for the active floor, along with
   48     # transparent polygons that define the rooms on the floor.
   49     # Make sure that the room polygons are on top.
   50 
   51     catch {unset floorLabels}
   52     catch {unset floorItems}
   53     fg$active $w $colors(offices)
   54     $w raise room
   55 
   56     # Offset the floors diagonally from each other.
   57 
   58     $w move floor1 2c 2c
   59     $w move floor2 1c 1c
   60 
   61     # Create items for the room entry and its label.
   62 
   63     $w create window 600 100 -anchor w -window $w.entry
   64     $w create text 600 100 -anchor e -text "Room: "
   65     $w config -scrollregion [$w bbox all]
   66 }
   67 
   68 # newRoom --
   69 # This procedure is invoked whenever the mouse enters a room
   70 # in the floorplan.  It changes tags so that the current room is
   71 # highlighted.
   72 #
   73 # Arguments:
   74 # w  -      The name of the canvas window.
   75 
   76 proc newRoom w {
   77     global currentRoom floorLabels
   78 
   79     set id [$w find withtag current]
   80     if {$id != ""} {
   81     set currentRoom $floorLabels($id)
   82     }
   83     update idletasks
   84 }
   85 
   86 # roomChanged --
   87 # This procedure is invoked whenever the currentRoom variable changes.
   88 # It highlights the current room and unhighlights any previous room.
   89 #
   90 # Arguments:
   91 # w -       The canvas window displaying the floorplan.
   92 # args -    Not used.
   93 
   94 proc roomChanged {w args} {
   95     global currentRoom floorItems colors
   96     $w delete highlight
   97     if {[catch {set item $floorItems($currentRoom)}]} {
   98     return
   99     }
  100     set new [eval \
  101     "$w create polygon [$w coords $item] -fill $colors(active) \
  102     -outline {} -tags highlight"]
  103     $w raise $new marker
  104 }
  105 
  106 # bg1 --
  107 # This procedure represents part of the floorplan database.  When
  108 # invoked, it instantiates the background information for the first
  109 # floor.
  110 #
  111 # Arguments:
  112 # w -       The canvas window.
  113 # fill -    Fill color to use for the floor's background.
  114 # outline - Color to use for the floor's outline.
  115 
  116 proc bg1 {w fill outline} {
  117     $w create polygon 347 80 349 82 351 84 353 85 363 92 375 99 386 104 \
  118     386 129 398 129 398 162 484 162 484 129 559 129 559 133 725 \
  119     133 725 129 802 129 802 389 644 389 644 391 559 391 559 327 \
  120     508 327 508 311 484 311 484 278 395 278 395 288 400 288 404 \
  121     288 409 290 413 292 418 297 421 302 422 309 421 318 417 325 \
  122     411 330 405 332 397 333 344 333 340 334 336 336 335 338 332 \
  123     342 331 347 332 351 334 354 336 357 341 359 340 360 335 363 \
  124     331 365 326 366 304 366 304 355 258 355 258 387 60 387 60 391 \
  125     0 391 0 337 3 337 3 114 8 114 8 25 30 25 30 5 93 5 98 5 104 7 \
  126     110 10 116 16 119 20 122 28 123 32 123 68 220 68 220 34 221 \
  127     22 223 17 227 13 231 8 236 4 242 2 246 0 260 0 283 1 300 5 \
  128     321 14 335 22 348 25 365 29 363 39 358 48 352 56 337 70 \
  129     344 76 347 80 \
  130     -tags {floor1 bg} -fill $fill -outline {}
  131     $w create line 386 129 398 129 -fill $outline -tags {floor1 bg}
  132     $w create line 258 355 258 387 -fill $outline -tags {floor1 bg}
  133     $w create line 60 387 60 391 -fill $outline -tags {floor1 bg}
  134     $w create line 0 337 0 391 -fill $outline -tags {floor1 bg}
  135     $w create line 60 391 0 391 -fill $outline -tags {floor1 bg}
  136     $w create line 3 114 3 337 -fill $outline -tags {floor1 bg}
  137     $w create line 258 387 60 387 -fill $outline -tags {floor1 bg}
  138     $w create line 484 162 398 162 -fill $outline -tags {floor1 bg}
  139     $w create line 398 162 398 129 -fill $outline -tags {floor1 bg}
  140     $w create line 484 278 484 311 -fill $outline -tags {floor1 bg}
  141     $w create line 484 311 508 311 -fill $outline -tags {floor1 bg}
  142     $w create line 508 327 508 311 -fill $outline -tags {floor1 bg}
  143     $w create line 559 327 508 327 -fill $outline -tags {floor1 bg}
  144     $w create line 644 391 559 391 -fill $outline -tags {floor1 bg}
  145     $w create line 644 389 644 391 -fill $outline -tags {floor1 bg}
  146     $w create line 559 129 484 129 -fill $outline -tags {floor1 bg}
  147     $w create line 484 162 484 129 -fill $outline -tags {floor1 bg}
  148     $w create line 725 133 559 133 -fill $outline -tags {floor1 bg}
  149     $w create line 559 129 559 133 -fill $outline -tags {floor1 bg}
  150     $w create line 725 129 802 129 -fill $outline -tags {floor1 bg}
  151     $w create line 802 389 802 129 -fill $outline -tags {floor1 bg}
  152     $w create line 3 337 0 337 -fill $outline -tags {floor1 bg}
  153     $w create line 559 391 559 327 -fill $outline -tags {floor1 bg}
  154     $w create line 802 389 644 389 -fill $outline -tags {floor1 bg}
  155     $w create line 725 133 725 129 -fill $outline -tags {floor1 bg}
  156     $w create line 8 25 8 114 -fill $outline -tags {floor1 bg}
  157     $w create line 8 114 3 114 -fill $outline -tags {floor1 bg}
  158     $w create line 30 25 8 25 -fill $outline -tags {floor1 bg}
  159     $w create line 484 278 395 278 -fill $outline -tags {floor1 bg}
  160     $w create line 30 25 30 5 -fill $outline -tags {floor1 bg}
  161     $w create line 93 5 30 5 -fill $outline -tags {floor1 bg}
  162     $w create line 98 5 93 5 -fill $outline -tags {floor1 bg}
  163     $w create line 104 7 98 5 -fill $outline -tags {floor1 bg}
  164     $w create line 110 10 104 7 -fill $outline -tags {floor1 bg}
  165     $w create line 116 16 110 10 -fill $outline -tags {floor1 bg}
  166     $w create line 119 20 116 16 -fill $outline -tags {floor1 bg}
  167     $w create line 122 28 119 20 -fill $outline -tags {floor1 bg}
  168     $w create line 123 32 122 28 -fill $outline -tags {floor1 bg}
  169     $w create line 123 68 123 32 -fill $outline -tags {floor1 bg}
  170     $w create line 220 68 123 68 -fill $outline -tags {floor1 bg}
  171     $w create line 386 129 386 104 -fill $outline -tags {floor1 bg}
  172     $w create line 386 104 375 99 -fill $outline -tags {floor1 bg}
  173     $w create line 375 99 363 92 -fill $outline -tags {floor1 bg}
  174     $w create line 353 85 363 92 -fill $outline -tags {floor1 bg}
  175     $w create line 220 68 220 34 -fill $outline -tags {floor1 bg}
  176     $w create line 337 70 352 56 -fill $outline -tags {floor1 bg}
  177     $w create line 352 56 358 48 -fill $outline -tags {floor1 bg}
  178     $w create line 358 48 363 39 -fill $outline -tags {floor1 bg}
  179     $w create line 363 39 365 29 -fill $outline -tags {floor1 bg}
  180     $w create line 365 29 348 25 -fill $outline -tags {floor1 bg}
  181     $w create line 348 25 335 22 -fill $outline -tags {floor1 bg}
  182     $w create line 335 22 321 14 -fill $outline -tags {floor1 bg}
  183     $w create line 321 14 300 5 -fill $outline -tags {floor1 bg}
  184     $w create line 300 5 283 1 -fill $outline -tags {floor1 bg}
  185     $w create line 283 1 260 0 -fill $outline -tags {floor1 bg}
  186     $w create line 260 0 246 0 -fill $outline -tags {floor1 bg}
  187     $w create line 246 0 242 2 -fill $outline -tags {floor1 bg}
  188     $w create line 242 2 236 4 -fill $outline -tags {floor1 bg}
  189     $w create line 236 4 231 8 -fill $outline -tags {floor1 bg}
  190     $w create line 231 8 227 13 -fill $outline -tags {floor1 bg}
  191     $w create line 223 17 227 13 -fill $outline -tags {floor1 bg}
  192     $w create line 221 22 223 17 -fill $outline -tags {floor1 bg}
  193     $w create line 220 34 221 22 -fill $outline -tags {floor1 bg}
  194     $w create line 340 360 335 363 -fill $outline -tags {floor1 bg}
  195     $w create line 335 363 331 365 -fill $outline -tags {floor1 bg}
  196     $w create line 331 365 326 366 -fill $outline -tags {floor1 bg}
  197     $w create line 326 366 304 366 -fill $outline -tags {floor1 bg}
  198     $w create line 304 355 304 366 -fill $outline -tags {floor1 bg}
  199     $w create line 395 288 400 288 -fill $outline -tags {floor1 bg}
  200     $w create line 404 288 400 288 -fill $outline -tags {floor1 bg}
  201     $w create line 409 290 404 288 -fill $outline -tags {floor1 bg}
  202     $w create line 413 292 409 290 -fill $outline -tags {floor1 bg}
  203     $w create line 418 297 413 292 -fill $outline -tags {floor1 bg}
  204     $w create line 421 302 418 297 -fill $outline -tags {floor1 bg}
  205     $w create line 422 309 421 302 -fill $outline -tags {floor1 bg}
  206     $w create line 421 318 422 309 -fill $outline -tags {floor1 bg}
  207     $w create line 421 318 417 325 -fill $outline -tags {floor1 bg}
  208     $w create line 417 325 411 330 -fill $outline -tags {floor1 bg}
  209     $w create line 411 330 405 332 -fill $outline -tags {floor1 bg}
  210     $w create line 405 332 397 333 -fill $outline -tags {floor1 bg}
  211     $w create line 397 333 344 333 -fill $outline -tags {floor1 bg}
  212     $w create line 344 333 340 334 -fill $outline -tags {floor1 bg}
  213     $w create line 340 334 336 336 -fill $outline -tags {floor1 bg}
  214     $w create line 336 336 335 338 -fill $outline -tags {floor1 bg}
  215     $w create line 335 338 332 342 -fill $outline -tags {floor1 bg}
  216     $w create line 331 347 332 342 -fill $outline -tags {floor1 bg}
  217     $w create line 332 351 331 347 -fill $outline -tags {floor1 bg}
  218     $w create line 334 354 332 351 -fill $outline -tags {floor1 bg}
  219     $w create line 336 357 334 354 -fill $outline -tags {floor1 bg}
  220     $w create line 341 359 336 357 -fill $outline -tags {floor1 bg}
  221     $w create line 341 359 340 360 -fill $outline -tags {floor1 bg}
  222     $w create line 395 288 395 278 -fill $outline -tags {floor1 bg}
  223     $w create line 304 355 258 355 -fill $outline -tags {floor1 bg}
  224     $w create line 347 80 344 76 -fill $outline -tags {floor1 bg}
  225     $w create line 344 76 337 70 -fill $outline -tags {floor1 bg}
  226     $w create line 349 82 347 80 -fill $outline -tags {floor1 bg}
  227     $w create line 351 84 349 82 -fill $outline -tags {floor1 bg}
  228     $w create line 353 85 351 84 -fill $outline -tags {floor1 bg}
  229 }
  230 
  231 # bg2 --
  232 # This procedure represents part of the floorplan database.  When
  233 # invoked, it instantiates the background information for the second
  234 # floor.
  235 #
  236 # Arguments:
  237 # w -       The canvas window.
  238 # fill -    Fill color to use for the floor's background.
  239 # outline - Color to use for the floor's outline.
  240 
  241 proc bg2 {w fill outline} {
  242     $w create polygon 559 129 484 129 484 162 398 162 398 129 315 129 \
  243     315 133 176 133 176 129 96 129 96 133 3 133 3 339 0 339 0 391 \
  244     60 391 60 387 258 387 258 329 350 329 350 311 395 311 395 280 \
  245     484 280 484 311 508 311 508 327 558 327 558 391 644 391 644 \
  246     367 802 367 802 129 725 129 725 133 559 133 559 129 \
  247     -tags {floor2 bg} -fill $fill -outline {}
  248     $w create line 350 311 350 329 -fill $outline -tags {floor2 bg}
  249     $w create line 398 129 398 162 -fill $outline -tags {floor2 bg}
  250     $w create line 802 367 802 129 -fill $outline -tags {floor2 bg}
  251     $w create line 802 129 725 129 -fill $outline -tags {floor2 bg}
  252     $w create line 725 133 725 129 -fill $outline -tags {floor2 bg}
  253     $w create line 559 129 559 133 -fill $outline -tags {floor2 bg}
  254     $w create line 559 133 725 133 -fill $outline -tags {floor2 bg}
  255     $w create line 484 162 484 129 -fill $outline -tags {floor2 bg}
  256     $w create line 559 129 484 129 -fill $outline -tags {floor2 bg}
  257     $w create line 802 367 644 367 -fill $outline -tags {floor2 bg}
  258     $w create line 644 367 644 391 -fill $outline -tags {floor2 bg}
  259     $w create line 644 391 558 391 -fill $outline -tags {floor2 bg}
  260     $w create line 558 327 558 391 -fill $outline -tags {floor2 bg}
  261     $w create line 558 327 508 327 -fill $outline -tags {floor2 bg}
  262     $w create line 508 327 508 311 -fill $outline -tags {floor2 bg}
  263     $w create line 484 311 508 311 -fill $outline -tags {floor2 bg}
  264     $w create line 484 280 484 311 -fill $outline -tags {floor2 bg}
  265     $w create line 398 162 484 162 -fill $outline -tags {floor2 bg}
  266     $w create line 484 280 395 280 -fill $outline -tags {floor2 bg}
  267     $w create line 395 280 395 311 -fill $outline -tags {floor2 bg}
  268     $w create line 258 387 60 387 -fill $outline -tags {floor2 bg}
  269     $w create line 3 133 3 339 -fill $outline -tags {floor2 bg}
  270     $w create line 3 339 0 339 -fill $outline -tags {floor2 bg}
  271     $w create line 60 391 0 391 -fill $outline -tags {floor2 bg}
  272     $w create line 0 339 0 391 -fill $outline -tags {floor2 bg}
  273     $w create line 60 387 60 391 -fill $outline -tags {floor2 bg}
  274     $w create line 258 329 258 387 -fill $outline -tags {floor2 bg}
  275     $w create line 350 329 258 329 -fill $outline -tags {floor2 bg}
  276     $w create line 395 311 350 311 -fill $outline -tags {floor2 bg}
  277     $w create line 398 129 315 129 -fill $outline -tags {floor2 bg}
  278     $w create line 176 133 315 133 -fill $outline -tags {floor2 bg}
  279     $w create line 176 129 96 129 -fill $outline -tags {floor2 bg}
  280     $w create line 3 133 96 133 -fill $outline -tags {floor2 bg}
  281     $w create line 315 133 315 129 -fill $outline -tags {floor2 bg}
  282     $w create line 176 133 176 129 -fill $outline -tags {floor2 bg}
  283     $w create line 96 133 96 129 -fill $outline -tags {floor2 bg}
  284 }
  285 
  286 # bg3 --
  287 # This procedure represents part of the floorplan database.  When
  288 # invoked, it instantiates the background information for the third
  289 # floor.
  290 #
  291 # Arguments:
  292 # w -       The canvas window.
  293 # fill -    Fill color to use for the floor's background.
  294 # outline - Color to use for the floor's outline.
  295 
  296 proc bg3 {w fill outline} {
  297     $w create polygon 159 300 107 300 107 248 159 248 159 129 96 129 96 \
  298     133 21 133 21 331 0 331 0 391 60 391 60 370 159 370 159 300 \
  299     -tags {floor3 bg} -fill $fill -outline {}
  300     $w create polygon 258 370 258 329 350 329 350 311 399 311 399 129 \
  301     315 129 315 133 176 133 176 129 159 129 159 370 258 370 \
  302     -tags {floor3 bg} -fill $fill -outline {}
  303     $w create line 96 133 96 129 -fill $outline -tags {floor3 bg}
  304     $w create line 176 129 96 129 -fill $outline -tags {floor3 bg}
  305     $w create line 176 129 176 133 -fill $outline -tags {floor3 bg}
  306     $w create line 315 133 176 133 -fill $outline -tags {floor3 bg}
  307     $w create line 315 133 315 129 -fill $outline -tags {floor3 bg}
  308     $w create line 399 129 315 129 -fill $outline -tags {floor3 bg}
  309     $w create line 399 311 399 129 -fill $outline -tags {floor3 bg}
  310     $w create line 399 311 350 311 -fill $outline -tags {floor3 bg}
  311     $w create line 350 329 350 311 -fill $outline -tags {floor3 bg}
  312     $w create line 350 329 258 329 -fill $outline -tags {floor3 bg}
  313     $w create line 258 370 258 329 -fill $outline -tags {floor3 bg}
  314     $w create line 60 370 258 370 -fill $outline -tags {floor3 bg}
  315     $w create line 60 370 60 391 -fill $outline -tags {floor3 bg}
  316     $w create line 60 391 0 391 -fill $outline -tags {floor3 bg}
  317     $w create line 0 391 0 331 -fill $outline -tags {floor3 bg}
  318     $w create line 21 331 0 331 -fill $outline -tags {floor3 bg}
  319     $w create line 21 331 21 133 -fill $outline -tags {floor3 bg}
  320     $w create line 96 133 21 133 -fill $outline -tags {floor3 bg}
  321     $w create line 107 300 159 300 159 248 107 248 107 300 \
  322         -fill $outline -tags {floor3 bg}
  323 }
  324 
  325 # fg1 --
  326 # This procedure represents part of the floorplan database.  When
  327 # invoked, it instantiates the foreground information for the first
  328 # floor (office outlines and numbers).
  329 #
  330 # Arguments:
  331 # w -       The canvas window.
  332 # color -   Color to use for drawing foreground information.
  333 
  334 proc fg1 {w color} {
  335     global floorLabels floorItems
  336     set i [$w create polygon 375 246 375 172 341 172 341 246 -outline {} -tags {floor1 room}]
  337     set floorLabels($i) 101
  338     set {floorItems(101)} $i
  339     $w create text 358 209 -text 101 -fill $color -anchor c -tags {floor1 label}
  340     set i [$w create polygon 307 240 339 240 339 206 307 206 -outline {} -tags {floor1 room}]
  341     set floorLabels($i) {Pub Lift1}
  342     set {floorItems(Pub Lift1)} $i
  343     $w create text 323 223 -text {Pub Lift1} -fill $color -anchor c -tags {floor1 label}
  344     set i [$w create polygon 339 205 307 205 307 171 339 171 -outline {} -tags {floor1 room}]
  345     set floorLabels($i) {Priv Lift1}
  346     set {floorItems(Priv Lift1)} $i
  347     $w create text 323 188 -text {Priv Lift1} -fill $color -anchor c -tags {floor1 label}
  348     set i [$w create polygon 42 389 42 337 1 337 1 389 -outline {} -tags {floor1 room}]
  349     set floorLabels($i) 110
  350     set {floorItems(110)} $i
  351     $w create text 21.5 363 -text 110 -fill $color -anchor c -tags {floor1 label}
  352     set i [$w create polygon 59 389 59 385 90 385 90 337 44 337 44 389 -outline {} -tags {floor1 room}]
  353     set floorLabels($i) 109
  354     set {floorItems(109)} $i
  355     $w create text 67 363 -text 109 -fill $color -anchor c -tags {floor1 label}
  356     set i [$w create polygon 51 300 51 253 6 253 6 300 -outline {} -tags {floor1 room}]
  357     set floorLabels($i) 111
  358     set {floorItems(111)} $i
  359     $w create text 28.5 276.5 -text 111 -fill $color -anchor c -tags {floor1 label}
  360     set i [$w create polygon 98 248 98 309 79 309 79 248 -outline {} -tags {floor1 room}]
  361     set floorLabels($i) 117B
  362     set {floorItems(117B)} $i
  363     $w create text 88.5 278.5 -text 117B -fill $color -anchor c -tags {floor1 label}
  364     set i [$w create polygon 51 251 51 204 6 204 6 251 -outline {} -tags {floor1 room}]
  365     set floorLabels($i) 112
  366     set {floorItems(112)} $i
  367     $w create text 28.5 227.5 -text 112 -fill $color -anchor c -tags {floor1 label}
  368     set i [$w create polygon 6 156 51 156 51 203 6 203 -outline {} -tags {floor1 room}]
  369     set floorLabels($i) 113
  370     set {floorItems(113)} $i
  371     $w create text 28.5 179.5 -text 113 -fill $color -anchor c -tags {floor1 label}
  372     set i [$w create polygon 85 169 79 169 79 192 85 192 -outline {} -tags {floor1 room}]
  373     set floorLabels($i) 117A
  374     set {floorItems(117A)} $i
  375     $w create text 82 180.5 -text 117A -fill $color -anchor c -tags {floor1 label}
  376     set i [$w create polygon 77 302 77 168 53 168 53 302 -outline {} -tags {floor1 room}]
  377     set floorLabels($i) 117
  378     set {floorItems(117)} $i
  379     $w create text 65 235 -text 117 -fill $color -anchor c -tags {floor1 label}
  380     set i [$w create polygon 51 155 51 115 6 115 6 155 -outline {} -tags {floor1 room}]
  381     set floorLabels($i) 114
  382     set {floorItems(114)} $i
  383     $w create text 28.5 135 -text 114 -fill $color -anchor c -tags {floor1 label}
  384     set i [$w create polygon 95 115 53 115 53 168 95 168 -outline {} -tags {floor1 room}]
  385     set floorLabels($i) 115
  386     set {floorItems(115)} $i
  387     $w create text 74 141.5 -text 115 -fill $color -anchor c -tags {floor1 label}
  388     set i [$w create polygon 87 113 87 27 10 27 10 113 -outline {} -tags {floor1 room}]
  389     set floorLabels($i) 116
  390     set {floorItems(116)} $i
  391     $w create text 48.5 70 -text 116 -fill $color -anchor c -tags {floor1 label}
  392     set i [$w create polygon 89 91 128 91 128 113 89 113 -outline {} -tags {floor1 room}]
  393     set floorLabels($i) 118
  394     set {floorItems(118)} $i
  395     $w create text 108.5 102 -text 118 -fill $color -anchor c -tags {floor1 label}
  396     set i [$w create polygon 178 128 178 132 216 132 216 91 163 91 163 112 149 112 149 128 -outline {} -tags {floor1 room}]
  397     set floorLabels($i) 120
  398     set {floorItems(120)} $i
  399     $w create text 189.5 111.5 -text 120 -fill $color -anchor c -tags {floor1 label}
  400     set i [$w create polygon 79 193 87 193 87 169 136 169 136 192 156 192 156 169 175 169 175 246 79 246 -outline {} -tags {floor1 room}]
  401     set floorLabels($i) 122
  402     set {floorItems(122)} $i
  403     $w create text 131 207.5 -text 122 -fill $color -anchor c -tags {floor1 label}
  404     set i [$w create polygon 138 169 154 169 154 191 138 191 -outline {} -tags {floor1 room}]
  405     set floorLabels($i) 121
  406     set {floorItems(121)} $i
  407     $w create text 146 180 -text 121 -fill $color -anchor c -tags {floor1 label}
  408     set i [$w create polygon 99 300 126 300 126 309 99 309 -outline {} -tags {floor1 room}]
  409     set floorLabels($i) 106A
  410     set {floorItems(106A)} $i
  411     $w create text 112.5 304.5 -text 106A -fill $color -anchor c -tags {floor1 label}
  412     set i [$w create polygon 128 299 128 309 150 309 150 248 99 248 99 299 -outline {} -tags {floor1 room}]
  413     set floorLabels($i) 105
  414     set {floorItems(105)} $i
  415     $w create text 124.5 278.5 -text 105 -fill $color -anchor c -tags {floor1 label}
  416     set i [$w create polygon 174 309 174 300 152 300 152 309 -outline {} -tags {floor1 room}]
  417     set floorLabels($i) 106B
  418     set {floorItems(106B)} $i
  419     $w create text 163 304.5 -text 106B -fill $color -anchor c -tags {floor1 label}
  420     set i [$w create polygon 176 299 176 309 216 309 216 248 152 248 152 299 -outline {} -tags {floor1 room}]
  421     set floorLabels($i) 104
  422     set {floorItems(104)} $i
  423     $w create text 184 278.5 -text 104 -fill $color -anchor c -tags {floor1 label}
  424     set i [$w create polygon 138 385 138 337 91 337 91 385 -outline {} -tags {floor1 room}]
  425     set floorLabels($i) 108
  426     set {floorItems(108)} $i
  427     $w create text 114.5 361 -text 108 -fill $color -anchor c -tags {floor1 label}
  428     set i [$w create polygon 256 337 140 337 140 385 256 385 -outline {} -tags {floor1 room}]
  429     set floorLabels($i) 107
  430     set {floorItems(107)} $i
  431     $w create text 198 361 -text 107 -fill $color -anchor c -tags {floor1 label}
  432     set i [$w create polygon 300 353 300 329 260 329 260 353 -outline {} -tags {floor1 room}]
  433     set floorLabels($i) Smoking
  434     set {floorItems(Smoking)} $i
  435     $w create text 280 341 -text Smoking -fill $color -anchor c -tags {floor1 label}
  436     set i [$w create polygon 314 135 314 170 306 170 306 246 177 246 177 135 -outline {} -tags {floor1 room}]
  437     set floorLabels($i) 123
  438     set {floorItems(123)} $i
  439     $w create text 245.5 190.5 -text 123 -fill $color -anchor c -tags {floor1 label}
  440     set i [$w create polygon 217 248 301 248 301 326 257 326 257 310 217 310 -outline {} -tags {floor1 room}]
  441     set floorLabels($i) 103
  442     set {floorItems(103)} $i
  443     $w create text 259 287 -text 103 -fill $color -anchor c -tags {floor1 label}
  444     set i [$w create polygon 396 188 377 188 377 169 316 169 316 131 396 131 -outline {} -tags {floor1 room}]
  445     set floorLabels($i) 124
  446     set {floorItems(124)} $i
  447     $w create text 356 150 -text 124 -fill $color -anchor c -tags {floor1 label}
  448     set i [$w create polygon 397 226 407 226 407 189 377 189 377 246 397 246 -outline {} -tags {floor1 room}]
  449     set floorLabels($i) 125
  450     set {floorItems(125)} $i
  451     $w create text 392 217.5 -text 125 -fill $color -anchor c -tags {floor1 label}
  452     set i [$w create polygon 399 187 409 187 409 207 474 207 474 164 399 164 -outline {} -tags {floor1 room}]
  453     set floorLabels($i) 126
  454     set {floorItems(126)} $i
  455     $w create text 436.5 185.5 -text 126 -fill $color -anchor c -tags {floor1 label}
  456     set i [$w create polygon 409 209 409 229 399 229 399 253 486 253 486 239 474 239 474 209 -outline {} -tags {floor1 room}]
  457     set floorLabels($i) 127
  458     set {floorItems(127)} $i
  459     $w create text 436.5 231 -text 127 -fill $color -anchor c -tags {floor1 label}
  460     set i [$w create polygon 501 164 501 174 495 174 495 188 490 188 490 204 476 204 476 164 -outline {} -tags {floor1 room}]
  461     set floorLabels($i) MShower
  462     set {floorItems(MShower)} $i
  463     $w create text 488.5 184 -text MShower -fill $color -anchor c -tags {floor1 label}
  464     set i [$w create polygon 497 176 513 176 513 204 492 204 492 190 497 190 -outline {} -tags {floor1 room}]
  465     set floorLabels($i) Closet
  466     set {floorItems(Closet)} $i
  467     $w create text 502.5 190 -text Closet -fill $color -anchor c -tags {floor1 label}
  468     set i [$w create polygon 476 237 476 206 513 206 513 254 488 254 488 237 -outline {} -tags {floor1 room}]
  469     set floorLabels($i) WShower
  470     set {floorItems(WShower)} $i
  471     $w create text 494.5 230 -text WShower -fill $color -anchor c -tags {floor1 label}
  472     set i [$w create polygon 486 131 558 131 558 135 724 135 724 166 697 166 697 275 553 275 531 254 515 254 515 174 503 174 503 161 486 161 -outline {} -tags {floor1 room}]
  473     set floorLabels($i) 130
  474     set {floorItems(130)} $i
  475     $w create text 638.5 205 -text 130 -fill $color -anchor c -tags {floor1 label}
  476     set i [$w create polygon 308 242 339 242 339 248 342 248 342 246 397 246 397 276 393 276 393 309 300 309 300 248 308 248 -outline {} -tags {floor1 room}]
  477     set floorLabels($i) 102
  478     set {floorItems(102)} $i
  479     $w create text 367.5 278.5 -text 102 -fill $color -anchor c -tags {floor1 label}
  480     set i [$w create polygon 397 255 486 255 486 276 397 276 -outline {} -tags {floor1 room}]
  481     set floorLabels($i) 128
  482     set {floorItems(128)} $i
  483     $w create text 441.5 265.5 -text 128 -fill $color -anchor c -tags {floor1 label}
  484     set i [$w create polygon 510 309 486 309 486 255 530 255 552 277 561 277 561 325 510 325 -outline {} -tags {floor1 room}]
  485     set floorLabels($i) 129
  486     set {floorItems(129)} $i
  487     $w create text 535.5 293 -text 129 -fill $color -anchor c -tags {floor1 label}
  488     set i [$w create polygon 696 281 740 281 740 387 642 387 642 389 561 389 561 277 696 277 -outline {} -tags {floor1 room}]
  489     set floorLabels($i) 133
  490     set {floorItems(133)} $i
  491     $w create text 628.5 335 -text 133 -fill $color -anchor c -tags {floor1 label}
  492     set i [$w create polygon 742 387 742 281 800 281 800 387 -outline {} -tags {floor1 room}]
  493     set floorLabels($i) 132
  494     set {floorItems(132)} $i
  495     $w create text 771 334 -text 132 -fill $color -anchor c -tags {floor1 label}
  496     set i [$w create polygon 800 168 800 280 699 280 699 168 -outline {} -tags {floor1 room}]
  497     set floorLabels($i) 134
  498     set {floorItems(134)} $i
  499     $w create text 749.5 224 -text 134 -fill $color -anchor c -tags {floor1 label}
  500     set i [$w create polygon 726 131 726 166 800 166 800 131 -outline {} -tags {floor1 room}]
  501     set floorLabels($i) 135
  502     set {floorItems(135)} $i
  503     $w create text 763 148.5 -text 135 -fill $color -anchor c -tags {floor1 label}
  504     set i [$w create polygon 340 360 335 363 331 365 326 366 304 366 304 312 396 312 396 288 400 288 404 288 409 290 413 292 418 297 421 302 422 309 421 318 417 325 411 330 405 332 397 333 344 333 340 334 336 336 335 338 332 342 331 347 332 351 334 354 336 357 341 359 -outline {} -tags {floor1 room}]
  505     set floorLabels($i) {Ramona Stair}
  506     set {floorItems(Ramona Stair)} $i
  507     $w create text 368 323 -text {Ramona Stair} -fill $color -anchor c -tags {floor1 label}
  508     set i [$w create polygon 30 23 30 5 93 5 98 5 104 7 110 10 116 16 119 20 122 28 123 32 123 68 220 68 220 87 90 87 90 23 -outline {} -tags {floor1 room}]
  509     set floorLabels($i) {University Stair}
  510     set {floorItems(University Stair)} $i
  511     $w create text 155 77.5 -text {University Stair} -fill $color -anchor c -tags {floor1 label}
  512     set i [$w create polygon 282 37 295 40 312 49 323 56 337 70 352 56 358 48 363 39 365 29 348 25 335 22 321 14 300 5 283 1 260 0 246 0 242 2 236 4 231 8 227 13 223 17 221 22 220 34 260 34 -outline {} -tags {floor1 room}]
  513     set floorLabels($i) {Plaza Stair}
  514     set {floorItems(Plaza Stair)} $i
  515     $w create text 317.5 28.5 -text {Plaza Stair} -fill $color -anchor c -tags {floor1 label}
  516     set i [$w create polygon 220 34 260 34 282 37 295 40 312 49 323 56 337 70 350 83 365 94 377 100 386 104 386 128 220 128 -outline {} -tags {floor1 room}]
  517     set floorLabels($i) {Plaza Deck}
  518     set {floorItems(Plaza Deck)} $i
  519     $w create text 303 81 -text {Plaza Deck} -fill $color -anchor c -tags {floor1 label}
  520     set i [$w create polygon 257 336 77 336 6 336 6 301 77 301 77 310 257 310 -outline {} -tags {floor1 room}]
  521     set floorLabels($i) 106
  522     set {floorItems(106)} $i
  523     $w create text 131.5 318.5 -text 106 -fill $color -anchor c -tags {floor1 label}
  524     set i [$w create polygon 146 110 162 110 162 91 130 91 130 115 95 115 95 128 114 128 114 151 157 151 157 153 112 153 112 130 97 130 97 168 175 168 175 131 146 131 -outline {} -tags {floor1 room}]
  525     set floorLabels($i) 119
  526     set {floorItems(119)} $i
  527     $w create text 143.5 133 -text 119 -fill $color -anchor c -tags {floor1 label}
  528     $w create line 155 191 155 189 -fill $color -tags {floor1 wall}
  529     $w create line 155 177 155 169 -fill $color -tags {floor1 wall}
  530     $w create line 96 129 96 169 -fill $color -tags {floor1 wall}
  531     $w create line 78 169 176 169 -fill $color -tags {floor1 wall}
  532     $w create line 176 247 176 129 -fill $color -tags {floor1 wall}
  533     $w create line 340 206 307 206 -fill $color -tags {floor1 wall}
  534     $w create line 340 187 340 170 -fill $color -tags {floor1 wall}
  535     $w create line 340 210 340 201 -fill $color -tags {floor1 wall}
  536     $w create line 340 247 340 224 -fill $color -tags {floor1 wall}
  537     $w create line 340 241 307 241 -fill $color -tags {floor1 wall}
  538     $w create line 376 246 376 170 -fill $color -tags {floor1 wall}
  539     $w create line 307 247 307 170 -fill $color -tags {floor1 wall}
  540     $w create line 376 170 307 170 -fill $color -tags {floor1 wall}
  541     $w create line 315 129 315 170 -fill $color -tags {floor1 wall}
  542     $w create line 147 129 176 129 -fill $color -tags {floor1 wall}
  543     $w create line 202 133 176 133 -fill $color -tags {floor1 wall}
  544     $w create line 398 129 315 129 -fill $color -tags {floor1 wall}
  545     $w create line 258 352 258 387 -fill $color -tags {floor1 wall}
  546     $w create line 60 387 60 391 -fill $color -tags {floor1 wall}
  547     $w create line 0 337 0 391 -fill $color -tags {floor1 wall}
  548     $w create line 60 391 0 391 -fill $color -tags {floor1 wall}
  549     $w create line 3 114 3 337 -fill $color -tags {floor1 wall}
  550     $w create line 258 387 60 387 -fill $color -tags {floor1 wall}
  551     $w create line 52 237 52 273 -fill $color -tags {floor1 wall}
  552     $w create line 52 189 52 225 -fill $color -tags {floor1 wall}
  553     $w create line 52 140 52 177 -fill $color -tags {floor1 wall}
  554     $w create line 395 306 395 311 -fill $color -tags {floor1 wall}
  555     $w create line 531 254 398 254 -fill $color -tags {floor1 wall}
  556     $w create line 475 178 475 238 -fill $color -tags {floor1 wall}
  557     $w create line 502 162 398 162 -fill $color -tags {floor1 wall}
  558     $w create line 398 129 398 188 -fill $color -tags {floor1 wall}
  559     $w create line 383 188 376 188 -fill $color -tags {floor1 wall}
  560     $w create line 408 188 408 194 -fill $color -tags {floor1 wall}
  561     $w create line 398 227 398 254 -fill $color -tags {floor1 wall}
  562     $w create line 408 227 398 227 -fill $color -tags {floor1 wall}
  563     $w create line 408 222 408 227 -fill $color -tags {floor1 wall}
  564     $w create line 408 206 408 210 -fill $color -tags {floor1 wall}
  565     $w create line 408 208 475 208 -fill $color -tags {floor1 wall}
  566     $w create line 484 278 484 311 -fill $color -tags {floor1 wall}
  567     $w create line 484 311 508 311 -fill $color -tags {floor1 wall}
  568     $w create line 508 327 508 311 -fill $color -tags {floor1 wall}
  569     $w create line 559 327 508 327 -fill $color -tags {floor1 wall}
  570     $w create line 644 391 559 391 -fill $color -tags {floor1 wall}
  571     $w create line 644 389 644 391 -fill $color -tags {floor1 wall}
  572     $w create line 514 205 475 205 -fill $color -tags {floor1 wall}
  573     $w create line 496 189 496 187 -fill $color -tags {floor1 wall}
  574     $w create line 559 129 484 129 -fill $color -tags {floor1 wall}
  575     $w create line 484 162 484 129 -fill $color -tags {floor1 wall}
  576     $w create line 725 133 559 133 -fill $color -tags {floor1 wall}
  577     $w create line 559 129 559 133 -fill $color -tags {floor1 wall}
  578     $w create line 725 149 725 167 -fill $color -tags {floor1 wall}
  579     $w create line 725 129 802 129 -fill $color -tags {floor1 wall}
  580     $w create line 802 389 802 129 -fill $color -tags {floor1 wall}
  581     $w create line 739 167 802 167 -fill $color -tags {floor1 wall}
  582     $w create line 396 188 408 188 -fill $color -tags {floor1 wall}
  583     $w create line 0 337 9 337 -fill $color -tags {floor1 wall}
  584     $w create line 58 337 21 337 -fill $color -tags {floor1 wall}
  585     $w create line 43 391 43 337 -fill $color -tags {floor1 wall}
  586     $w create line 105 337 75 337 -fill $color -tags {floor1 wall}
  587     $w create line 91 387 91 337 -fill $color -tags {floor1 wall}
  588     $w create line 154 337 117 337 -fill $color -tags {floor1 wall}
  589     $w create line 139 387 139 337 -fill $color -tags {floor1 wall}
  590     $w create line 227 337 166 337 -fill $color -tags {floor1 wall}
  591     $w create line 258 337 251 337 -fill $color -tags {floor1 wall}
  592     $w create line 258 328 302 328 -fill $color -tags {floor1 wall}
  593     $w create line 302 355 302 311 -fill $color -tags {floor1 wall}
  594     $w create line 395 311 302 311 -fill $color -tags {floor1 wall}
  595     $w create line 484 278 395 278 -fill $color -tags {floor1 wall}
  596     $w create line 395 294 395 278 -fill $color -tags {floor1 wall}
  597     $w create line 473 278 473 275 -fill $color -tags {floor1 wall}
  598     $w create line 473 256 473 254 -fill $color -tags {floor1 wall}
  599     $w create line 533 257 531 254 -fill $color -tags {floor1 wall}
  600     $w create line 553 276 551 274 -fill $color -tags {floor1 wall}
  601     $w create line 698 276 553 276 -fill $color -tags {floor1 wall}
  602     $w create line 559 391 559 327 -fill $color -tags {floor1 wall}
  603     $w create line 802 389 644 389 -fill $color -tags {floor1 wall}
  604     $w create line 741 314 741 389 -fill $color -tags {floor1 wall}
  605     $w create line 698 280 698 167 -fill $color -tags {floor1 wall}
  606     $w create line 707 280 698 280 -fill $color -tags {floor1 wall}
  607     $w create line 802 280 731 280 -fill $color -tags {floor1 wall}
  608     $w create line 741 280 741 302 -fill $color -tags {floor1 wall}
  609     $w create line 698 167 727 167 -fill $color -tags {floor1 wall}
  610     $w create line 725 137 725 129 -fill $color -tags {floor1 wall}
  611     $w create line 514 254 514 175 -fill $color -tags {floor1 wall}
  612     $w create line 496 175 514 175 -fill $color -tags {floor1 wall}
  613     $w create line 502 175 502 162 -fill $color -tags {floor1 wall}
  614     $w create line 475 166 475 162 -fill $color -tags {floor1 wall}
  615     $w create line 496 176 496 175 -fill $color -tags {floor1 wall}
  616     $w create line 491 189 496 189 -fill $color -tags {floor1 wall}
  617     $w create line 491 205 491 189 -fill $color -tags {floor1 wall}
  618     $w create line 487 238 475 238 -fill $color -tags {floor1 wall}
  619     $w create line 487 240 487 238 -fill $color -tags {floor1 wall}
  620     $w create line 487 252 487 254 -fill $color -tags {floor1 wall}
  621     $w create line 315 133 304 133 -fill $color -tags {floor1 wall}
  622     $w create line 256 133 280 133 -fill $color -tags {floor1 wall}
  623     $w create line 78 247 270 247 -fill $color -tags {floor1 wall}
  624     $w create line 307 247 294 247 -fill $color -tags {floor1 wall}
  625     $w create line 214 133 232 133 -fill $color -tags {floor1 wall}
  626     $w create line 217 247 217 266 -fill $color -tags {floor1 wall}
  627     $w create line 217 309 217 291 -fill $color -tags {floor1 wall}
  628     $w create line 217 309 172 309 -fill $color -tags {floor1 wall}
  629     $w create line 154 309 148 309 -fill $color -tags {floor1 wall}
  630     $w create line 175 300 175 309 -fill $color -tags {floor1 wall}
  631     $w create line 151 300 175 300 -fill $color -tags {floor1 wall}
  632     $w create line 151 247 151 309 -fill $color -tags {floor1 wall}
  633     $w create line 78 237 78 265 -fill $color -tags {floor1 wall}
  634     $w create line 78 286 78 309 -fill $color -tags {floor1 wall}
  635     $w create line 106 309 78 309 -fill $color -tags {floor1 wall}
  636     $w create line 130 309 125 309 -fill $color -tags {floor1 wall}
  637     $w create line 99 309 99 247 -fill $color -tags {floor1 wall}
  638     $w create line 127 299 99 299 -fill $color -tags {floor1 wall}
  639     $w create line 127 309 127 299 -fill $color -tags {floor1 wall}
  640     $w create line 155 191 137 191 -fill $color -tags {floor1 wall}
  641     $w create line 137 169 137 191 -fill $color -tags {floor1 wall}
  642     $w create line 78 171 78 169 -fill $color -tags {floor1 wall}
  643     $w create line 78 190 78 218 -fill $color -tags {floor1 wall}
  644     $w create line 86 192 86 169 -fill $color -tags {floor1 wall}
  645     $w create line 86 192 78 192 -fill $color -tags {floor1 wall}
  646     $w create line 52 301 3 301 -fill $color -tags {floor1 wall}
  647     $w create line 52 286 52 301 -fill $color -tags {floor1 wall}
  648     $w create line 52 252 3 252 -fill $color -tags {floor1 wall}
  649     $w create line 52 203 3 203 -fill $color -tags {floor1 wall}
  650     $w create line 3 156 52 156 -fill $color -tags {floor1 wall}
  651     $w create line 8 25 8 114 -fill $color -tags {floor1 wall}
  652     $w create line 63 114 3 114 -fill $color -tags {floor1 wall}
  653     $w create line 75 114 97 114 -fill $color -tags {floor1 wall}
  654     $w create line 108 114 129 114 -fill $color -tags {floor1 wall}
  655     $w create line 129 114 129 89 -fill $color -tags {floor1 wall}
  656     $w create line 52 114 52 128 -fill $color -tags {floor1 wall}
  657     $w create line 132 89 88 89 -fill $color -tags {floor1 wall}
  658     $w create line 88 25 88 89 -fill $color -tags {floor1 wall}
  659     $w create line 88 114 88 89 -fill $color -tags {floor1 wall}
  660     $w create line 218 89 144 89 -fill $color -tags {floor1 wall}
  661     $w create line 147 111 147 129 -fill $color -tags {floor1 wall}
  662     $w create line 162 111 147 111 -fill $color -tags {floor1 wall}
  663     $w create line 162 109 162 111 -fill $color -tags {floor1 wall}
  664     $w create line 162 96 162 89 -fill $color -tags {floor1 wall}
  665     $w create line 218 89 218 94 -fill $color -tags {floor1 wall}
  666     $w create line 218 89 218 119 -fill $color -tags {floor1 wall}
  667     $w create line 8 25 88 25 -fill $color -tags {floor1 wall}
  668     $w create line 258 337 258 328 -fill $color -tags {floor1 wall}
  669     $w create line 113 129 96 129 -fill $color -tags {floor1 wall}
  670     $w create line 302 355 258 355 -fill $color -tags {floor1 wall}
  671     $w create line 386 104 386 129 -fill $color -tags {floor1 wall}
  672     $w create line 377 100 386 104 -fill $color -tags {floor1 wall}
  673     $w create line 365 94 377 100 -fill $color -tags {floor1 wall}
  674     $w create line 350 83 365 94 -fill $color -tags {floor1 wall}
  675     $w create line 337 70 350 83 -fill $color -tags {floor1 wall}
  676     $w create line 337 70 323 56 -fill $color -tags {floor1 wall}
  677     $w create line 312 49 323 56 -fill $color -tags {floor1 wall}
  678     $w create line 295 40 312 49 -fill $color -tags {floor1 wall}
  679     $w create line 282 37 295 40 -fill $color -tags {floor1 wall}
  680     $w create line 260 34 282 37 -fill $color -tags {floor1 wall}
  681     $w create line 253 34 260 34 -fill $color -tags {floor1 wall}
  682     $w create line 386 128 386 104 -fill $color -tags {floor1 wall}
  683     $w create line 113 152 156 152 -fill $color -tags {floor1 wall}
  684     $w create line 113 152 156 152 -fill $color -tags {floor1 wall}
  685     $w create line 113 152 113 129 -fill $color -tags {floor1 wall}
  686 }
  687 
  688 # fg2 --
  689 # This procedure represents part of the floorplan database.  When
  690 # invoked, it instantiates the foreground information for the second
  691 # floor (office outlines and numbers).
  692 #
  693 # Arguments:
  694 # w -       The canvas window.
  695 # color -   Color to use for drawing foreground information.
  696 
  697 proc fg2 {w color} {
  698     global floorLabels floorItems
  699     set i [$w create polygon 748 188 755 188 755 205 758 205 758 222 800 222 800 168 748 168 -outline {} -tags {floor2 room}]
  700     set floorLabels($i) 238
  701     set {floorItems(238)} $i
  702     $w create text 774 195 -text 238 -fill $color -anchor c -tags {floor2 label}
  703     set i [$w create polygon 726 188 746 188 746 166 800 166 800 131 726 131 -outline {} -tags {floor2 room}]
  704     set floorLabels($i) 237
  705     set {floorItems(237)} $i
  706     $w create text 763 148.5 -text 237 -fill $color -anchor c -tags {floor2 label}
  707     set i [$w create polygon 497 187 497 204 559 204 559 324 641 324 643 324 643 291 641 291 641 205 696 205 696 291 694 291 694 314 715 314 715 291 715 205 755 205 755 190 724 190 724 187 -outline {} -tags {floor2 room}]
  708     set floorLabels($i) 246
  709     set {floorItems(246)} $i
  710     $w create text 600 264 -text 246 -fill $color -anchor c -tags {floor2 label}
  711     set i [$w create polygon 694 279 643 279 643 314 694 314 -outline {} -tags {floor2 room}]
  712     set floorLabels($i) 247
  713     set {floorItems(247)} $i
  714     $w create text 668.5 296.5 -text 247 -fill $color -anchor c -tags {floor2 label}
  715     set i [$w create polygon 232 250 308 250 308 242 339 242 339 246 397 246 397 255 476 255 476 250 482 250 559 250 559 274 482 274 482 278 396 278 396 274 232 274 -outline {} -tags {floor2 room}]
  716     set floorLabels($i) 202
  717     set {floorItems(202)} $i
  718     $w create text 285.5 260 -text 202 -fill $color -anchor c -tags {floor2 label}
  719     set i [$w create polygon 53 228 53 338 176 338 233 338 233 196 306 196 306 180 175 180 175 169 156 169 156 196 176 196 176 228 -outline {} -tags {floor2 room}]
  720     set floorLabels($i) 206
  721     set {floorItems(206)} $i
  722     $w create text 143 267 -text 206 -fill $color -anchor c -tags {floor2 label}
  723     set i [$w create polygon 51 277 6 277 6 338 51 338 -outline {} -tags {floor2 room}]
  724     set floorLabels($i) 212
  725     set {floorItems(212)} $i
  726     $w create text 28.5 307.5 -text 212 -fill $color -anchor c -tags {floor2 label}
  727     set i [$w create polygon 557 276 486 276 486 309 510 309 510 325 557 325 -outline {} -tags {floor2 room}]
  728     set floorLabels($i) 245
  729     set {floorItems(245)} $i
  730     $w create text 521.5 300.5 -text 245 -fill $color -anchor c -tags {floor2 label}
  731     set i [$w create polygon 560 389 599 389 599 326 560 326 -outline {} -tags {floor2 room}]
  732     set floorLabels($i) 244
  733     set {floorItems(244)} $i
  734     $w create text 579.5 357.5 -text 244 -fill $color -anchor c -tags {floor2 label}
  735     set i [$w create polygon 601 389 601 326 643 326 643 389 -outline {} -tags {floor2 room}]
  736     set floorLabels($i) 243
  737     set {floorItems(243)} $i
  738     $w create text 622 357.5 -text 243 -fill $color -anchor c -tags {floor2 label}
  739     set i [$w create polygon 688 316 645 316 645 365 688 365 -outline {} -tags {floor2 room}]
  740     set floorLabels($i) 242
  741     set {floorItems(242)} $i
  742     $w create text 666.5 340.5 -text 242 -fill $color -anchor c -tags {floor2 label}
  743     set i [$w create polygon 802 367 759 367 759 226 802 226 -outline {} -tags {floor2 room}]
  744     set floorLabels($i) {Barbecue Deck}
  745     set {floorItems(Barbecue Deck)} $i
  746     $w create text 780.5 296.5 -text {Barbecue Deck} -fill $color -anchor c -tags {floor2 label}
  747     set i [$w create polygon 755 262 755 314 717 314 717 262 -outline {} -tags {floor2 room}]
  748     set floorLabels($i) 240
  749     set {floorItems(240)} $i
  750     $w create text 736 288 -text 240 -fill $color -anchor c -tags {floor2 label}
  751     set i [$w create polygon 755 316 689 316 689 365 755 365 -outline {} -tags {floor2 room}]
  752     set floorLabels($i) 241
  753     set {floorItems(241)} $i
  754     $w create text 722 340.5 -text 241 -fill $color -anchor c -tags {floor2 label}
  755     set i [$w create polygon 755 206 717 206 717 261 755 261 -outline {} -tags {floor2 room}]
  756     set floorLabels($i) 239
  757     set {floorItems(239)} $i
  758     $w create text 736 233.5 -text 239 -fill $color -anchor c -tags {floor2 label}
  759     set i [$w create polygon 695 277 643 277 643 206 695 206 -outline {} -tags {floor2 room}]
  760     set floorLabels($i) 248
  761     set {floorItems(248)} $i
  762     $w create text 669 241.5 -text 248 -fill $color -anchor c -tags {floor2 label}
  763     set i [$w create polygon 676 135 676 185 724 185 724 135 -outline {} -tags {floor2 room}]
  764     set floorLabels($i) 236
  765     set {floorItems(236)} $i
  766     $w create text 700 160 -text 236 -fill $color -anchor c -tags {floor2 label}
  767     set i [$w create polygon 675 135 635 135 635 145 628 145 628 185 675 185 -outline {} -tags {floor2 room}]
  768     set floorLabels($i) 235
  769     set {floorItems(235)} $i
  770     $w create text 651.5 160 -text 235 -fill $color -anchor c -tags {floor2 label}
  771     set i [$w create polygon 626 143 633 143 633 135 572 135 572 143 579 143 579 185 626 185 -outline {} -tags {floor2 room}]
  772     set floorLabels($i) 234
  773     set {floorItems(234)} $i
  774     $w create text 606 160 -text 234 -fill $color -anchor c -tags {floor2 label}
  775     set i [$w create polygon 557 135 571 135 571 145 578 145 578 185 527 185 527 131 557 131 -outline {} -tags {floor2 room}]
  776     set floorLabels($i) 233
  777     set {floorItems(233)} $i
  778     $w create text 552.5 158 -text 233 -fill $color -anchor c -tags {floor2 label}
  779     set i [$w create polygon 476 249 557 249 557 205 476 205 -outline {} -tags {floor2 room}]
  780     set floorLabels($i) 230
  781     set {floorItems(230)} $i
  782     $w create text 516.5 227 -text 230 -fill $color -anchor c -tags {floor2 label}
  783     set i [$w create polygon 476 164 486 164 486 131 525 131 525 185 476 185 -outline {} -tags {floor2 room}]
  784     set floorLabels($i) 232
  785     set {floorItems(232)} $i
  786     $w create text 500.5 158 -text 232 -fill $color -anchor c -tags {floor2 label}
  787     set i [$w create polygon 476 186 495 186 495 204 476 204 -outline {} -tags {floor2 room}]
  788     set floorLabels($i) 229
  789     set {floorItems(229)} $i
  790     $w create text 485.5 195 -text 229 -fill $color -anchor c -tags {floor2 label}
  791     set i [$w create polygon 474 207 409 207 409 187 399 187 399 164 474 164 -outline {} -tags {floor2 room}]
  792     set floorLabels($i) 227
  793     set {floorItems(227)} $i
  794     $w create text 436.5 185.5 -text 227 -fill $color -anchor c -tags {floor2 label}
  795     set i [$w create polygon 399 228 399 253 474 253 474 209 409 209 409 228 -outline {} -tags {floor2 room}]
  796     set floorLabels($i) 228
  797     set {floorItems(228)} $i
  798     $w create text 436.5 231 -text 228 -fill $color -anchor c -tags {floor2 label}
  799     set i [$w create polygon 397 246 397 226 407 226 407 189 377 189 377 246 -outline {} -tags {floor2 room}]
  800     set floorLabels($i) 226
  801     set {floorItems(226)} $i
  802     $w create text 392 217.5 -text 226 -fill $color -anchor c -tags {floor2 label}
  803     set i [$w create polygon 377 169 316 169 316 131 397 131 397 188 377 188 -outline {} -tags {floor2 room}]
  804     set floorLabels($i) 225
  805     set {floorItems(225)} $i
  806     $w create text 356.5 150 -text 225 -fill $color -anchor c -tags {floor2 label}
  807     set i [$w create polygon 234 198 306 198 306 249 234 249 -outline {} -tags {floor2 room}]
  808     set floorLabels($i) 224
  809     set {floorItems(224)} $i
  810     $w create text 270 223.5 -text 224 -fill $color -anchor c -tags {floor2 label}
  811     set i [$w create polygon 270 179 306 179 306 170 314 170 314 135 270 135 -outline {} -tags {floor2 room}]
  812     set floorLabels($i) 223
  813     set {floorItems(223)} $i
  814     $w create text 292 157 -text 223 -fill $color -anchor c -tags {floor2 label}
  815     set i [$w create polygon 268 179 221 179 221 135 268 135 -outline {} -tags {floor2 room}]
  816     set floorLabels($i) 222
  817     set {floorItems(222)} $i
  818     $w create text 244.5 157 -text 222 -fill $color -anchor c -tags {floor2 label}
  819     set i [$w create polygon 177 179 219 179 219 135 177 135 -outline {} -tags {floor2 room}]
  820     set floorLabels($i) 221
  821     set {floorItems(221)} $i
  822     $w create text 198 157 -text 221 -fill $color -anchor c -tags {floor2 label}
  823     set i [$w create polygon 299 327 349 327 349 284 341 284 341 276 299 276 -outline {} -tags {floor2 room}]
  824     set floorLabels($i) 204
  825     set {floorItems(204)} $i
  826     $w create text 324 301.5 -text 204 -fill $color -anchor c -tags {floor2 label}
  827     set i [$w create polygon 234 276 297 276 297 327 257 327 257 338 234 338 -outline {} -tags {floor2 room}]
  828     set floorLabels($i) 205
  829     set {floorItems(205)} $i
  830     $w create text 265.5 307 -text 205 -fill $color -anchor c -tags {floor2 label}
  831     set i [$w create polygon 256 385 256 340 212 340 212 385 -outline {} -tags {floor2 room}]
  832     set floorLabels($i) 207
  833     set {floorItems(207)} $i
  834     $w create text 234 362.5 -text 207 -fill $color -anchor c -tags {floor2 label}
  835     set i [$w create polygon 210 340 164 340 164 385 210 385 -outline {} -tags {floor2 room}]
  836     set floorLabels($i) 208
  837     set {floorItems(208)} $i
  838     $w create text 187 362.5 -text 208 -fill $color -anchor c -tags {floor2 label}
  839     set i [$w create polygon 115 340 162 340 162 385 115 385 -outline {} -tags {floor2 room}]
  840     set floorLabels($i) 209
  841     set {floorItems(209)} $i
  842     $w create text 138.5 362.5 -text 209 -fill $color -anchor c -tags {floor2 label}
  843     set i [$w create polygon 89 228 89 156 53 156 53 228 -outline {} -tags {floor2 room}]
  844     set floorLabels($i) 217
  845     set {floorItems(217)} $i
  846     $w create text 71 192 -text 217 -fill $color -anchor c -tags {floor2 label}
  847     set i [$w create polygon 89 169 97 169 97 190 89 190 -outline {} -tags {floor2 room}]
  848     set floorLabels($i) 217A
  849     set {floorItems(217A)} $i
  850     $w create text 93 179.5 -text 217A -fill $color -anchor c -tags {floor2 label}
  851     set i [$w create polygon 89 156 89 168 95 168 95 135 53 135 53 156 -outline {} -tags {floor2 room}]
  852     set floorLabels($i) 216
  853     set {floorItems(216)} $i
  854     $w create text 71 145.5 -text 216 -fill $color -anchor c -tags {floor2 label}
  855     set i [$w create polygon 51 179 51 135 6 135 6 179 -outline {} -tags {floor2 room}]
  856     set floorLabels($i) 215
  857     set {floorItems(215)} $i
  858     $w create text 28.5 157 -text 215 -fill $color -anchor c -tags {floor2 label}
  859     set i [$w create polygon 51 227 6 227 6 180 51 180 -outline {} -tags {floor2 room}]
  860     set floorLabels($i) 214
  861     set {floorItems(214)} $i
  862     $w create text 28.5 203.5 -text 214 -fill $color -anchor c -tags {floor2 label}
  863     set i [$w create polygon 51 275 6 275 6 229 51 229 -outline {} -tags {floor2 room}]
  864     set floorLabels($i) 213
  865     set {floorItems(213)} $i
  866     $w create text 28.5 252 -text 213 -fill $color -anchor c -tags {floor2 label}
  867     set i [$w create polygon 114 340 67 340 67 385 114 385 -outline {} -tags {floor2 room}]
  868     set floorLabels($i) 210
  869     set {floorItems(210)} $i
  870     $w create text 90.5 362.5 -text 210 -fill $color -anchor c -tags {floor2 label}
  871     set i [$w create polygon 59 389 59 385 65 385 65 340 1 340 1 389 -outline {} -tags {floor2 room}]
  872     set floorLabels($i) 211
  873     set {floorItems(211)} $i
  874     $w create text 33 364.5 -text 211 -fill $color -anchor c -tags {floor2 label}
  875     set i [$w create polygon 393 309 350 309 350 282 342 282 342 276 393 276 -outline {} -tags {floor2 room}]
  876     set floorLabels($i) 203
  877     set {floorItems(203)} $i
  878     $w create text 367.5 292.5 -text 203 -fill $color -anchor c -tags {floor2 label}
  879     set i [$w create polygon 99 191 91 191 91 226 174 226 174 198 154 198 154 192 109 192 109 169 99 169 -outline {} -tags {floor2 room}]
  880     set floorLabels($i) 220
  881     set {floorItems(220)} $i
  882     $w create text 132.5 208.5 -text 220 -fill $color -anchor c -tags {floor2 label}
  883     set i [$w create polygon 339 205 307 205 307 171 339 171 -outline {} -tags {floor2 room}]
  884     set floorLabels($i) {Priv Lift2}
  885     set {floorItems(Priv Lift2)} $i
  886     $w create text 323 188 -text {Priv Lift2} -fill $color -anchor c -tags {floor2 label}
  887     set i [$w create polygon 307 240 339 240 339 206 307 206 -outline {} -tags {floor2 room}]
  888     set floorLabels($i) {Pub Lift 2}
  889     set {floorItems(Pub Lift 2)} $i
  890     $w create text 323 223 -text {Pub Lift 2} -fill $color -anchor c -tags {floor2 label}
  891     set i [$w create polygon 175 168 97 168 97 131 175 131 -outline {} -tags {floor2 room}]
  892     set floorLabels($i) 218
  893     set {floorItems(218)} $i
  894     $w create text 136 149.5 -text 218 -fill $color -anchor c -tags {floor2 label}
  895     set i [$w create polygon 154 191 111 191 111 169 154 169 -outline {} -tags {floor2 room}]
  896     set floorLabels($i) 219
  897     set {floorItems(219)} $i
  898     $w create text 132.5 180 -text 219 -fill $color -anchor c -tags {floor2 label}
  899     set i [$w create polygon 375 246 375 172 341 172 341 246 -outline {} -tags {floor2 room}]
  900     set floorLabels($i) 201
  901     set {floorItems(201)} $i
  902     $w create text 358 209 -text 201 -fill $color -anchor c -tags {floor2 label}
  903     $w create line 641 186 678 186 -fill $color -tags {floor2 wall}
  904     $w create line 757 350 757 367 -fill $color -tags {floor2 wall}
  905     $w create line 634 133 634 144 -fill $color -tags {floor2 wall}
  906     $w create line 634 144 627 144 -fill $color -tags {floor2 wall}
  907     $w create line 572 133 572 144 -fill $color -tags {floor2 wall}
  908     $w create line 572 144 579 144 -fill $color -tags {floor2 wall}
  909     $w create line 398 129 398 162 -fill $color -tags {floor2 wall}
  910     $w create line 174 197 175 197 -fill $color -tags {floor2 wall}
  911     $w create line 175 197 175 227 -fill $color -tags {floor2 wall}
  912     $w create line 757 206 757 221 -fill $color -tags {floor2 wall}
  913     $w create line 396 188 408 188 -fill $color -tags {floor2 wall}
  914     $w create line 727 189 725 189 -fill $color -tags {floor2 wall}
  915     $w create line 747 167 802 167 -fill $color -tags {floor2 wall}
  916     $w create line 747 167 747 189 -fill $color -tags {floor2 wall}
  917     $w create line 755 189 739 189 -fill $color -tags {floor2 wall}
  918     $w create line 769 224 757 224 -fill $color -tags {floor2 wall}
  919     $w create line 802 224 802 129 -fill $color -tags {floor2 wall}
  920     $w create line 802 129 725 129 -fill $color -tags {floor2 wall}
  921     $w create line 725 189 725 129 -fill $color -tags {floor2 wall}
  922     $w create line 725 186 690 186 -fill $color -tags {floor2 wall}
  923     $w create line 676 133 676 186 -fill $color -tags {floor2 wall}
  924     $w create line 627 144 627 186 -fill $color -tags {floor2 wall}
  925     $w create line 629 186 593 186 -fill $color -tags {floor2 wall}
  926     $w create line 579 144 579 186 -fill $color -tags {floor2 wall}
  927     $w create line 559 129 559 133 -fill $color -tags {floor2 wall}
  928     $w create line 725 133 559 133 -fill $color -tags {floor2 wall}
  929     $w create line 484 162 484 129 -fill $color -tags {floor2 wall}
  930     $w create line 559 129 484 129 -fill $color -tags {floor2 wall}
  931     $w create line 526 129 526 186 -fill $color -tags {floor2 wall}
  932     $w create line 540 186 581 186 -fill $color -tags {floor2 wall}
  933     $w create line 528 186 523 186 -fill $color -tags {floor2 wall}
  934     $w create line 511 186 475 186 -fill $color -tags {floor2 wall}
  935     $w create line 496 190 496 186 -fill $color -tags {floor2 wall}
  936     $w create line 496 205 496 202 -fill $color -tags {floor2 wall}
  937     $w create line 475 205 527 205 -fill $color -tags {floor2 wall}
  938     $w create line 558 205 539 205 -fill $color -tags {floor2 wall}
  939     $w create line 558 205 558 249 -fill $color -tags {floor2 wall}
  940     $w create line 558 249 475 249 -fill $color -tags {floor2 wall}
  941     $w create line 662 206 642 206 -fill $color -tags {floor2 wall}
  942     $w create line 695 206 675 206 -fill $color -tags {floor2 wall}
  943     $w create line 695 278 642 278 -fill $color -tags {floor2 wall}
  944     $w create line 642 291 642 206 -fill $color -tags {floor2 wall}
  945     $w create line 695 291 695 206 -fill $color -tags {floor2 wall}
  946     $w create line 716 208 716 206 -fill $color -tags {floor2 wall}
  947     $w create line 757 206 716 206 -fill $color -tags {floor2 wall}
  948     $w create line 757 221 757 224 -fill $color -tags {floor2 wall}
  949     $w create line 793 224 802 224 -fill $color -tags {floor2 wall}
  950     $w create line 757 262 716 262 -fill $color -tags {floor2 wall}
  951     $w create line 716 220 716 264 -fill $color -tags {floor2 wall}
  952     $w create line 716 315 716 276 -fill $color -tags {floor2 wall}
  953     $w create line 757 315 703 315 -fill $color -tags {floor2 wall}
  954     $w create line 757 325 757 224 -fill $color -tags {floor2 wall}
  955     $w create line 757 367 644 367 -fill $color -tags {floor2 wall}
  956     $w create line 689 367 689 315 -fill $color -tags {floor2 wall}
  957     $w create line 647 315 644 315 -fill $color -tags {floor2 wall}
  958     $w create line 659 315 691 315 -fill $color -tags {floor2 wall}
  959     $w create line 600 325 600 391 -fill $color -tags {floor2 wall}
  960     $w create line 627 325 644 325 -fill $color -tags {floor2 wall}
  961     $w create line 644 391 644 315 -fill $color -tags {floor2 wall}
  962     $w create line 615 325 575 325 -fill $color -tags {floor2 wall}
  963     $w create line 644 391 558 391 -fill $color -tags {floor2 wall}
  964     $w create line 563 325 558 325 -fill $color -tags {floor2 wall}
  965     $w create line 558 391 558 314 -fill $color -tags {floor2 wall}
  966     $w create line 558 327 508 327 -fill $color -tags {floor2 wall}
  967     $w create line 558 275 484 275 -fill $color -tags {floor2 wall}
  968     $w create line 558 302 558 275 -fill $color -tags {floor2 wall}
  969     $w create line 508 327 508 311 -fill $color -tags {floor2 wall}
  970     $w create line 484 311 508 311 -fill $color -tags {floor2 wall}
  971     $w create line 484 275 484 311 -fill $color -tags {floor2 wall}
  972     $w create line 475 208 408 208 -fill $color -tags {floor2 wall}
  973     $w create line 408 206 408 210 -fill $color -tags {floor2 wall}
  974     $w create line 408 222 408 227 -fill $color -tags {floor2 wall}
  975     $w create line 408 227 398 227 -fill $color -tags {floor2 wall}
  976     $w create line 398 227 398 254 -fill $color -tags {floor2 wall}
  977     $w create line 408 188 408 194 -fill $color -tags {floor2 wall}
  978     $w create line 383 188 376 188 -fill $color -tags {floor2 wall}
  979     $w create line 398 188 398 162 -fill $color -tags {floor2 wall}
  980     $w create line 398 162 484 162 -fill $color -tags {floor2 wall}
  981     $w create line 475 162 475 254 -fill $color -tags {floor2 wall}
  982     $w create line 398 254 475 254 -fill $color -tags {floor2 wall}
  983     $w create line 484 280 395 280 -fill $color -tags {floor2 wall}
  984     $w create line 395 311 395 275 -fill $color -tags {floor2 wall}
  985     $w create line 307 197 293 197 -fill $color -tags {floor2 wall}
  986     $w create line 278 197 233 197 -fill $color -tags {floor2 wall}
  987     $w create line 233 197 233 249 -fill $color -tags {floor2 wall}
  988     $w create line 307 179 284 179 -fill $color -tags {floor2 wall}
  989     $w create line 233 249 278 249 -fill $color -tags {floor2 wall}
  990     $w create line 269 179 269 133 -fill $color -tags {floor2 wall}
  991     $w create line 220 179 220 133 -fill $color -tags {floor2 wall}
  992     $w create line 155 191 110 191 -fill $color -tags {floor2 wall}
  993     $w create line 90 190 98 190 -fill $color -tags {floor2 wall}
  994     $w create line 98 169 98 190 -fill $color -tags {floor2 wall}
  995     $w create line 52 133 52 165 -fill $color -tags {floor2 wall}
  996     $w create line 52 214 52 177 -fill $color -tags {floor2 wall}
  997     $w create line 52 226 52 262 -fill $color -tags {floor2 wall}
  998     $w create line 52 274 52 276 -fill $color -tags {floor2 wall}
  999     $w create line 234 275 234 339 -fill $color -tags {floor2 wall}
 1000     $w create line 226 339 258 339 -fill $color -tags {floor2 wall}
 1001     $w create line 211 387 211 339 -fill $color -tags {floor2 wall}
 1002     $w create line 214 339 177 339 -fill $color -tags {floor2 wall}
 1003     $w create line 258 387 60 387 -fill $color -tags {floor2 wall}
 1004     $w create line 3 133 3 339 -fill $color -tags {floor2 wall}
 1005     $w create line 165 339 129 339 -fill $color -tags {floor2 wall}
 1006     $w create line 117 339 80 339 -fill $color -tags {floor2 wall}
 1007     $w create line 68 339 59 339 -fill $color -tags {floor2 wall}
 1008     $w create line 0 339 46 339 -fill $color -tags {floor2 wall}
 1009     $w create line 60 391 0 391 -fill $color -tags {floor2 wall}
 1010     $w create line 0 339 0 391 -fill $color -tags {floor2 wall}
 1011     $w create line 60 387 60 391 -fill $color -tags {floor2 wall}
 1012     $w create line 258 329 258 387 -fill $color -tags {floor2 wall}
 1013     $w create line 350 329 258 329 -fill $color -tags {floor2 wall}
 1014     $w create line 395 311 350 311 -fill $color -tags {floor2 wall}
 1015     $w create line 398 129 315 129 -fill $color -tags {floor2 wall}
 1016     $w create line 176 133 315 133 -fill $color -tags {floor2 wall}
 1017     $w create line 176 129 96 129 -fill $color -tags {floor2 wall}
 1018     $w create line 3 133 96 133 -fill $color -tags {floor2 wall}
 1019     $w create line 66 387 66 339 -fill $color -tags {floor2 wall}
 1020     $w create line 115 387 115 339 -fill $color -tags {floor2 wall}
 1021     $w create line 163 387 163 339 -fill $color -tags {floor2 wall}
 1022     $w create line 234 275 276 275 -fill $color -tags {floor2 wall}
 1023     $w create line 288 275 309 275 -fill $color -tags {floor2 wall}
 1024     $w create line 298 275 298 329 -fill $color -tags {floor2 wall}
 1025     $w create line 341 283 350 283 -fill $color -tags {floor2 wall}
 1026     $w create line 321 275 341 275 -fill $color -tags {floor2 wall}
 1027     $w create line 375 275 395 275 -fill $color -tags {floor2 wall}
 1028     $w create line 315 129 315 170 -fill $color -tags {floor2 wall}
 1029     $w create line 376 170 307 170 -fill $color -tags {floor2 wall}
 1030     $w create line 307 250 307 170 -fill $color -tags {floor2 wall}
 1031     $w create line 376 245 376 170 -fill $color -tags {floor2 wall}
 1032     $w create line 340 241 307 241 -fill $color -tags {floor2 wall}
 1033     $w create line 340 245 340 224 -fill $color -tags {floor2 wall}
 1034     $w create line 340 210 340 201 -fill $color -tags {floor2 wall}
 1035     $w create line 340 187 340 170 -fill $color -tags {floor2 wall}
 1036     $w create line 340 206 307 206 -fill $color -tags {floor2 wall}
 1037     $w create line 293 250 307 250 -fill $color -tags {floor2 wall}
 1038     $w create line 271 179 238 179 -fill $color -tags {floor2 wall}
 1039     $w create line 226 179 195 179 -fill $color -tags {floor2 wall}
 1040     $w create line 176 129 176 179 -fill $color -tags {floor2 wall}
 1041     $w create line 182 179 176 179 -fill $color -tags {floor2 wall}
 1042     $w create line 174 169 176 169 -fill $color -tags {floor2 wall}
 1043     $w create line 162 169 90 169 -fill $color -tags {floor2 wall}
 1044     $w create line 96 169 96 129 -fill $color -tags {floor2 wall}
 1045     $w create line 175 227 90 227 -fill $color -tags {floor2 wall}
 1046     $w create line 90 190 90 227 -fill $color -tags {floor2 wall}
 1047     $w create line 52 179 3 179 -fill $color -tags {floor2 wall}
 1048     $w create line 52 228 3 228 -fill $color -tags {floor2 wall}
 1049     $w create line 52 276 3 276 -fill $color -tags {floor2 wall}
 1050     $w create line 155 177 155 169 -fill $color -tags {floor2 wall}
 1051     $w create line 110 191 110 169 -fill $color -tags {floor2 wall}
 1052     $w create line 155 189 155 197 -fill $color -tags {floor2 wall}
 1053     $w create line 350 283 350 329 -fill $color -tags {floor2 wall}
 1054     $w create line 162 197 155 197 -fill $color -tags {floor2 wall}
 1055     $w create line 341 275 341 283 -fill $color -tags {floor2 wall}
 1056 }
 1057 
 1058 # fg3 --
 1059 # This procedure represents part of the floorplan database.  When
 1060 # invoked, it instantiates the foreground information for the third
 1061 # floor (office outlines and numbers).
 1062 #
 1063 # Arguments:
 1064 # w -       The canvas window.
 1065 # color -   Color to use for drawing foreground information.
 1066 
 1067 proc fg3 {w color} {
 1068     global floorLabels floorItems
 1069     set i [$w create polygon 89 228 89 180 70 180 70 228 -outline {} -tags {floor3 room}]
 1070     set floorLabels($i) 316
 1071     set {floorItems(316)} $i
 1072     $w create text 79.5 204 -text 316 -fill $color -anchor c -tags {floor3 label}
 1073     set i [$w create polygon 115 368 162 368 162 323 115 323 -outline {} -tags {floor3 room}]
 1074     set floorLabels($i) 309
 1075     set {floorItems(309)} $i
 1076     $w create text 138.5 345.5 -text 309 -fill $color -anchor c -tags {floor3 label}
 1077     set i [$w create polygon 164 323 164 368 211 368 211 323 -outline {} -tags {floor3 room}]
 1078     set floorLabels($i) 308
 1079     set {floorItems(308)} $i
 1080     $w create text 187.5 345.5 -text 308 -fill $color -anchor c -tags {floor3 label}
 1081     set i [$w create polygon 256 368 212 368 212 323 256 323 -outline {} -tags {floor3 room}]
 1082     set floorLabels($i) 307
 1083     set {floorItems(307)} $i
 1084     $w create text 234 345.5 -text 307 -fill $color -anchor c -tags {floor3 label}
 1085     set i [$w create polygon 244 276 297 276 297 327 260 327 260 321 244 321 -outline {} -tags {floor3 room}]
 1086     set floorLabels($i) 305
 1087     set {floorItems(305)} $i
 1088     $w create text 270.5 301.5 -text 305 -fill $color -anchor c -tags {floor3 label}
 1089     set i [$w create polygon 251 219 251 203 244 203 244 219 -outline {} -tags {floor3 room}]
 1090     set floorLabels($i) 324B
 1091     set {floorItems(324B)} $i
 1092     $w create text 247.5 211 -text 324B -fill $color -anchor c -tags {floor3 label}
 1093     set i [$w create polygon 251 249 244 249 244 232 251 232 -outline {} -tags {floor3 room}]
 1094     set floorLabels($i) 324A
 1095     set {floorItems(324A)} $i
 1096     $w create text 247.5 240.5 -text 324A -fill $color -anchor c -tags {floor3 label}
 1097     set i [$w create polygon 223 135 223 179 177 179 177 135 -outline {} -tags {floor3 room}]
 1098     set floorLabels($i) 320
 1099     set {floorItems(320)} $i
 1100     $w create text 200 157 -text 320 -fill $color -anchor c -tags {floor3 label}
 1101     set i [$w create polygon 114 368 114 323 67 323 67 368 -outline {} -tags {floor3 room}]
 1102     set floorLabels($i) 310
 1103     set {floorItems(310)} $i
 1104     $w create text 90.5 345.5 -text 310 -fill $color -anchor c -tags {floor3 label}
 1105     set i [$w create polygon 23 277 23 321 68 321 68 277 -outline {} -tags {floor3 room}]
 1106     set floorLabels($i) 312
 1107     set {floorItems(312)} $i
 1108     $w create text 45.5 299 -text 312 -fill $color -anchor c -tags {floor3 label}
 1109     set i [$w create polygon 23 229 68 229 68 275 23 275 -outline {} -tags {floor3 room}]
 1110     set floorLabels($i) 313
 1111     set {floorItems(313)} $i
 1112     $w create text 45.5 252 -text 313 -fill $color -anchor c -tags {floor3 label}
 1113     set i [$w create polygon 68 227 23 227 23 180 68 180 -outline {} -tags {floor3 room}]
 1114     set floorLabels($i) 314
 1115     set {floorItems(314)} $i
 1116     $w create text 45.5 203.5 -text 314 -fill $color -anchor c -tags {floor3 label}
 1117     set i [$w create polygon 95 179 95 135 23 135 23 179 -outline {} -tags {floor3 room}]
 1118     set floorLabels($i) 315
 1119     set {floorItems(315)} $i
 1120     $w create text 59 157 -text 315 -fill $color -anchor c -tags {floor3 label}
 1121     set i [$w create polygon 99 226 99 204 91 204 91 226 -outline {} -tags {floor3 room}]
 1122     set floorLabels($i) 316B
 1123     set {floorItems(316B)} $i
 1124     $w create text 95 215 -text 316B -fill $color -anchor c -tags {floor3 label}
 1125     set i [$w create polygon 91 202 99 202 99 180 91 180 -outline {} -tags {floor3 room}]
 1126     set floorLabels($i) 316A
 1127     set {floorItems(316A)} $i
 1128     $w create text 95 191 -text 316A -fill $color -anchor c -tags {floor3 label}
 1129     set i [$w create polygon 97 169 109 169 109 192 154 192 154 198 174 198 174 226 101 226 101 179 97 179 -outline {} -tags {floor3 room}]
 1130     set floorLabels($i) 319
 1131     set {floorItems(319)} $i
 1132     $w create text 141.5 209 -text 319 -fill $color -anchor c -tags {floor3 label}
 1133     set i [$w create polygon 65 368 58 368 58 389 1 389 1 333 23 333 23 323 65 323 -outline {} -tags {floor3 room}]
 1134     set floorLabels($i) 311
 1135     set {floorItems(311)} $i
 1136     $w create text 29.5 361 -text 311 -fill $color -anchor c -tags {floor3 label}
 1137     set i [$w create polygon 154 191 111 191 111 169 154 169 -outline {} -tags {floor3 room}]
 1138     set floorLabels($i) 318
 1139     set {floorItems(318)} $i
 1140     $w create text 132.5 180 -text 318 -fill $color -anchor c -tags {floor3 label}
 1141     set i [$w create polygon 175 168 97 168 97 131 175 131 -outline {} -tags {floor3 room}]
 1142     set floorLabels($i) 317
 1143     set {floorItems(317)} $i
 1144     $w create text 136 149.5 -text 317 -fill $color -anchor c -tags {floor3 label}
 1145     set i [$w create polygon 274 194 274 221 306 221 306 194 -outline {} -tags {floor3 room}]
 1146     set floorLabels($i) 323
 1147     set {floorItems(323)} $i
 1148     $w create text 290 207.5 -text 323 -fill $color -anchor c -tags {floor3 label}
 1149     set i [$w create polygon 306 222 274 222 274 249 306 249 -outline {} -tags {floor3 room}]
 1150     set floorLabels($i) 325
 1151     set {floorItems(325)} $i
 1152     $w create text 290 235.5 -text 325 -fill $color -anchor c -tags {floor3 label}
 1153     set i [$w create polygon 263 179 224 179 224 135 263 135 -outline {} -tags {floor3 room}]
 1154     set floorLabels($i) 321
 1155     set {floorItems(321)} $i
 1156     $w create text 243.5 157 -text 321 -fill $color -anchor c -tags {floor3 label}
 1157     set i [$w create polygon 314 169 306 169 306 192 273 192 264 181 264 135 314 135 -outline {} -tags {floor3 room}]
 1158     set floorLabels($i) 322
 1159     set {floorItems(322)} $i
 1160     $w create text 293.5 163.5 -text 322 -fill $color -anchor c -tags {floor3 label}
 1161     set i [$w create polygon 307 240 339 240 339 206 307 206 -outline {} -tags {floor3 room}]
 1162     set floorLabels($i) {Pub Lift3}
 1163     set {floorItems(Pub Lift3)} $i
 1164     $w create text 323 223 -text {Pub Lift3} -fill $color -anchor c -tags {floor3 label}
 1165     set i [$w create polygon 339 205 307 205 307 171 339 171 -outline {} -tags {floor3 room}]
 1166     set floorLabels($i) {Priv Lift3}
 1167     set {floorItems(Priv Lift3)} $i
 1168     $w create text 323 188 -text {Priv Lift3} -fill $color -anchor c -tags {floor3 label}
 1169     set i [$w create polygon 350 284 376 284 376 276 397 276 397 309 350 309 -outline {} -tags {floor3 room}]
 1170     set floorLabels($i) 303
 1171     set {floorItems(303)} $i
 1172     $w create text 373.5 292.5 -text 303 -fill $color -anchor c -tags {floor3 label}
 1173     set i [$w create polygon 272 203 272 249 252 249 252 230 244 230 244 221 252 221 252 203 -outline {} -tags {floor3 room}]
 1174     set floorLabels($i) 324
 1175     set {floorItems(324)} $i
 1176     $w create text 262 226 -text 324 -fill $color -anchor c -tags {floor3 label}
 1177     set i [$w create polygon 299 276 299 327 349 327 349 284 341 284 341 276 -outline {} -tags {floor3 room}]
 1178     set floorLabels($i) 304
 1179     set {floorItems(304)} $i
 1180     $w create text 324 301.5 -text 304 -fill $color -anchor c -tags {floor3 label}
 1181     set i [$w create polygon 375 246 375 172 341 172 341 246 -outline {} -tags {floor3 room}]
 1182     set floorLabels($i) 301
 1183     set {floorItems(301)} $i
 1184     $w create text 358 209 -text 301 -fill $color -anchor c -tags {floor3 label}
 1185     set i [$w create polygon 397 246 377 246 377 185 397 185 -outline {} -tags {floor3 room}]
 1186     set floorLabels($i) 327
 1187     set {floorItems(327)} $i
 1188     $w create text 387 215.5 -text 327 -fill $color -anchor c -tags {floor3 label}
 1189     set i [$w create polygon 316 131 316 169 377 169 377 185 397 185 397 131 -outline {} -tags {floor3 room}]
 1190     set floorLabels($i) 326
 1191     set {floorItems(326)} $i
 1192     $w create text 356.5 150 -text 326 -fill $color -anchor c -tags {floor3 label}
 1193     set i [$w create polygon 308 251 242 251 242 274 342 274 342 282 375 282 375 274 397 274 397 248 339 248 339 242 308 242 -outline {} -tags {floor3 room}]
 1194     set floorLabels($i) 302
 1195     set {floorItems(302)} $i
 1196     $w create text 319.5 261 -text 302 -fill $color -anchor c -tags {floor3 label}
 1197     set i [$w create polygon 70 321 242 321 242 200 259 200 259 203 272 203 272 193 263 180 242 180 175 180 175 169 156 169 156 196 177 196 177 228 107 228 70 228 70 275 107 275 107 248 160 248 160 301 107 301 107 275 70 275 -outline {} -tags {floor3 room}]
 1198     set floorLabels($i) 306
 1199     set {floorItems(306)} $i
 1200     $w create text 200.5 284.5 -text 306 -fill $color -anchor c -tags {floor3 label}
 1201     $w create line 341 275 341 283 -fill $color -tags {floor3 wall}
 1202     $w create line 162 197 155 197 -fill $color -tags {floor3 wall}
 1203     $w create line 396 247 399 247 -fill $color -tags {floor3 wall}
 1204     $w create line 399 129 399 311 -fill $color -tags {floor3 wall}
 1205     $w create line 258 202 243 202 -fill $color -tags {floor3 wall}
 1206     $w create line 350 283 350 329 -fill $color -tags {floor3 wall}
 1207     $w create line 251 231 243 231 -fill $color -tags {floor3 wall}
 1208     $w create line 243 220 251 220 -fill $color -tags {floor3 wall}
 1209     $w create line 243 250 243 202 -fill $color -tags {floor3 wall}
 1210     $w create line 155 197 155 190 -fill $color -tags {floor3 wall}
 1211     $w create line 110 192 110 169 -fill $color -tags {floor3 wall}
 1212     $w create line 155 192 110 192 -fill $color -tags {floor3 wall}
 1213     $w create line 155 177 155 169 -fill $color -tags {floor3 wall}
 1214     $w create line 176 197 176 227 -fill $color -tags {floor3 wall}
 1215     $w create line 69 280 69 274 -fill $color -tags {floor3 wall}
 1216     $w create line 21 276 69 276 -fill $color -tags {floor3 wall}
 1217     $w create line 69 262 69 226 -fill $color -tags {floor3 wall}
 1218     $w create line 21 228 69 228 -fill $color -tags {floor3 wall}
 1219     $w create line 21 179 75 179 -fill $color -tags {floor3 wall}
 1220     $w create line 69 179 69 214 -fill $color -tags {floor3 wall}
 1221     $w create line 90 220 90 227 -fill $color -tags {floor3 wall}
 1222     $w create line 90 204 90 202 -fill $color -tags {floor3 wall}
 1223     $w create line 90 203 100 203 -fill $color -tags {floor3 wall}
 1224     $w create line 90 187 90 179 -fill $color -tags {floor3 wall}
 1225     $w create line 90 227 176 227 -fill $color -tags {floor3 wall}
 1226     $w create line 100 179 100 227 -fill $color -tags {floor3 wall}
 1227     $w create line 100 179 87 179 -fill $color -tags {floor3 wall}
 1228     $w create line 96 179 96 129 -fill $color -tags {floor3 wall}
 1229     $w create line 162 169 96 169 -fill $color -tags {floor3 wall}
 1230     $w create line 173 169 176 169 -fill $color -tags {floor3 wall}
 1231     $w create line 182 179 176 179 -fill $color -tags {floor3 wall}
 1232     $w create line 176 129 176 179 -fill $color -tags {floor3 wall}
 1233     $w create line 195 179 226 179 -fill $color -tags {floor3 wall}
 1234     $w create line 224 133 224 179 -fill $color -tags {floor3 wall}
 1235     $w create line 264 179 264 133 -fill $color -tags {floor3 wall}
 1236     $w create line 238 179 264 179 -fill $color -tags {floor3 wall}
 1237     $w create line 273 207 273 193 -fill $color -tags {floor3 wall}
 1238     $w create line 273 235 273 250 -fill $color -tags {floor3 wall}
 1239     $w create line 273 224 273 219 -fill $color -tags {floor3 wall}
 1240     $w create line 273 193 307 193 -fill $color -tags {floor3 wall}
 1241     $w create line 273 222 307 222 -fill $color -tags {floor3 wall}
 1242     $w create line 273 250 307 250 -fill $color -tags {floor3 wall}
 1243     $w create line 384 247 376 247 -fill $color -tags {floor3 wall}
 1244     $w create line 340 206 307 206 -fill $color -tags {floor3 wall}
 1245     $w create line 340 187 340 170 -fill $color -tags {floor3 wall}
 1246     $w create line 340 210 340 201 -fill $color -tags {floor3 wall}
 1247     $w create line 340 247 340 224 -fill $color -tags {floor3 wall}
 1248     $w create line 340 241 307 241 -fill $color -tags {floor3 wall}
 1249     $w create line 376 247 376 170 -fill $color -tags {floor3 wall}
 1250     $w create line 307 250 307 170 -fill $color -tags {floor3 wall}
 1251     $w create line 376 170 307 170 -fill $color -tags {floor3 wall}
 1252     $w create line 315 129 315 170 -fill $color -tags {floor3 wall}
 1253     $w create line 376 283 366 283 -fill $color -tags {floor3 wall}
 1254     $w create line 376 283 376 275 -fill $color -tags {floor3 wall}
 1255     $w create line 399 275 376 275 -fill $color -tags {floor3 wall}
 1256     $w create line 341 275 320 275 -fill $color -tags {floor3 wall}
 1257     $w create line 341 283 350 283 -fill $color -tags {floor3 wall}
 1258     $w create line 298 275 298 329 -fill $color -tags {floor3 wall}
 1259     $w create line 308 275 298 275 -fill $color -tags {floor3 wall}
 1260     $w create line 243 322 243 275 -fill $color -tags {floor3 wall}
 1261     $w create line 243 275 284 275 -fill $color -tags {floor3 wall}
 1262     $w create line 258 322 226 322 -fill $color -tags {floor3 wall}
 1263     $w create line 212 370 212 322 -fill $color -tags {floor3 wall}
 1264     $w create line 214 322 177 322 -fill $color -tags {floor3 wall}
 1265     $w create line 163 370 163 322 -fill $color -tags {floor3 wall}
 1266     $w create line 165 322 129 322 -fill $color -tags {floor3 wall}
 1267     $w create line 84 322 117 322 -fill $color -tags {floor3 wall}
 1268     $w create line 71 322 64 322 -fill $color -tags {floor3 wall}
 1269     $w create line 115 322 115 370 -fill $color -tags {floor3 wall}
 1270     $w create line 66 322 66 370 -fill $color -tags {floor3 wall}
 1271     $w create line 52 322 21 322 -fill $color -tags {floor3 wall}
 1272     $w create line 21 331 0 331 -fill $color -tags {floor3 wall}
 1273     $w create line 21 331 21 133 -fill $color -tags {floor3 wall}
 1274     $w create line 96 133 21 133 -fill $color -tags {floor3 wall}
 1275     $w create line 176 129 96 129 -fill $color -tags {floor3 wall}
 1276     $w create line 315 133 176 133 -fill $color -tags {floor3 wall}
 1277     $w create line 315 129 399 129 -fill $color -tags {floor3 wall}
 1278     $w create line 399 311 350 311 -fill $color -tags {floor3 wall}
 1279     $w create line 350 329 258 329 -fill $color -tags {floor3 wall}
 1280     $w create line 258 322 258 370 -fill $color -tags {floor3 wall}
 1281     $w create line 60 370 258 370 -fill $color -tags {floor3 wall}
 1282     $w create line 60 370 60 391 -fill $color -tags {floor3 wall}
 1283     $w create line 0 391 0 331 -fill $color -tags {floor3 wall}
 1284     $w create line 60 391 0 391 -fill $color -tags {floor3 wall}
 1285     $w create line 307 250 307 242 -fill $color -tags {floor3 wall}
 1286     $w create line 273 250 307 250 -fill $color -tags {floor3 wall}
 1287     $w create line 258 250 243 250 -fill $color -tags {floor3 wall}
 1288 }
 1289 
 1290 # Below is the "main program" that creates the floorplan demonstration.
 1291 
 1292 set w .floor
 1293 global c currentRoom colors activeFloor
 1294 catch {destroy $w}
 1295 toplevel $w
 1296 wm title $w "Floorplan Canvas Demonstration"
 1297 wm iconname $w "Floorplan"
 1298 wm geometry $w +20+20
 1299 wm minsize $w 100 100
 1300 
 1301 label $w.msg -font $font -wraplength 8i -justify left  -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."
 1302 pack $w.msg -side top
 1303 
 1304 ## See Code / Dismiss buttons
 1305 set btns [addSeeDismiss $w.buttons $w]
 1306 pack $btns -side bottom -fill x
 1307 
 1308 set f [frame $w.frame]
 1309 pack $f -side top -fill both -expand yes
 1310 set h [ttk::scrollbar $f.hscroll -orient horizontal]
 1311 set v [ttk::scrollbar $f.vscroll -orient vertical]
 1312 set f1 [frame $f.f1 -borderwidth 2 -relief sunken]
 1313 set c [canvas $f1.c -width 900 -height 500 -highlightthickness 0 \
 1314        -xscrollcommand [list $h set] \
 1315        -yscrollcommand [list $v set]]
 1316 pack $c -expand yes -fill both
 1317 grid $f1 -padx 1 -pady 1 -row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news
 1318 grid $v -padx 1 -pady 1 -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news
 1319 grid $h -padx 1 -pady 1 -row 1 -column 0 -rowspan 1 -columnspan 1 -sticky news
 1320 grid rowconfig    $f 0 -weight 1 -minsize 0
 1321 grid columnconfig $f 0 -weight 1 -minsize 0
 1322 pack $f -expand yes -fill both -padx 1 -pady 1
 1323 
 1324 $v configure -command [list $c yview]
 1325 $h configure -command [list $c xview]
 1326 
 1327 # Create an entry for displaying and typing in current room.
 1328 
 1329 entry $c.entry -width 10 -textvariable currentRoom
 1330 
 1331 # Choose colors, then fill in the floorplan.
 1332 
 1333 if {[winfo depth $c] > 1} {
 1334     set colors(bg1) #a9c1da
 1335     set colors(outline1) #77889a
 1336     set colors(bg2) #9ab0c6
 1337     set colors(outline2) #687786
 1338     set colors(bg3) #8ba0b3
 1339     set colors(outline3) #596673
 1340     set colors(offices) Black
 1341     set colors(active) #c4d1df
 1342 } else {
 1343     set colors(bg1) white
 1344     set colors(outline1) black
 1345     set colors(bg2) white
 1346     set colors(outline2) black
 1347     set colors(bg3) white
 1348     set colors(outline3) black
 1349     set colors(offices) Black
 1350     set colors(active) black
 1351 }
 1352 set activeFloor ""
 1353 floorDisplay $c 3
 1354 
 1355 # Set up event bindings for canvas:
 1356 
 1357 $c bind floor1 <1> "floorDisplay $c 1"
 1358 $c bind floor2 <1> "floorDisplay $c 2"
 1359 $c bind floor3 <1> "floorDisplay $c 3"
 1360 $c bind room <Enter> "newRoom $c"
 1361 $c bind room <Leave> {set currentRoom ""}
 1362 bind $c <2> "$c scan mark %x %y"
 1363 bind $c <B2-Motion> "$c scan dragto %x %y"
 1364 bind $c <Destroy> "unset currentRoom"
 1365 set currentRoom ""
 1366 trace variable currentRoom w "roomChanged $c"