home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Graphics / PPT / include / askreq.h next >
C/C++ Source or Header  |  1999-09-04  |  6KB  |  182 lines

  1. /*
  2.     PROJECT: ppt
  3.     MODULE:  askreq.h
  4.  
  5.     $Id: askreq.h 6.0 1999/09/04 19:49:28 jj Exp jj $
  6.  
  7.     This file contains the definitions for the PPT requester
  8.     system.
  9. */
  10.  
  11. #ifndef ASKREQ_H
  12. #define ASKREQ_H
  13.  
  14. #ifndef PPT_H
  15. # include "ppt.h"
  16. #endif
  17.  
  18. #define MAX_AROBJECTS 30 /* Maximum amount of objects you may create.  This
  19.                             applies to external modules ONLY, REXX ASKREQ may
  20.                             have a different limit. */
  21.  
  22. #define AR_Dummy            (TAG_USER+0x8000000)
  23. #define AR_Title            (AR_Dummy + 1)  /* STRPTR */
  24. #define AR_Text             (AR_Dummy + 2)  /* STRPTR */
  25. #define AR_Positive         (AR_Dummy + 3)  /* STRPTR */
  26. #define AR_Negative         (AR_Dummy + 4)  /* STRPTR */
  27. #define AR_Dimensions       (AR_Dummy + 5)  /* struct IBox * */
  28. #define AR_WindowID         (AR_Dummy + 6)  /* PRIVATE */
  29. #define AR_HelpText         (AR_Dummy + 7)  /* STRPTR */
  30. #define AR_HelpNode         (AR_Dummy + 8)  /* STRPTR */
  31. #define AR_RenderHook       (AR_Dummy + 9)  /* struct Hook * (V4) */
  32.  
  33. /* Values from AR_Dummy + 9 to AR_Dummy + 99 reserved */
  34.  
  35. #define AR_ObjectMin        (AR_Dummy + 100)    /* PRIVATE */
  36. #define AR_SliderObject     (AR_Dummy + 100)    /* struct TagItem * */
  37. #define AR_StringObject     (AR_Dummy + 101)    /* struct TagItem * */
  38. #define AR_ToggleObject     (AR_Dummy + 102)    /* struct TagItem * */
  39. #define AR_CheckBoxObject   (AR_Dummy + 103)    /* struct TagItem * */
  40. #define AR_CycleObject      (AR_Dummy + 104)    /* struct TagItem * */
  41. #define AR_FloatObject      (AR_Dummy + 105)    /* struct TagItem * */
  42. #define AR_MxObject         (AR_Dummy + 106)    /* struct TagItem * */
  43. #define AR_ObjectMax        (AR_Dummy + 499)
  44.  
  45. /**********************************************************************
  46.  *
  47.  *  Generic tags for objects
  48.  */
  49.  
  50. #define AROBJ_Value         (AR_Dummy + 500)    /* APTR */
  51. #define AROBJ_Label         (AR_Dummy + 501)    /* STRPTR */
  52. #define AROBJ_PreviewHook   (AR_Dummy + 502)    /* struct Hook * (V4) */
  53. #define AROBJ_HelpText      (AR_Dummy + 503)    /* STRPTR (V4) */
  54. #define AROBJ_HelpNode      (AR_Dummy + 504)    /* STRPTR (V4) */
  55.  
  56. /*
  57.  *  The function that is in the hook for AROBJ_PreviewHook
  58.  *  will receive the following arguments:
  59.  *
  60.  *  A0: pointer to the hook
  61.  *  A2: Pointer to the actual BGUI object that triggered the message
  62.  *      (be EXTRA careful with this!)
  63.  *  A1: Pointer to a ARHookMsg struct, defined below.  The objectid
  64.  *      is the number of the object that the user selected, starting
  65.  *      from zero.  For example: If you define a slider object, a
  66.  *      checkbox object and a string object (in this order) the
  67.  *      slider object would be number zero, the checkbox one and
  68.  *      the string number two.
  69.  *
  70.  *      Note that the RPort and Area are quite valid, in case you'd
  71.  *      like to render your own preview immediately.
  72.  *
  73.  *  The hook should return
  74.  *      ARR_REDRAW, if the data was changed and PPT should do a redraw
  75.  *      ARR_NOCHANGE, if the data was not changed and there is no need for a redraw
  76.  *      ARR_DONE, if the data was changed, but you don't want PPT to touch the
  77.  *          rendering area, like when you just rendered the preview yourself.
  78.  *
  79.  *  Take into account that if you want to render your own preview, you
  80.  *  will need to prepare yourself for the ARM_RENDER messages as well.  They're
  81.  *  sent usually when the window is resized or uncovered.
  82.  */
  83.  
  84. #define ARM_UPDATE          1L      /* A gadget was updated */
  85. #define ARM_RENDER          2L      /* The preview area requires updating */
  86.  
  87. /* ARM_UPDATE */
  88. struct ARUpdateMsg {
  89.     ULONG           MethodID;
  90.     ULONG           aum_Flags;
  91.     struct Frame_t  *aum_Frame;
  92.     struct PPTBase  *aum_PPTBase; /* Current context */
  93.     LONG            *aum_Values;
  94.  
  95.     struct RastPort *aum_RPort;
  96.     struct IBox     aum_Area;
  97.  
  98.     ULONG           aum_ObjectID; /* Changed object id */
  99. };
  100.  
  101. /* ARM_RENDER */
  102. struct ARRenderMsg {
  103.     ULONG           MethodID;
  104.     ULONG           arm_Flags;
  105.     struct Frame_t  *arm_Frame;
  106.     struct PPTBase  *arm_PPTBase; /* Current context */
  107.     LONG            *arm_Values;
  108.  
  109.     struct RastPort *arm_RPort;
  110.     struct IBox     arm_Area;
  111. };
  112.  
  113. /* arm_Flags */
  114.  
  115. #define ARF_INTERIM         (1<<0)  /* This was an intermediate update,
  116.                                        not the final.  Check struct opUpdate
  117.                                        and the OPUF_INTERIM field. */
  118.  
  119. /* Return values for the hook */
  120.  
  121. #define ARR_NOCHANGE        0L
  122. #define ARR_DONE            1L
  123. #define ARR_REDRAW          2L
  124.  
  125. /**********************************************************************
  126.  *
  127.  *  Slider value objects tag values.
  128.  */
  129.  
  130. #define ARSLIDER_Min        (AR_Dummy + 1000)   /* LONG */
  131. #define ARSLIDER_Max        (AR_Dummy + 1001)   /* LONG */
  132. #define ARSLIDER_Default    (AR_Dummy + 1002)   /* LONG */
  133.  
  134. /**********************************************************************
  135.  *
  136.  *  String object tag values
  137.  */
  138.  
  139. #define ARSTRING_InitialString (AR_Dummy + 1100) /* STRPTR */
  140. #define ARSTRING_MaxChars   (AR_Dummy + 1101)    /* LONG */
  141.  
  142. /**********************************************************************
  143.  *
  144.  *  Checkbox object tag values
  145.  */
  146.  
  147. #define ARCHECKBOX_Selected (AR_Dummy + 1200)   /* BOOL */
  148.  
  149. /**********************************************************************
  150.  *
  151.  *  Cycle object tag values
  152.  */
  153.  
  154. #define ARCYCLE_Active      (AR_Dummy + 1300)   /* LONG */
  155. #define ARCYCLE_Labels      (AR_Dummy + 1301)   /* STRPTR * */
  156. #define ARCYCLE_Popup       (AR_Dummy + 1302)   /* BOOL */
  157.  
  158. /**********************************************************************
  159.  *
  160.  *  Floating point class tag values
  161.  */
  162.  
  163. #define ARFLOAT_Min         (AR_Dummy + 1400)   /* LONG */
  164. #define ARFLOAT_Max         (AR_Dummy + 1401)   /* LONG */
  165. #define ARFLOAT_Default     (AR_Dummy + 1402)   /* LONG */
  166. #define ARFLOAT_Divisor     (AR_Dummy + 1403)   /* LONG */
  167. #define ARFLOAT_FormatString (AR_Dummy + 1404)   /* STRPTR */
  168.  
  169. /**********************************************************************
  170.  *
  171.  *  Mx object tag values
  172.  */
  173.  
  174. #define ARMX_Active         (AR_Dummy + 1500)   /* LONG */
  175. #define ARMX_Labels         (AR_Dummy + 1501)   /* STRPTR * */
  176.  
  177. /**********************************************************************/
  178.  
  179.  
  180.  
  181. #endif /* ASKREQ_H */
  182.