globals
[ tool-tip-delay ;; delay between pointer entering a hot-spot and the tool-top appearing in the pointer.
  observer-message ;; way for pointer turtle to tell the observer to do things only the observer can do
  toolbar-top ;; top pycor of the tool-bar
  messages ;; displayed by a monitor to show non-popup messages to the user
]

breed [ hot-spots hot-spot ] ;; turtles that are hot (active) for mouse events

breed [ pointers pointer ] ;; turtles that track the mouse

;; Note, there is only ever one turtle of breed pointer, but will still say "ask pointers ..."

pointers-own
[ click  ;; true false-- used to track the progress of a click event
  state ;; hover, down, drag, up
  ox oy ;; old mouse x, old mouse y, used to determine if the pointer has moved.
]

hot-spots-own
[ name         ;; friendly name of the hot spot
  hot-zone-top ;; top ycor of the active area of the hot-spot
  hot-zone-right ;; right xcor ...
  hot-zone-bottom ;; bottom ycor ...
  hot-zone-left ;;; left xcor ...
  sticky? ;; when clicked, this button stays clicked (i.e. it is a toggle)
  value   ;; many buttons set a value (ie color or line width)--this is the value
          ;; also used when a set of similar buttons do slightly different things
          ;; e.g. setting line thickness
  tool-tip ;; helpful text that appears next to button and in "messages" area
  arrived ;; time that the pointer arrived in the button
  state   ;; up or down -- only important when sticky? is true
          ;; tells the current state of the button
  action  ;; string or number that identifies action (in actions procedure) this hotspot causes
          ;; in this model, actions are named so that their first letters are distinct,
          ;; so that the action-detecting logic can be abbreviated.
  order   ;; the order the button appears in the tool-bar
  click   ;; goes true when mouse button down occurs inside the hot-spot
  mouse-here ;; flag for the pointer's entry and exit into the hot-spot: enter here exit <blank>
]

patches-own
[
]

to startup
   ;; run setup when the model loads.
   setup
end

to setup
   no-display
   ca
   set toolbar-top max-pycor
   set messages "Welcome to quick-draw, by James P. Steiner!"
   setup-hot-spots
   setup-pointers
   display
end

to setup-pointers
   ;; make exactly one pointer turtle
   create-pointers 1
   [ set shape "--paintblob"
     set color white
     set state "h"
     set click false
     set heading 0
     set-drawing-line-thickness 1.0
   ]
   set-pointer-color grey
   set-pointer-color-tint 0
end   

to setup-hot-spots

   ;; delay in seconds before showing tool-tip
   set tool-tip-delay 1.0 
   
   ;; setup set of hot patches
   ;; ie patches that are active for mouse events
   
   ;; the list is an easy structure to use to layout the toolbar
   ;; and define the properties of the hot-spots.
   ;; it allows us to take shortcuts, for example,
   ;; for the most part, the action of the hot-spot
   ;; is the same as the name, so we can put "" for the action, 
   ;; and the button-creator will automatically copy the name into the action.
   ;; likewise, if properties are not defined in the list, 
   ;; the default values are used when the hot-spot is created.
   
   let hot-spot-list
   [ ;; name shape tip value action sticky?
     
     [ "open"   "button-file-open" "Open" ]
     [ "save"   "button-file-save" "SAVE" ] 
     
     [ "line-1" "button-line-1" "Size=0.10"   .10  ] 
     [ "line-2" "button-line-2" "Size=0.25"   .25  ] 
     [ "line-3" "button-line-3" "Size=0.50"   .50  ] 
     [ "line-4" "button-line-4" "Size=0.75"   .75  ] 
     [ "line-5" "button-line-5" "Size=1.00"  1.00  ] 
     [ "line-6" "button-line-6" "Size=1.50"  1.50  ] 
     
     
     [ "tint-1" "button-tint" "Set color tint 1 (darkest)"   -3 ] 
     [ "tint-3" "button-tint" "Set color tint 3 (dark)"      -1 ] 
     [ "tint-5" "button-tint" "Set color tint 5 (middle)"     0 ] 
     [ "tint-7" "button-tint" "Set color tint 7 (light)"      1 ] 
     [ "tint-9" "button-tint" "Set color tint 9 (lightest)"   3 ]
     
     [ "move-toolbar"  "button-move-toolbar" "Move toolbar" "" "" true ] 
     [ "#####" "button-spacer" ]
     [ "wipe"   "button-wipe" "Wipe (erase) the drawing" ] 
     
     [ "col-000-black"     "button-000-black"     "Change color"  000   ]
     [ "col-005-gray"      "button-005-gray"      "Change color"  005   ]
     [ "col-009-white"     "button-009-white"     "Change color"  009.9 ]
     [ "col-015-red"       "button-015-red"       "Change color"  015   ]
     [ "col-025-orange"    "button-025-orange"    "Change color"  025   ]
     [ "col-035-brown"     "button-035-brown"     "Change color"  035   ]
     [ "col-045-yellow"    "button-045-yellow"    "Change color"  045   ]
     [ "col-055-green"     "button-055-green"     "Change color"  055   ]
     [ "col-065-lime"      "button-065-lime"      "Change color"  065   ]
     [ "col-075-turquoise" "button-075-turquoise" "Change color"  075   ]
     [ "col-085-cyan"      "button-085-cyan"      "Change color"  085   ]
     [ "col-095-sky"       "button-095-sky"       "Change color"  095   ]
     [ "col-105-blue"      "button-105-blue"      "Change color"  105   ]
     [ "col-115-violet"    "button-115-violet"    "Change color"  115   ]
     [ "col-125-magenta"   "button-125-magenta"   "Change color"  125   ]
     [ "col-135-pink"      "button-135-pink"      "Change color"  135   ]
     
   ]
  
   foreach hot-spot-list
   [ let b-name first ?
     let b-shape item 1 ?
     let b-action b-name ;; use name as default action
     let b-value 0
     let b-sticky? false ;; defaults to not sticky
     let b-tool-tip ""
     ;; if tool-tip is specified, use that, instead
     if length ? > 2 and item 2 ? != "" [ set b-tool-tip item 2 ? ]
     ;; if value is specified, use that, instead
     if length ? > 3 and item 3 ? != "" [ set b-value    item 3 ? ]
     ;; if action is specified, use that, instead
     if length ? > 4 and item 4 ? != "" [ set b-action   item 4 ? ]
     ;; if sticky? is specified, use that, instead
     if length ? > 5 and item 5 ? != "" [ set b-sticky?  item 5 ? ]
     
     create-button b-name b-shape b-action b-value b-sticky? b-tool-tip
   ]
end

to create-button [ b-name b-shape b-action b-value b-sticky? b-tool-tip ]
   create-hot-spots 1
   [ button-apply-default-properties
     set name b-name
     set shape b-shape
     set action b-action
     set value b-value
     set sticky? b-sticky?
     set tool-tip (word b-tool-tip "  ")
     if sticky? [ set color white ]
   ]
end

to button-apply-default-properties
   set color gray
   set size 2
   set order count hot-spots - 1
   set name ""
   set shape "button"
   set action ""
   set sticky? false
   set tool-tip ""
   set value 0
   set state "u"

   set-hot-spot-xy
   set mouse-here "" ;; not here
   
end

to set-hot-spot-xy
   let columns int (world-width * .5)
   let row int (order / columns)
   let col order mod columns
   setxy int (min-pxcor + 1 + 2 * col) int (toolbar-top - 1 - 2 * row)
   set hot-zone-top ycor + 1
   set hot-zone-right xcor + 1
   set hot-zone-bottom ycor - 1
   set hot-zone-left xcor - 1
end
   

to monitor-mouse
   if mouse-inside?
   [ ask pointers
     [ setxy mouse-xcor mouse-ycor
       ifelse mouse-down?
       [ ifelse click = false
         [ ;; click-beginning
           mouse-down
         ]
         [ ;; mouse-down, possible drag in progress
           mouse-drag
         ]
       ]
       [ ;; mouse is up
         ifelse click = true
         [ ;; click ending, possible drop
           mouse-up
         ]
         [ ;; mouse-up, hover
           mouse-hover
         ]
       ]
     ]
   ]
end



to mouse-down
   ask pointers
   [ set click true 
     set state "c"
   ]
end

to mouse-drag
   ask pointers 
   [ if ox != mouse-xcor or oy != mouse-ycor 
     [ set state "dr" 
       set ox mouse-xcor
       set oy mouse-ycor
     ]
     
   ]
     
   
end

to mouse-up
   ask pointers
   [ set state "u" 
     set click false
     pu
   ]
end

to mouse-hover
   ask pointers
   [ set state "h" ;;hover

   ]
end
  
to go-hotspots
   let px 0
   let py 0
   let ps "" ;; pointer state: h(over) click drag up h(over)
   let hot-spot-click? false
   let new-message ""
   ask pointers 
   [ set px xcor
     set py ycor 
     set ps state
   ]
   ask hot-spots
   [ ifelse px > hot-zone-left and px < hot-zone-right
        and py > hot-zone-bottom and py < hot-zone-top
     [ ;; mouse is inside this hot-spot
       ;; did mouse just enter this hot spot?
       if mouse-here = ""
       [ ;; yes, make a note of that
         set mouse-here "enter" ;; after handling, will be set to "here"
       ]
     ]
     [ ;; mouse is outside this hotspot
       ;; did mouse just leave?
       if mouse-here != ""
       [ ;; yes, make a note of it
         set mouse-here "exit" ;; after handling, will be set to ""
       ]
     ]
     
     ifelse mouse-here = "enter" and ps = "h" 
     [ ;; learned earlier that mouse just entered this hot-spot
       ;; act on mouse entering this hot-spot
       ;; apply "slightly pressed" effect
       setxy (pxcor - .1) (pycor + .1)
       ;; remember time that pointer arrived here
       set arrived timer
       set new-message tool-tip
       ;; now that enter has been acted on, mouse-here becomes "here"
       set mouse-here "here"
       
     ][
     
     ;; if the pointer just exited and the hot-spot click is false (no click has started here)
     ;; or a click started here, (but didn't finish), and pointer isn't here anymore, and the mouse button just came up
     if (mouse-here = "exit" and click != true ) or (click = true and mouse-here = "exit" and ps = "u")
     [ ;; set the button to it's "idle" appearance
       setxy pxcor pycor
       ;; note that the mouse is not here 
       set mouse-here ""
       ;; note that click is no longer pending for here
       set click false
       if new-message = "" [ set new-message "-" ]
       set arrived 0
       
     ]] 
     
     ;; if the pointer is currently inside this hot-spot
     if mouse-here = "here"
     [ 
       if arrived != 0 and timer > arrived + tool-tip-delay
       [ ;; show tip
         ask pointers 
         [ set label [tool-tip] of myself
           
           set label-color 9.9 - label-color
         ]
         set arrived arrived + 1
       ]
       
       ;; if mouse button has just gone from up to down while here, 
       ;; ie mouse click began here, make a note of that
       if ps = "c"
       [ set click true
         ;; apply "pressed" appearance
         setxy (pxcor + .1) (pycor - .1)
         ;; clear label
         ask pointers [ set label "" ]
         set hot-spot-click? true
       ]
       
       ;; if pointer has gone from down to up ... (button released)( WHILE HERE)
       if ps = "u"
       [ ;; see if the click started here
         if click = true
         [ ;; it did! so this completes a click on the hot-spot
           ;; reset the click state
           set click false
           ;; apply "slightly pressed" effect
           setxy (pxcor - .1) (pycor + .1)
           ;; clear tool-tip
           ask pointers [ set label "" ]
           set arrived 0
           ;; see if the button is sticky, if so, change state
           ;; -- action will act on current state
           if sticky?
           [ ifelse state = "d"
             [ set state "u"  ]
             [ set state "d"  ]
           ]
           ;; now, do the button-click action for this button
           do-button-action
         ]
       ]
     ]
   ]
   if new-message != "" [ set messages new-message ]
   if hot-spot-click? = false
   [ ask pointers
     [ if state = "c"
       [ stamp 
         pd
       ]
     ]
   ]
end
     
to do-button-action
   ;; a hot spot runs this code
   let a first action
   ;; COLOR
   ifelse a = "c" [ set-pointer-color value ][
   ;; LINE THICKNESS
   ifelse a = "l" [ set-drawing-line-thickness value ][
   ;; TINT
   ifelse a = "t" [ set-pointer-color-tint value][
   ;; SAVE (EXPORT) VIEW
   ifelse a = "s" [ set observer-message "s" ][
   ;; OPEN (IMPORT) DRAWING
   ifelse a = "o" [ set observer-message "o" ][
   ;; WIPE (ERASE) VIEW
   ifelse a = "w" [ set observer-message "w" ][
   ;; MOVE TOOLBAR
   ifelse a = "m" [ move-toolbar ][
   ]]]]]]]
end

to move-toolbar
   ifelse toolbar-top = max-pycor
   [ let cols int (world-width / 2)
     let rows int (.5 + (count hot-spots) / cols)
     set toolbar-top min-pycor + 2 * rows 
     set color blue
   ]
   [ set toolbar-top max-pycor
     set color white
   ]
   ask hot-spots [ set-hot-spot-xy ]
end

to set-pointer-color [ new-color ]
   ask pointers [ set color new-color]
   ask hot-spots with [ starts-with "line" name ] [ set color new-color ]
   set new-color new-color - new-color mod 10 + 5
   ask hot-spots with [ starts-with "tint" name ] [ set color new-color + value ]
   
end

to set-drawing-line-thickness [ new-size ]
   ask pointers
   [ set pen-size new-size * 15 ;; * pixels per patch
     set size 1.01 * new-size
   ]
end

to set-pointer-color-tint [ new-tint ]
   let new-color 0
   let hue 0
   ask pointers [set hue precision (color - 5) -1 set new-color hue + 5 + new-tint  set color new-color] 
   ask hot-spots with [ starts-with "line" name ] [ set color new-color ]
   
end   

to save-drawing
   let filename user-new-file
   if is-string? filename
   [ if not (ends-with ".png" filename )
     [ set filename (word filename  ".png") ]
     ask turtles [ hide-turtle ]
     carefully [ export-view filename ] []
     ask turtles [ show-turtle ]
   ]
end

to open-drawing
   let filename user-file
   if is-string? filename
   [ carefully [ import-drawing filename ] []
   ]
end

   
to wipe-drawing
   if (user-yes-or-no? "Are you sure you want to wipe the drawing?" )
   [ clear-drawing
     let new-color 0
     ask pointers [ set new-color color ]
     cp
     ask patches [ set pcolor new-color ]
   ]
end
   
to go
   ;every .01
   ;[ 
     no-display
     monitor-mouse
     go-hotspots
     handle-observer-messages
     display
   ;]
end
    
to-report ends-with [ suffix string ]
   ;; reports true of the given string ends with the given suffix
   let len length string
   report (suffix = substring string (len - length suffix) len)
end

to-report starts-with [ prefix string ]
   ;; reports true if given prefix matches the beginning of string
   report (prefix = substring string 0 length prefix)
end
      
to handle-observer-messages
   ;; allows the turtle-based pointer to request actions
   ;; that can only or should only be performed by the observer
   if observer-message != ""
   [ if observer-message = "s" [ save-drawing ]
     if observer-message = "o" [ open-drawing ]
     if observer-message = "w" [ wipe-drawing ]
     set observer-message ""
   ]
end     
@#$#@#$#@
GRAPHICS-WINDOW
82
60
587
586
16
16
15.0
1
18
1
1
1
0
0
0
1
-16
16
-16
16
0
0
1
ticks

CC-WINDOW
5
600
652
695
Command Center
0

BUTTON
9
10
72
43
NIL
setup
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL

BUTTON
9
47
72
80
NIL
go
T
1
T
OBSERVER
NIL
NIL
NIL
NIL

TEXTBOX
11
83
62
186
Press \"go\" to activate drawing tools.
11
0.0
0

MONITOR
82
10
643
55
Messages:
messages
3
1
11

@#$#@#$#@
WHAT IS IT?
-----------
A simple drawing tool as a proof-of-concept of using turtles as toolbar buttons in an in-view GUI.

HOW TO USE IT
-------------
Click GO (go will turn black, and remain pressed) to activate the drawing panel and the buttons.

Click GO again (go will return to it's not-pressed state) to deactivate the drawing panel.

Click on a tool bar button to set the color, alter the color tint, set line thickness, save, import, or erase the drawing, or move the tool-bar itself. Click and drag in the drawing area to draw with the current color and line thickness.

HOW DOES IT WORK?
----------------
The model defines a breed a breed of turtles called "hot-spots."

Hotspots have location and an extent (the hot-spot-top, -bottom, -left, -right) that can be independent of the turtle size. Hot spots also have properties Name, Shape (of course), Sticky?, value, and tool-tip

There is also a turtle breed called pointers.

A single pointer turtle follows the mouse cursor. It could be hidden, or as in this case, be used to show additional information about the pointer (in this case, color and brush size).

The pointer monitors and records changes in the mouse button state--the pointer state can be hover, click (mouse button just pressed), drag (mouse button continues to be pressed), and up (mouse button just released)

The hotspots all monitor the pointer location to keep track of if/when the pointer enters and leaves the hotspot, and the state of the buttons while there. The hotspots respond to these events.

In this case, the hotspots are rendered as buttons, and the buttons move a little when the pointer hovers over them, display a tool-tip if the hover lasts long enough, and move even more (a "button click" effect) when the mouse button is pressed.

The hotspots behave much like GUI buttons in other interfaces: If the mouse moves off the hotspot while the mouse button is pressed down, the hotspot button remains down. If the mouse button is released while the pointer is off the button, the button popps up, but no action occurs. Button actions occur when the mouse button is released and the pointer is still over the button.

In-view graphical interfaces also mean that the interface can be hidden when not needed, or changed, depending on activity, and this could be handy for educational models where a cluttered panel of traditional static NetLogo controls is undesireable. For example, in Network model, when a node is selected, only general, and node-specific controls would be visible, but link-specific controls (e.g. delete link) would be disabled, or hidden.

----------

COPYRIGHT

----------
Copyright (C) 2007, James P. Steiner
@#$#@#$#@
default
true
3
Polygon -13840069 true false 75 255 30 225 45 225 45 210 60 210 60 195 90 240
Polygon -13840069 true false 135 60 120 30 135 0 165 0 180 30 165 60
Polygon -6459832 true true 120 60 180 60 210 75 225 105 225 210 210 240 180 255 120 255 90 240 75 210 75 120 90 75 120 60 120 90 180 90 105 210 120 225 195 105 195 210 180 225 120 225 105 210 105 105 120 90
Polygon -13840069 true false 135 255 150 270 135 300 165 270 165 255
Polygon -13840069 true false 225 255 270 225 255 225 255 210 240 210 240 195 210 240
Polygon -13840069 true false 225 90 270 60 255 60 255 45 240 45 240 30 210 75
Polygon -13840069 true false 75 90 30 60 45 60 45 45 60 45 60 30 90 75
Polygon -10899396 true false 105 210 105 105 120 90 180 90
Polygon -10899396 true false 120 225 195 105 195 210 180 225

--blank
false
0

--paintblob
false
0
Circle -7500403 true true 0 0 300

--pointer
false
0
Polygon -7500403 true true 150 150 300 300 255 315 285 405 195 435 165 345 120 360

block
false
0
Rectangle -7500403 true true 0 0 300 300

button
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285

button-000-black
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -16777216 true false 30 30 240

button-005-gray
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -7500403 true true 30 30 240

button-009-white
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -1 true false 30 30 240

button-015-red
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -2674135 true false 30 30 240

button-025-orange
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -955883 true false 30 30 240

button-035-brown
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -6459832 true false 30 30 240

button-045-yellow
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -1184463 true false 30 30 240

button-055-green
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -10899396 true false 30 30 240

button-065-lime
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -13840069 true false 30 30 240

button-075-turquoise
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -14835848 true false 30 30 240

button-085-cyan
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -11221820 true false 30 30 240

button-095-sky
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -13791810 true false 30 30 240

button-105-blue
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -13345367 true false 30 30 240

button-115-violet
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -8630108 true false 30 30 240

button-125-magenta
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -5825686 true false 30 30 240

button-135-pink
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 44 44 242
Circle -1 false false 15 15 240
Circle -2064490 true false 30 30 240

button-draw-circle
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 false false 45 45 210

button-draw-rectangle
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -16777216 false false 45 75 255 225

button-draw-square
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -16777216 false false 60 60 240 240

button-draw-triangle
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Polygon -16777216 false false 45 240 150 45 255 240

button-file-import
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Circle -16777216 true false 120 195 60
Rectangle -16777216 true false 120 225 180 270
Circle -7500403 true true 105 105 90
Circle -16777216 true false 120 120 60
Rectangle -7500403 true true 180 195 240 270
Polygon -1184463 true false 60 75 60 45 165 45 165 75 135 75 120 165 150 165 150 195 45 195 45 165 75 165 90 75
Rectangle -16777216 false false 30 30 270 270

button-file-open
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1184463 true false 75 180 210 75 165 30 270 30 270 135 225 90 135 225
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -16777216 false false 30 120 180 270
Circle -16777216 true false 90 180 30
Circle -16777216 true false 90 225 30
Rectangle -16777216 true false 90 240 120 270

button-file-save
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 15 75 135 150 90 195 195 195 195 90 150 135 75 15
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -16777216 false false 120 120 270 270
Circle -16777216 true false 180 180 30
Circle -16777216 true false 180 225 30
Rectangle -16777216 true false 180 240 210 270

button-line-1
false
1
Rectangle -7500403 true false 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -2674135 true true 30 165 270 195
Polygon -16777216 false false 135 45 195 15 210 45 180 60 210 45 240 120 225 165 180 150
Rectangle -16777216 false false 30 165 270 195

button-line-2
false
1
Rectangle -7500403 true false 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -2674135 true true 30 165 270 210
Polygon -16777216 false false 135 45 195 15 210 45 180 60 210 45 240 120 225 165 180 150
Rectangle -16777216 false false 30 165 270 210

button-line-3
false
1
Rectangle -7500403 true false 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -2674135 true true 30 165 270 225
Polygon -16777216 false false 135 45 195 15 210 45 180 60 210 45 240 120 225 165 180 150
Rectangle -16777216 false false 30 165 270 225

button-line-4
false
1
Rectangle -7500403 true false 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -2674135 true true 30 165 270 240
Polygon -16777216 false false 135 45 195 15 210 45 180 60 210 45 240 120 225 165 180 150
Rectangle -16777216 false false 30 165 270 240

button-line-5
false
1
Rectangle -7500403 true false 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -2674135 true true 30 165 270 255
Polygon -16777216 false false 135 45 195 15 210 45 180 60 210 45 240 120 225 165 180 150
Rectangle -16777216 false false 30 165 270 255

button-line-6
false
1
Rectangle -7500403 true false 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -2674135 true true 30 165 270 270
Polygon -16777216 false false 135 45 195 15 210 45 180 60 210 45 240 120 225 165 180 150
Rectangle -16777216 false false 30 165 270 270

button-move-toolbar
false
6
Rectangle -7500403 true false 15 15 285 285
Circle -13840069 true true 15 15 270
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Polygon -1 true false 30 120 270 120 180 60 240 60 150 15 60 60 120 60
Polygon -13345367 true false 30 180 270 180 180 240 240 240 150 285 60 240 120 240
Rectangle -1 true false 30 120 270 180
Polygon -13345367 false false 30 180 270 180 270 150 30 150 30 120 270 120 270 180 240 180 240 120 210 120 210 180 180 180 180 120 150 120 150 180 120 180 120 120 90 120 90 180 60 180 60 120 30 120

button-spacer
false
0
Rectangle -7500403 true true 0 0 300 300
Polygon -1 true false 240 60 285 15 285 285 15 285 60 240 240 240
Polygon -16777216 true false 60 240 15 285 15 15 285 15 240 60 60 60

button-task-redo
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Polygon -13345367 true false 225 210 105 210 90 195 90 135 105 120 225 120 225 150 270 90 225 30 225 60 105 60 60 75 45 90 30 135 30 195 45 240 60 255 105 270 225 270
Polygon -16777216 false false 270 90 225 30 225 60 105 60 60 75 45 90 30 135 30 195 45 240 60 255 105 270 225 270 225 210 105 210 90 195 90 135 105 120 225 120 225 150

button-task-undo
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Polygon -13345367 true false 75 210 195 210 210 195 210 135 195 120 75 120 75 150 30 90 75 30 75 60 195 60 240 75 255 90 270 135 270 195 255 240 240 255 195 270 75 270
Polygon -16777216 false false 30 90 75 30 75 60 195 60 240 75 255 90 270 135 270 195 255 240 240 255 195 270 75 270 75 210 195 210 210 195 210 135 195 120 75 120 75 150

button-tint
false
1
Rectangle -7500403 true false 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -16777216 true false 30 240 105 270
Rectangle -7500403 true false 105 240 195 270
Rectangle -1 true false 195 240 270 270
Rectangle -2674135 true true 30 60 270 240
Rectangle -16777216 true false 30 30 105 60
Rectangle -7500403 true false 105 30 195 60
Rectangle -1 true false 195 30 270 60

button-wipe
false
0
Rectangle -7500403 true true 15 15 285 285
Polygon -1 true false 0 300 0 0 300 0 285 15 15 15 15 285
Polygon -16777216 true false 285 15 300 0 300 300 0 300 15 285 285 285
Rectangle -16777216 true false 30 135 90 150
Rectangle -16777216 true false 150 30 165 90
Rectangle -16777216 true false 210 150 270 165
Rectangle -16777216 true false 135 210 150 270
Polygon -16777216 true false 210 210 255 240 240 255 195 225
Polygon -16777216 true false 210 90 240 45 255 60 225 105
Polygon -16777216 true false 90 90 45 60 60 45 105 75
Polygon -16777216 true false 90 210 60 255 45 240 75 195

link
true
0
Line -7500403 true 150 0 150 300

link direction
true
0
Line -7500403 true 150 150 30 225
Line -7500403 true 150 150 270 225

@#$#@#$#@
NetLogo 4.0.4
@#$#@#$#@
@#$#@#$#@
@#$#@#$#@
@#$#@#$#@
@#$#@#$#@
default
0.0
-0.2 0 0.0 1.0
0.0 1 1.0 0.0
0.2 0 0.0 1.0
link direction
true
0
Line -7500403 true 150 150 90 180
Line -7500403 true 150 150 210 180

@#$#@#$#@
