InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IInterfaceColors.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Mouhammad Fakhoury
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //
23 // User Interface Color table
24 //
25 //========================================================================================
26 
27 #ifndef __IInterfaceColors__
28 #define __IInterfaceColors__
29 
30 #include "PMTypes.h"
31 #include "InterfaceColorDefines.h"
32 #include "IPMStream.h"
33 #include "WorkspaceID.h"
34 
38 {
39 public:
40  typedef base_type data_type;
41 
45  red(0.), green(0.), blue(0.)
46  { }
47 
50  RealAGMColor (double a, double b, double c) { red = a; green = b; blue = c; }
51 
55  {
56  s->XferRealNumber(red);
57  s->XferRealNumber(green);
58  s->XferRealNumber(blue);
59  }
60  PMReal red;
61  PMReal green;
62  PMReal blue;
63 };
64 
68 {
69 public:
70  enum { kDefaultIID = IID_IINTERFACECOLORS };
71  enum { kNumColors = kInterfaceColorCount,
72  kFirstIndex = 0,
73  kLastIndex = kNumColors - 1 };
74 
77  typedef int32 InterfaceColor;
78 
83  virtual bool16 Init(const RsrcID interfaceColorTableRsrc) = 0;
84 
90  virtual bool16 GetRealAGMColor(const InterfaceColor index, RealAGMColor& outColor)const = 0;
91 
97  virtual bool16 GetRGBColor(const InterfaceColor index, RGBColor& outColor)const = 0;
98 
99 protected:
107  virtual bool16 SetRealAGMColor(const InterfaceColor index, const RealAGMColor& inColor) = 0;
108 
114  virtual bool16 SetRGBColor(const InterfaceColor index, const RGBColor& inColor) = 0;
115 };
116 
117 
118 
119 #endif// __IInterfaceColors__