# These are special because they are recursive.
# Note that the input, output, and inout default names must be {}.

proc ICON_input {args} {
  icon_setup $args {{origin {0 0}} {orient R0} {name {}}}
  icon_line 0 0 -10 0 -15 -5 -25 -5 -25 5 -15 05 -10 0
  icon_term -type input -origin {0 0} -name {$name} -priority input
  icon_property -origin {-40 50} -type user -name name
  icon_property -origin {-35 0} -label {$name} -anchor e
  icon_property -origin {-40 70} -type fixed -name primitive -text 1
}

proc ICON_output {args} {
  icon_setup $args {{origin {0 0}} {orient R0} {name {}}}
  icon_line 0 0 10 0 10 5 20 5 25 0 20 -5 10 -5 10 0
  icon_term -type output -origin {0 0} -name {$name} -priority output
  icon_property -origin {-40 50} -type user -name name
  icon_property -origin {35 0} -label {$name}
  icon_property -origin {-40 70} -type fixed -name primitive -text 1
}

proc ICON_inout {args} {
  icon_setup  $args {{origin {0 0}} {orient R0} {name {}}}
  icon_line -10 0 -5 -5 5 -5 10 0 5 5 -5 5 -10 0
  icon_term -type inout -origin {0 0} -name {$name} -priority inout
  icon_property -origin {-40 50} -type user -name name
  icon_property -origin {10 10} -label {$name}
  icon_property -origin {-40 70} -type fixed -name primitive -text 1
}
