home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vgserv45.zip / BASE / HPTWGS2 / include / fcwattr.h < prev    next >
Text File  |  2001-03-21  |  6KB  |  149 lines

  1. /*****************************************************************************/
  2. /*                                                                           */
  3. /*                           OCO SOURCE MATERIALS                            */
  4. /*                             IBM CONFIDENTIAL                              */
  5. /*                                    OR                                     */
  6. /*                        IBM CONFIDENTIAL RESTRICTED                        */
  7. /*            WHEN COMBINED WITH THE AGGREGATED OCO SOURCE MODULES           */
  8. /*                           FOR THIS PROGRAM PRODUCT                        */
  9. /*                                                                           */
  10. /*      VisualAge Generator Server for OS/2, AIX, HP-UX, and Windows NT      */
  11. /*                          Version 3.0  5697-C28                            */
  12. /*                    (C) COPYRIGHT IBM CORP. 1994,1997                      */
  13. /*                                                                           */
  14. /*****************************************************************************/
  15. #ifndef FCWATTR_H
  16. #define FCWATTR_H
  17.  
  18. //-----------------------------------------------------------------------------
  19. // Color class                                                                -
  20. //-----------------------------------------------------------------------------
  21. // The Color class is used to define the enumerations that are used to set    -
  22. // and query the field color.                                                 -
  23. //-----------------------------------------------------------------------------
  24. class Color
  25. {
  26.    public:
  27.       enum enum_Color
  28.       {
  29.          Defined = 0x00,
  30.          Mono    = 0x01,
  31.          Blue    = 0x02,
  32.          Pink    = 0x04,
  33.          Yellow  = 0x08,
  34.          Turq    = 0x10,
  35.          Red     = 0x20,
  36.          Green   = 0x40,
  37.          White   = 0x80
  38.       };
  39. };
  40.  
  41. //-----------------------------------------------------------------------------
  42. // Hilite class                                                               -
  43. //-----------------------------------------------------------------------------
  44. // The Hilite class is used to define the enumerations that are used to set   -
  45. // and query the field's hilite attribute.                                    -
  46. //-----------------------------------------------------------------------------
  47. class Hilite
  48. {
  49.    public:
  50.       enum enum_Hilite
  51.       {
  52.          Defined  = 0x00,
  53.          NoHilite = 0x01,
  54.          Blink    = 0x02,
  55.          RVideo   = 0x04,
  56.          UScore   = 0x08
  57.       };
  58. };
  59.  
  60. //-----------------------------------------------------------------------------
  61. // Outline class                                                              -
  62. //-----------------------------------------------------------------------------
  63. // The Outline class is used to define the enumerations that are used to set  -
  64. // and query the field's outline attribute.                                   -
  65. //-----------------------------------------------------------------------------
  66. class Outline
  67. {
  68.    public:
  69.       enum enum_Outline
  70.       {
  71.          NOutline       = 0x00,
  72.          Under          = 0x01,
  73.          Right          = 0x02,
  74.          Over           = 0x04,
  75.          Left           = 0x08,
  76.          Box            = Left  | Right | Over | Under,
  77.          LeftRight      = Left  | Right,
  78.          LeftOver       = Left  | Over,
  79.          LeftUnder      = Left  | Under,
  80.          RightOver      = Right | Over,
  81.          RightUnder     = Right | Under,
  82.          OverUnder      = Over  | Under,
  83.          RightOverUnder = Right | Over  | Under,
  84.          LeftRightOver  = Left  | Right | Over,
  85.          LeftRightUnder = Left  | Right | Under,
  86.          LeftOverUnder  = Left  | Over  | Under
  87.       };
  88. };
  89.  
  90. //-----------------------------------------------------------------------------
  91. // Attribute class                                                            -
  92. //-----------------------------------------------------------------------------
  93. // The Attribute class is used to define the fields attributes.               -
  94. //-----------------------------------------------------------------------------
  95. struct Attribute_Data;
  96.  
  97. class Attribute
  98. {
  99.    public:
  100.       enum enum_Attribute
  101.       {
  102.          Defined     = 0x00,
  103.          Normal      = 0x00,
  104.          Full        = 0x80,
  105.          AutoSkip    = 0x40,
  106.          Protect     = 0x20,
  107.          Numeric     = 0x10,
  108.          Unprotect   = 0x00,
  109.          Bright      = 0x08,
  110.          Dark        = 0x02,
  111.          Modified    = 0x01
  112.       };
  113.       Attribute (Attribute const&);
  114.       Attribute (unsigned char         base   = AutoSkip,
  115.                  Color::enum_Color     color  = Color::Mono,
  116.                  Hilite::enum_Hilite   hilite = Hilite::NoHilite,
  117.                  unsigned char         outline= Outline::NOutline);
  118.       ~Attribute();
  119.  
  120.  
  121.       enum_Attribute        base();
  122.       Color::enum_Color     color();
  123.       Hilite::enum_Hilite   hilite();
  124.       Outline::enum_Outline outline();
  125.       Bool                  isDark();
  126.       Bool                  isBright();
  127.       Bool                  isProtected();
  128.       Bool                  isAutoSkip();
  129.       Bool                  isModified();
  130.       Bool                  isNumeric();
  131.       Bool                  hasColor();
  132.       Bool                  hasHilite();
  133.       void                  setBright();
  134.       void                  setModified();
  135.  
  136.       Attribute*            Data();
  137.       long                  Length();
  138.       void                  operator=(Attribute const &);
  139.  
  140.    private:
  141.       Attribute::enum_Attribute  attr_base;
  142.       Color::enum_Color          attr_color;
  143.       Hilite::enum_Hilite        attr_hilite;
  144.       Outline::enum_Outline      attr_outline;
  145.       void*                      pData;
  146. };
  147.  
  148. #endif
  149.