home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / i / iv26_w_3.zip / EXAMPLES / DCLOCK / DDATA.H < prev    next >
C/C++ Source or Header  |  1992-01-30  |  3KB  |  90 lines

  1. /*
  2.  * Copyright (c) 1987, 1988, 1989 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, distribute, and sell this software and its
  5.  * documentation for any purpose is hereby granted without fee, provided
  6.  * that the above copyright notice appear in all copies and that both that
  7.  * copyright notice and this permission notice appear in supporting
  8.  * documentation, and that the name of Stanford not be used in advertising or
  9.  * publicity pertaining to distribution of the software without specific,
  10.  * written prior permission.  Stanford makes no representations about
  11.  * the suitability of this software for any purpose.  It is provided "as is"
  12.  * without express or implied warranty.
  13.  *
  14.  * STANFORD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  15.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  17.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  18.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  19.  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
  20.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  21.  */
  22.  
  23. /*
  24.  * various data for dclock
  25.  */
  26.  
  27. #ifndef data_h
  28. #define data_h
  29.  
  30. #include <InterViews\defs.h>
  31.  
  32. static const int QKEY = 193;
  33.  
  34. enum TMode { CIVIL, MIL };
  35. enum CMode { SWEPT, PLACED, DEFINED };
  36.  
  37. extern int Width;        // default width and height of view
  38. extern int Height;
  39. extern int XPos;        // default position of view
  40. extern int YPos;
  41.  
  42. extern TMode TimeMode;        // CIVIL=12 hour, MIL=24 hour
  43. extern CMode CreateMode;
  44. extern boolean JohnsFlag;    // tail on 9
  45. extern boolean ShowDate;    // date at top
  46. extern boolean ShowBorder;    // visibility of border between date and time
  47. extern boolean ShowTime;    // visibility of time portion
  48. extern int SlantPC;        // 100% = "45 degrees"
  49. extern int ThickPC;        // segment thickness in % of digit size
  50. extern int FadeRate;        // 0 = flash .. 4 = slow fade
  51. extern int FadeStep;        // number of patterns to step when fading
  52.  
  53. extern boolean SegCode[11][7];  // digit "10" is blank
  54.  
  55. extern float HTx;        // digit horizontal positions
  56. extern float HUx;
  57. extern float MTx;
  58. extern float MUx;
  59. extern float ALLy;        // digit vertical positions
  60. extern float DigitWidth;
  61. extern float DigitHeight;
  62.  
  63. struct SegLayout {
  64.     int count;
  65.     float x[6];
  66.     float y[6];
  67. };
  68.  
  69. struct CharLayout {
  70.     int count;
  71.     float x[12];
  72.     float y[12];
  73. };
  74.  
  75. struct SegPoints {
  76.     int count;
  77.     Coord x[6];
  78.     Coord y[6];
  79. };
  80.  
  81. extern SegLayout SegData[7];        // normalized segment positions
  82. extern SegLayout ColonData[2];        // normalized colon positions
  83. extern CharLayout AData;        // character position data
  84. extern CharLayout PData;
  85. extern CharLayout MData;
  86.  
  87. extern void InitData();
  88.  
  89. #endif
  90.