------------------------->  GNU Sather - sourcefile  <-------------------------
-- Copyright (C) 199x by International Computer Science Institute            --
-- This file is part of the GNU Sather package. It is free software; you may --
-- redistribute  and/or modify it under the terms of the  GNU General Public --
-- License (GPL)  as  published  by the  Free  Software  Foundation;  either --
-- version 2 of the license, or (at your option) any later version.          --
-- This  program  is distributed  in the  hope that it will  be  useful, but --
-- WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See Doc/GPL for more details.        --
-- The license text is also available from:  Free Software Foundation, Inc., --
-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                     --
-------------->  Please email comments to <bug-sather@gnu.org>  <--------------

-- TkWidget.sa: Tk widgets
-- Author: Matthias Ernst <mernst@desy.de>

abstract class $TK_WIDGET < $TK_WINDOW is
   pack_info(pi: STR);
   pack_info: STR;
end; -- type $TK_WIDGET < $TK_WINDOW

-------------------------------------------------------------------

class TK_WIDGET is
   include TK_WINDOW;

   attr pack_info: STR;	-- packer info
   
   show is
      cmd ::= "pack "+pathname;
      if ~void(pack_info) then cmd := cmd + " " + pack_info end;
      app.tcl_tk.eval(cmd);
   end;

   hide is
      -- there should be a way to make the packer remember about us
      -- if we repack this the order is gone, etc.
      app.tcl_tk.eval("pack forget " + pathname);
   end;
end; -- class TK_WIDGET

-------------------------------------------------------------------

