Trading System API  3.0
Library for Simulating and Deploying Trading and Investment Strategies
TSCColor.h
1 /* ===================================================================
2 *
3 * T R A D I N G S Y S T E M A P I ™
4 * Copyright © 1999 - 2014 by Peter Ritter ( TradingSystemAPI.com )
5 * A L L R I G H T S R E S E R V E D
6 *
7 * Consult your license regarding permissions and restrictions.
8 * You may obtain a copy of the License at:
9 * http://www.TradingSystemAPI.com/licenses/LICENSE-TSAPI-3.0.html
10 *
11 * ====================================================================
12 */
13 #ifndef _AEColorBox_h_
14 #define _AEColorBox_h_
15 
16 #include "tsa.h"
17 #include "TSCDef.h"
18 #include "TSCConstants.h" // Global constants and structures defs
19 
20 namespace tsa {
21 
23  class color_id {
24  friend class color_manager;
25  friend class tsa::color;
26  private:
27  int m_ID;
28  void operator=(const tsa::color&) {}; //hide
29  void from(const tsa::color& _c);
30  public:
32  color_id(void);
34  color_id(const tsa::color& _c);
36  color_id(const color_id& _other);
38  bool IsInit(void);
40  int ID(void)const;
41  };
42 
44 
45  class color_manager : public tsa::object {
46  public:
47  std::vector<tsa::color> m_DefaultColors;
48  typedef std::map<DefaultColorID, tsa::color> KEYTOCOLORMAP;
49  KEYTOCOLORMAP m_KeyToColorMap;
50 
51  public:
52  color_manager(void);
53  ~color_manager(void);
54  public:
55  void set_theme(const tsa::string& _theme);
56  void AssignRGB(DefaultColorID colorEnum, const tsa::color& rgb);
57  const tsa::color& GetColor(DefaultColorID colorEnum)const;
58  };
59 
61 
62  //}
63 }
64 
65 #endif
66 
67 
Namespace for the &#39;Trading System API&#39; library.
Definition: original1.TSA3Core.cpp:20
int ID(void) const
x
Definition: TSCColor.cpp:118
bool IsInit(void)
x
Definition: TSCColor.cpp:114
color_id(void)
x
Definition: TSCColor.cpp:97
Parent class for many library classes.
Definition: TSATypeDef.h:462
x
Definition: TSCColor.h:23
Represents a color for use in graphics operations.
Definition: TSATypeDef.h:1041