00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
#ifndef VTK_COLOR_PALETTE_H_
00017
# define VTK_COLOR_PALETTE_H_
00018
# include "vtkPalette.h"
00019
00031
VTK_EXTENSIONS_PALETTE_NAMESPACE_BEGIN
00032
00033
class vtkColorPaletteInternal;
00034
00035 class VTK_EXTENSIONS_PALETTE_EXPORT vtkColorPalette
00036 :
public vtkPalette
00037 {
00038
public:
00039
static vtkColorPalette*
New (
void);
00040 vtkTypeRevisionMacro (vtkColorPalette,
vtkPalette);
00041
00043
vtkIdType GetNumberOfChildColors (
void)
const;
00044
00051
virtual bool InsertMaterial (
const char* name,
00052
vtkMaterial material);
00053
00058
virtual bool FindMaterial (
const char* name,
00059
vtkMaterial & material);
00060
00065
virtual bool RemoveMaterial (
const char* name);
00074
bool InsertColor (
const char* name,
00075
vtkColorWord rgba);
00076
00081
bool FindColor (
const char* name,
00082
vtkColorWord& rgba);
00083
00088
bool RemoveColor (
const char* name);
00097 virtual bool FindName (
vtkPalette* palette,
00098
const char* & name) {
return false;}
00099
00104 virtual bool FindName (
vtkMaterial material,
00105
const char* & name) {
return false;}
00106
00111 virtual bool FindName (vtkColorWord rgba,
00112
const char* & name) {
return false;}
00113
00120 virtual bool FindNextName (
const char* & name) {
return false;}
00131 virtual void InitTraversal (
const char* name = NULL) {}
00132
00142 virtual bool TraverseForward (
const char* & name,
00143
vtkPalette & palette)
00144 {
return false;}
00145
00155 virtual bool TraverseForward (
const char* & name,
00156
vtkMaterial & material)
00157 {
return false;}
00158
00168 virtual bool TraverseForward (
const char* & name,
00169 vtkColorWord& rgba)
00170 {
return false;}
00171
00172
void InitColorScope (
void);
00173
bool IncrementColorInScope (
const char* & name,
00174 vtkColorWord & color);
00175
bool DecrementColorInScope (
const char* & name,
00176 vtkColorWord & color);
00177
bool CurrentColorInScope (
const char* & name,
00178 vtkColorWord & color)
const;
00184
void InsertDefaultPalettes (
bool =
false);
00185
00187
void InsertDefaultMaterials (
bool =
false);
00188
00190
void InsertDefaultColors (
bool revert =
false);
00193
00200
void PrintColor (ostream& target,
00201
vtkIndent indent,
00202
const char*
const& name,
00203 vtkColorWord
const& color);
00205
00206
00207
protected:
00208 vtkColorPalette (
void);
00209 ~vtkColorPalette();
00210
00211
friend class vtkPaletteIterator;
00212
00213
private:
00214 vtkColorPaletteInternal* Internal;
00215
00216
private:
00223 vtkColorPalette (
const vtkColorPalette&);
00224
void operator= (
const vtkColorPalette&);
00226 };
00227
00228
VTK_EXTENSIONS_PALETTE_NAMESPACE_END
00229
00230
#endif
00231
00232
00233
00234