home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / TCXOS2.ZIP / DEMO / TCXLDEMO.H < prev    next >
Text File  |  1991-11-05  |  6KB  |  136 lines

  1. /*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
  2.  | Copyright (c) 1987-1991, Innovative Data Concepts, Inc.
  3.  | All Rights Reserved.
  4.  |
  5.  | This Library is part of IDC's TesSeRact Development Tools product
  6.  | line. For information about other IDC products, call 1-215-443-9705.
  7.  *-V--------------------------------------------------------------------*
  8.  | $Header:   tcxldemo.h     552.2   23 Mar 1991 13:08:52  $
  9.  |
  10.  | $Log:   tcxldemo.h    $
  11.  *-D--------------------------------------------------------------------*
  12.  | TCXLdemo.h : Definitions and prototypes for the TCXL 5.5 demo programs
  13.  *-N-----------------------[ Notes and Caveats ]------------------------*
  14.  |
  15.  *======================================================================*/
  16. #ifndef  _TCXLdemo_                    /* only once!                    */
  17. #  ifndef   _TCXLinp_
  18. #     include  <TCXLinp.h>             /* TCXL input                    */
  19. #  endif
  20. #  ifndef   _TCXLcur_
  21. #     include  <TCXLcur.h>             /* TCXL cursor                   */
  22. #  endif
  23. #  ifndef   _TCXLmnu_
  24. #     include  <TCXLmnu.h>             /* TCXL menu/window/video        */
  25. #  endif
  26. #  ifndef   _TCXLhlp_
  27. #     include  <TCXLhlp.h>             /* TCXL help                     */
  28. #  endif
  29. /*-----------------------[ help category numbers ]----------------------*/
  30.  
  31. #define  H_NONE       0
  32. #define  H_GLOBAL     1
  33. #define  H_WINDOWING  2
  34. #define  H_MENUING    3
  35. #define  H_LISTPICK   4
  36. #define  H_STRPICK    5
  37. #define  H_FILEPICK   6
  38. #define  H_DATAENTRY  7
  39. #define  H_EDITKEYS   8
  40. #define  H_DATE       9
  41. #define  H_FIRSTNAME 10
  42. #define  H_INITIAL   11
  43. #define  H_LASTNAME  12
  44. #define  H_CITY      13
  45. #define  H_STATE     14
  46. #define  H_ZIPCODE   15
  47. #define  H_COMPILER  16
  48. #define  H_AMOUNT    17
  49. #define  H_NUMERIC   18
  50. #define  H_PULLDOWN  19
  51. #define  H_FILE      20
  52. #define  H_EDITING   21
  53. #define  H_LOAD      22
  54. #define  H_SAVE      23
  55. #define  H_RENAME    24
  56. #define  H_NEW       25
  57. #define  H_DIRECTORY 26
  58. #define  H_EXECUTE   27
  59. #define  H_OSSHELL   28
  60. #define  H_QUIT      29
  61. #define  H_SCROLL    30
  62. #define  H_CHGATTR   31
  63. #define  H_CHGBORD   32
  64. #define  H_WINTITLE  33
  65. #define  H_RESIZE    34
  66. #define  H_TEXTLINE  35
  67. #define  H_WINMOVE   36
  68. #define  H_WINHIDE   37
  69. #define  H_ACTIVATE  38
  70. #define  H_WINCOPY   39
  71. #define  H_PICKATTR  40
  72. #define  H_INPUT     41
  73. #define  H_STRINGS   42
  74. #define  H_DEFAULTS  43
  75. #define  H_RUN       44
  76. #define  H_OPTIONS   45
  77.  
  78. /*---------------------------[ Data objects ]---------------------------*
  79.  | Example of using arrays of data structures to define/declare sets of
  80.  | TCXL function arguments in an understandable and maintainable form.
  81.  | See UserDemo.C, EntrDemo.C, MenuDemo.C, Mid_demo.C, and DemoMisc.C for
  82.  | usage of this objects. Note that the elements of this structure are
  83.  | WORD-ALIGNED for speed of access, without padding.
  84.  *----------------------------------------------------------------------*/
  85.  
  86. TYP struct _Info              /* Information displayed by TcxlInfo()    */
  87. {  BytT     row;                       /* row to display on             */
  88.    AtrT     Atr;                       /* display attribute             */
  89.    ChrP     Str;                       /* string to display             */
  90. }  INFO;
  91.  
  92. /*----------------------------[ Global data ]---------------------------*/
  93.  
  94. GBL   INFO  CDC   TcxlI[];             /* TcxlInfo() strings            */
  95. GBL   ChrP  CDC   months[];            /* month-name table              */
  96. GBL   IntT  CDC   LeftRow, LeftCol;    /* main menu coords              */
  97. GBL   IntT  CDC   RightRow, RightCol;
  98. GBL   IntT  CDC   DemoFast;            /* window wait flag              */
  99.  
  100. /*------------------------[ Function prototypes ]-----------------------*
  101.  | Local functions are prototyped in their respective modules. The actual
  102.  | demo functions are called as "select" functions from the main menus of
  103.  | UserDemo.C and Mid_Demo.C via function pointers. The remaining global
  104.  | utility functions in DemoMisc.C are common to both demo programs.
  105.  *----------------------------------------------------------------------*/
  106.  
  107. VOID  CTYP  EntryDemo(NOARG);          /* Entry System demo             */
  108. VOID  CTYP  InputDemo(NOARG);          /* Input System demo             */
  109. VOID  CTYP  MenuDemo(NOARG);           /* Menu System demo              */
  110. VOID  CTYP  SelectDemo(NOARG);         /* Selection System demo         */
  111. VOID  CTYP  StringDemo(NOARG);         /* Strings System demo           */
  112. VOID  CTYP  WinDemo(NOARG);            /* Window System demo            */
  113.                               /*- Utility functions in MiscDemo.C ------*/
  114. VOID  CTYP  AddShadow(NOARG);          /* Add a shadow to window        */
  115. VOID  CTYP  ConfirmQuit(NOARG);        /* Confirm user wants to quit    */
  116. VOID  CTYP  ErrorExit(IntT errnum);    /* Error termination             */
  117. VOID  CTYP  FarVrestore(               /* Restore screen from far heap  */
  118.    VcelFP FarPtr);
  119. VcelFP   CTYP  FarVsave(AtrT Atr);     /* Save screen on far heap       */
  120. VOID  CTYP  Initialize(NOARG);         /* Initialize TCXL for demo      */
  121. VOID  CTYP  MainMenu(MbldP mp);        /* Display/process main menu     */
  122. VOID  CTYP  MoveBarDn(NOARG);          /* Select next main-menu item    */
  123. VOID  CTYP  NormalExit(NOARG);         /* Normal termination            */
  124. VOID  CTYP  OpenBkgrnd(NOARG);         /* Display demo background       */
  125. VOID  CTYP  ParseCmdLine(IntT argc,    /* Parse command-line switches   */
  126.    ChrP argv[]);
  127. VOID  CTYP  ParseDate(ChrP buf,        /* Parse MMDDYY date string      */
  128.    IntP month, IntP day, IntP year);
  129. VOID  CTYP  PreHelp(NOARG);            /* Help-system "open" function   */
  130. VOID  CTYP  PreMenu1(NOARG);           /* Main-menu "open" function     */
  131. VOID  CTYP  PressAKey(BytT wrow);      /* Pause and wait for a keypress */
  132. VOID  CTYP  PressAKey1(BytT wrow,
  133.    IntT wait);
  134. VOID  CTYP  TcxlInfo(NOARG);           /* Display TCXL info window      */
  135. #endif   /* _TCXLdemo_ : end of TCXLdemo.h -----------------------------*/
  136.