#
# $Id: overlayitem.icn,v 1.2 2006-09-06 01:02:26 rparlett Exp $
#
# This file is in the public domain.
#
# Author: Robert Parlett (parlett@dial.pipex.com)
#

package gui
link graphics

$include "guih.icn"


#
# This class is one "pane" in an {OverlaySet}, which is rather
# like a {TabSet} except that there are no tabs, and control
# over which pane is displayed is entirely the affair of the
# program.
#
# The components inside have their size and position computed
# relative to the parent OverlaySet and also inherit the
# OverlaySet's windowing attributes.
# Components are added using the {add} method of {Component}.
#
class OverlayItem : Component()
   method is_hidden()
      return parent.is_hidden() | (parent.which_one ~=== self)
   end

   method is_unhidden()
      return parent.is_unhidden() & (parent.which_one === self)
   end

   initially(a[])
      self.Component.initially()
      self.set_pos(0, 0)
      self.set_size("100%", "100%")
      set_fields(a)
end

