1 #ifndef DEVICENCOLORANT_H
2 #define DEVICENCOLORANT_H
3 
4 #include "imagesource.h"
5 
6 class DeviceNColorant;
7 class DeviceNColorantList
8 {
9 	public:
10 	DeviceNColorantList();
11 	DeviceNColorantList(IS_TYPE type);
12 	virtual ~DeviceNColorantList();
13 	virtual int GetColorantCount();
14 
15 	// Find a colorant by name - returns -1 if not found
16 	virtual int GetColorantIndex(const char *name);
17 
18 	virtual char *GetEnabledColorants();
19 	virtual void SetEnabledColorants(const char *col);
20 	virtual DeviceNColorant *FirstColorant();
21 	virtual DeviceNColorant *operator[](int idx);
22 	protected:
23 	DeviceNColorant *first;
24 	friend class DeviceNColorant;
25 };
26 
27 
28 class DeviceNColorant
29 {
30 	public:
31 	// If you provide a name but no RGB values the colorant will be filled in if the name is
32 	// recognised, and a const char * exception will be thrown if not.
33 	DeviceNColorant(DeviceNColorantList &header,const char *name,const char *displayname=NULL);
34 	DeviceNColorant(DeviceNColorantList &header,const char *name,const char *displayname,int red,int green,int blue);
35 	virtual ~DeviceNColorant();
36 	const char *GetDisplayName();
37 	void Enable();
38 	void Disable();
39 	bool GetEnabled();
40 	virtual DeviceNColorant *NextColorant();
41 	virtual DeviceNColorant *PrevColorant();
42 	virtual const char *GetName();
43 	int red,green,blue;
44 	protected:
45 	void linknode();
46 	DeviceNColorantList &header;
47 	bool enabled;
48 	char *name;
49 	char *displayname;
50 	DeviceNColorant *next,*prev;
51 };
52 
53 #endif
54 
55