;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
define new-container-widget(type)
  define super new-basic-widget()
  method-lambda base-container-widget
    super: (self)
      super
    type: (self)
      type
    ;;
    paint: (self)
      define wdt self[final-width:]
      define hgt self[final-height:]
      if {{positive? wdt} and {positive? hgt} and {not self[ignore?:]}}
        then
          define bc self[style-prop: back-color:]
          define fc self[style-prop: frame-color:]
          cond
            {{positive? sdl:color-a(bc)} and {positive? sdl:color-a(fc)}}
              lgfx:fill-rect 1 1 {wdt - 2} {hgt - 2} bc
              lgfx:draw-rect 0 0 wdt hgt fc
            {positive? sdl:color-a(bc)}
              lgfx:fill-rect 0 0 wdt hgt bc
            {positive? sdl:color-a(fc)}
              lgfx:draw-rect 0 0 wdt hgt fc
            else
              #void
          self[paint-children:]
      self
    ;;
    else
      super


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
register-widget v-container:
  lambda v-container-ctor ()
    new-container-widget(v-container:)[as-vert!:]

register-widget h-container:
  lambda g-container-ctor ()
    new-container-widget(h-container:)[as-horiz!:]
