# gui/implementation/Box.tcl

    @implementation Box {
      - init {} {
          $super init

          set border [frame $path.border -relief groove -bd 2]
          set frame [frame $path.border.inner]
          set label [label $path.label]

          set font [$label cget -font]
          if {[set index [lsearch -exact $font bold]] != -1} {
            $label configure -font [lreplace $font $index $index]
          }

          set padxy [expr [winfo reqheight $label]/2]
          pack $border $frame -fill both -expand 1 \
            -padx $padxy -pady $padxy
        }

      - label: aLabel {
          $label configure -text $aLabel
          if [string length $aLabel] {
            $self showLabel
          } else {
            $self hideLabel
          }
        }
      - label {} {
          return [$label cget -text]
        }

      - showLabel {} {
          $self showBorder
          place $label -x 20 -rely -0.0
        }
      - hideLabel {} {
          place forget $label
        }

      - showBorder {} {
          set padxy [expr [winfo reqheight $label]/2]
          pack configure $frame -padx $padxy -pady $padxy
          pack configure $border -padx $padxy -pady $padxy
          $border configure -bd 2 -relief groove
        }
      - hideBorder {} {
          $self hideLabel
          $border configure -bd 0 -relief flat
          pack configure $frame -padx 1 -pady 1
          pack configure $border -padx 1 -pady 1
        }

      - frame {} {
          return $frame
        }

      - background: aColor {
          foreach w [list $path $border $frame $label] {
            $w configure -background $aColor
          }
        }

      - background {} {
          return [$path cget -background]
        }
    }