1Archetype(n)                       [incr Tk]                      Archetype(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       Archetype - base class for all [incr Tk] mega-widgets
9

INHERITANCE

11       none
12

WIDGET-SPECIFIC OPTIONS

14       Name:           clientData
15       Class:          ClientData
16       Command-Line Switch:           -clientdata
17
18              This  does  not  affect  the widget operation in any way.  It is
19              simply a hook that clients can use to store a bit of  data  with
20              each widget.  This can come in handy when using widgets to build
21              applications.
22_________________________________________________________________
23
24

DESCRIPTION

26       The Archetype class is the basis for all  [incr Tk]  mega-widgets.   It
27       keeps  track of component widgets and provides methods like "configure"
28       and "cget" that are used to access the composite configuration options.
29       Each  component widget must be registered with the Archetype base class
30       using the "itk_component add" method.  When  the  component  is  regis‐
31       tered,  its  configuration  options  are  integrated into the composite
32       option list.  Configuring a composite option like "-background"  causes
33       all of the internal components to change their background color.
34
35       It  is  not used as a widget by itself, but is used as a base class for
36       more  specialized  widgets.   The  Widget  base  class  inherits   from
37       Archetype,  and  adds a Tk frame which acts as the "hull" for the mega-
38       widget.  The Toplevel base class inherits from Archetype, but adds a Tk
39       toplevel which acts as the "hull".
40
41       Each  derived  class  must  invoke the itk_initialize method within its
42       constructor, so that all options are properly integrated  and  initial‐
43       ized in the composite list.
44
45
46

PUBLIC METHODS

48       The  following  methods are provided to support the public interface of
49       the mega-widget.
50
51       pathName cget option
52              Returns the current value of the configuration option  given  by
53              option.
54
55              In  this case, option refers to a composite configuration option
56              for the mega-widget.  Individual components integrate their  own
57              configuration options onto the composite list when they are reg‐
58              istered by the "itk_component add" method.
59
60       pathName component ?name? ?command arg arg ...?
61              Used to query or access component widgets within a  mega-widget.
62              With  no  arguments,  this  returns a list of symbolic names for
63              component widgets that are accessible in the current scope.  The
64              symbolic  name  for a component is established when it is regis‐
65              tered by the "itk_component add" method.   Note  that  component
66              widgets  obey  any  public/protected/private  access restriction
67              that is in force when the component is created.
68
69              If a symbolic name is specified, this method returns the  window
70              path name for that component.
71
72              Otherwise,  the  command  and  any  remaining  arg arguments are
73              invoked as a method on the  component  with  the