home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc / qc20 / chrtdemo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-11-23  |  3.7 KB  |  96 lines

  1. /* File: CHRTDEMO.H
  2.  *
  3.  * Common definitions for major modules of CHRTDEMO.
  4.  */
  5.  
  6.  
  7. /* --- For graphics adaptors that are color capable: --- */
  8. #define C_INPUTCOLOR  11      /* Color for data input                 */
  9. #define C_HILITECOLOR 10      /* Color for first-letter highlights    */
  10. #define C_FORMCOLOR   15      /* Color for screen form lines and help */
  11. #define C_TITLECOLOR  15      /* Color for QuickCHART title           */
  12. #define C_ERRORCOLOR  14      /* Color for error lines                */
  13. #define C_INFOCOLOR    7      /* Color non-input data on screen       */
  14.  
  15. /* --- For graphics adaptors that are not color capable: --- */
  16. #define M_INPUTCOLOR   7      /* Color for data input                 */
  17. #define M_HILITECOLOR 15      /* Color for first-letter highlights    */
  18. #define M_FORMCOLOR    7      /* Color for screen form lines and help */
  19. #define M_TITLECOLOR  15      /* Color for QuickCHART title           */
  20. #define M_ERRORCOLOR  15      /* Color for error lines                */
  21. #define M_INFOCOLOR    7      /* Color non-input data on screen       */
  22.  
  23. /* Define macros to determine whether the graphics adaptor is color-capable. */
  24. #define ismono(m) ( ((m) == _MRESNOCOLOR) || ((m) == _HRESBW)      || \
  25.                     ((m) == _HERCMONO)    || ((m) == _ERESNOCOLOR) || \
  26.                     ((m) == _VRES2COLOR) )
  27. #define iscolor(m) (!ismono(m))
  28.  
  29. /* ASCII codes for commonly used control functions. */
  30. #define BEEP        7
  31. #define ESCAPE     27
  32.  
  33. typedef enum tagBool { FALSE, TRUE } BOOL;
  34.  
  35. /* Declarations of functions.  */
  36. void Axes( void );
  37. void Axis( axistype *pat );
  38. void AxisRange( axistype *pat );
  39. void AxisScale( axistype *pat );
  40. void AxisTics( axistype *pat );
  41. void Border( windowtype *pwt );
  42. int  BlankMenu( char *pchTitle, char *pchChoice1, char *pchChoice2 );
  43. void ChangeTypeface( void );
  44. void ChartOptions( void );
  45. void ChartType( void );
  46. void ChartWindow( void );
  47. void ChooseFont( int WhichFont, int Height );
  48. void ClearData( BOOL fConfirm );
  49. void ClrForm( void );
  50. void ClrHelp( void );
  51. void DataWindow( void );
  52. void DefaultData( short iType, short iStyle, BOOL fClear );
  53. void ErrorMsg( char *pchMsg );
  54. void FontOptions( void );
  55. void Help( char *pchMsg, short sColor );
  56. void Initialize( void );
  57. int  InputInt( char *pchPrompt, int iOld, int iMin, int iMax );
  58. float InputFloat( char *pchPrompt, float fOld );
  59. char *InputStr( char *pchPrompt, char *pchOld );
  60. char InputCh( char *pchPrompt, char *pchAccept );
  61. BOOL InRange( int Value, int iMin, int iMax );
  62. void Justify( titletype *ptt );
  63. void Legend( void );
  64. void LegendPlace( void );
  65. int  main( void );
  66. void MainMenu( void );
  67. int  Menu( char *pszMenuList[] );
  68. void PopTitle( void );
  69. void PrintAt(int row, int column, char far * lpszString, short sColor);
  70. void PrintChar(int row, int column, char cChar, short sColor);
  71. void PushTitle( char *pchOldTitle );
  72. void PushTitle( char *pchOldTitle );
  73. void ResetOptions( void );
  74. void Demo( void );
  75. void ScreenMode( void );
  76. void SetDisplayColors( void );
  77. BOOL SetGraphMode( int mode );
  78. void ShowError( int iErr );
  79. void ShowChartData( void );
  80. int  ShowAxisType( int iRow, int iCol, axistype theAxis );
  81. int  ShowLegendType( int iRow, int iCol, legendtype theLegend );
  82. void ShowSampleData( void );
  83. int  ShowTitleType( int iRow, int iCol, titletype theTitle );
  84. int  ShowWindowType( int iRow, int iCol, windowtype theWindow );
  85. void SprintAt( int iRow, int iCol, char * szFmt, ... );
  86. void TitleOpt( titletype *ptt );
  87. void Titles( void );
  88. int  ViewChart( void );
  89. void WrtForm( int yBot );
  90. void Windows( void );
  91. void WindowSize( windowtype *pwt );
  92.  
  93. /* Constant limits. */
  94. #define MAXVALUES  12
  95. #define MAXSERIES  4
  96.