#
# $Id: panel.icn,v 1.2 2004-05-15 19:17:29 rparlett Exp $
#
# This file is in the public domain.
#
# Author: Robert Parlett (parlett@dial.pipex.com)
#

package gui
link graphics

$include "guih.icn"

#
# A Panel of components.
#
class Panel : Component()
   method display(buffer_flag)
      if /self.transparent then{
         EraseRectangle(self.cbwin, self.x, self.y, self.w, self.h)
         every (!self.children).display(1)
         self.do_shading(self.cbwin)
         if /buffer_flag then
            CopyArea(self.cbwin, self.cwin, self.x, self.y, self.w, self.h, self.x, self.y)
        }
      else{
         every (!self.children).display()
         self.do_shading(self.cwin)
         }

   end

   initially(a[])
      self.Component.initially()
      set_fields(a)
end
