home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / program / gempp15b / gemf.man < prev    next >
Encoding:
Text File  |  1993-10-23  |  5.3 KB  |  139 lines

  1.                      GEM++ - C++ LIBRARIES FOR GEM/AES/VDI
  2.  
  3.  
  4.  
  5. NAME
  6.      GEMform - interacts with the user through a GEM form (dialog box).
  7.  
  8. DESCRIPTION
  9.      Forms or "dialog boxes" are objects which may interact with the
  10.      user.  The activities of the user may trigger events to be sent
  11.      to components of the GEMform.  GEMrawobjects are the components
  12.      of GEMforms, however, it is GEMobjects declared to be part of
  13.      a GEMform that are most interesting, and can be found by using
  14.      the Cook() method of a GEMrawobject for which a GEMobject has
  15.      been declared.
  16.  
  17. CONSTRUCTORS
  18.      GEMform(const GEMrsc& rsc, int RSCindex)
  19.        Create a form that is the form specified by the given index
  20.        in the given GEMrsc.
  21.  
  22.      GEMform(const GEMform&)
  23.        Create a copy of the given GEMform.  All parts of the form
  24.        are duplicated, except those that are sharable:
  25.  
  26.          The first (least significant) bits of the ExtendedType
  27.          define whether an object needs to have a new copy of
  28.          the object-specific data, or whether it is sharable.
  29.  
  30.          For EDITABLE objects, ExtendedType 0 indicates that the
  31.          user-input text of the object is not sharable - a duplicate
  32.          copy of the text is made.  ExtendedType 1 indicates that
  33.          the template and prompt text needs to be copied.
  34.          ExtendedType 2 indicates that all may be shared.
  35.          ExtendedType 3 indicates that user-input text can be
  36.          shared, but the prompt and template are to be copied.
  37.  
  38.          For non-EDITABLE objects, 0 indicates all shared,
  39.          1 indicates text shared, 2 indicates non-text shared,
  40.          and 3 indicates non shared.
  41.  
  42.          For icons, the "user-input" text is the label and
  43.          the "prompt" is the icon.
  44.  
  45.          This may seem fairly complicated at first, but basically
  46.          you can leave the ExtendedType set to 0 for most
  47.          applications.
  48.  
  49. METHODS
  50.      virtual int Do(int x, int y);
  51.        Conduct the interaction by drawing the form at the given
  52.        screen position until a component GEMobject signals for the
  53.        interaction to end (see GEMfeedback) or a part of the form
  54.        that is not declared as a GEMobject and that has the TOUCHEXIT
  55.        or EXIT flags set is clicked.  The RSC index of the object
  56.        that caused the exit is returned.
  57.      int Do()
  58.        As above, but centred.
  59.  
  60.      bool Zooms(bool b)
  61.        Disable or enable the "zoom" lines.  (default = disabled)
  62.  
  63.      virtual void RedrawObject(int RSCindex)
  64.        Redraw the given object in the form.
  65.  
  66.      virtual void RedrawObject(int RSCindex,int Cx,int Cy,int Cw,int Ch)
  67.        Redraw the given object in the form, clipped as specified.
  68.  
  69.      int Parent(int RSCindex) const
  70.        Return the RSCindex of the parent of the object with the
  71.        given RSCindex.
  72.  
  73.      GEMrawobject* operator[](int RSCindex) const;
  74.        Return the component with the given RSCindex.  Often the
  75.        Cook() method of this GEMrawobject will be called.
  76.  
  77.      void AlignObject(int RSCindex, int xmult=8, int ymult=1)
  78.        Some objects, especially text, redraw faster when then are byte-
  79.        or word-aligned on the screen.  This method sets the alignment
  80.        for the window such that the given object is positioned at a
  81.        multiple of the given coordinates.
  82.  
  83.      int Map(int Do(GEMrawobject* tree, int obj),
  84.              bool skiphidden=TRUE, int RSCfrom=0, int RSCto=-1)
  85.        Call the given function for each object in this form such that
  86.        tree[obj] is the object, starting from RSCfrom, ending at RSCto
  87.        or end-of-tree.  If objects with HideTree() TRUE are to be
  88.        trasparently skipped, set skiphidden to TRUE (default).  The
  89.        function should return -1 if the search should continue into
  90.        the subtrees of the object, -2 if the search should skip the
  91.        subtrees (continuing to siblings), or a non-negative value,
  92.        which immediately terminates the search.  Map() returns the
  93.        value of the last call to the parametric Do() function.
  94.  
  95. EXAMPLES
  96.      {
  97.          GEMapplication appl;
  98.          GEMrsc rsc("foo.rsc");
  99.          GEMform form(rsc,FORM_RSC_INDEX);
  100.          form.Do();
  101.      }
  102.  
  103. EXTENSION METHODS
  104.      GEMrawobject *Obj
  105.        The actual GEM tree.
  106.  
  107.      virtual int FormDo()
  108.        Perform the functions of the standard GEM form_do() function
  109.        See GEMhotform for an example use of this.
  110.  
  111.      virtual GEMfeedback DoItem(int item, const GEMevent& e)
  112.        Called by Do() when objects are touched.  Standard function calls
  113.        the Touch() member of the GEMobject (if the GEMrawobject can
  114.        be Cook()ed).  Overriding this method provides a simple form-level
  115.        click handler.  Normally, any override of this method would
  116.        pass on control to the standard GEMform::DoItem(...) so that
  117.        any GEMobjects declared in the form are triggered.
  118.  
  119. SEE ALSO
  120.      GEMobject, GEMrawobject, GEMhotform
  121.  
  122. BUGS
  123.      Bugs in GEM++ should be reported to warwick@cs.uq.oz.au
  124.  
  125. AUTHOR
  126.      Warwick Allison, 1993.
  127.      warwick@cs.uq.oz.au
  128.  
  129. COPYING
  130.      This functionality is part of the GEM++ library,
  131.      and is Copyright 1993 by Warwick W. Allison.
  132.  
  133.      GEM++ is free and protected under the GNU Library General Public
  134.      License.
  135.  
  136.      You are free to copy and modify these sources, provided you
  137.      acknowledge the origin by retaining this notice, and adhere to
  138.      the conditions described in the GNU LGPL.
  139.