Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

vtkColorPalette.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 * 00003 * $Id$ 00004 * 00005 * Copyright (c) 2004 Sean McInerney 00006 * All rights reserved. 00007 * 00008 * See Copyright.txt or http://vtkextensions.sourceforge.net/Copyright.html 00009 * for details. 00010 * 00011 * This software is distributed WITHOUT ANY WARRANTY; without even 00012 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 * PURPOSE. See the above copyright notice for more information. 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* /*const&*/ name, 00052 vtkMaterial /*const&*/ material); 00053 00058 virtual bool FindMaterial (const char* /*const&*/ name, 00059 vtkMaterial & material); 00060 00065 virtual bool RemoveMaterial (const char* /*const&*/ name); 00074 bool InsertColor (const char* /*const&*/ name, 00075 vtkColorWord /*const&*/ rgba); 00076 00081 bool FindColor (const char* /*const&*/ name, 00082 vtkColorWord& rgba); 00083 00088 bool RemoveColor (const char* /*const&*/ name); 00097 virtual bool FindName (vtkPalette* /*const&*/ palette, 00098 const char* & name) {return false;} 00099 00104 virtual bool FindName (vtkMaterial /*const&*/ material, 00105 const char* & name) {return false;} 00106 00111 virtual bool FindName (vtkColorWord /*const&*/ rgba, 00112 const char* & name) {return false;} 00113 00120 virtual bool FindNextName (const char* & name) {return false;} 00131 virtual void InitTraversal (const char* /*const&*/ 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 /*const&*/ = false); 00185 00187 void InsertDefaultMaterials (bool /*const&*/ = false); 00188 00190 void InsertDefaultColors (bool /*const&*/ revert = false); 00193 //BTX 00200 void PrintColor (ostream& target, 00201 vtkIndent indent, 00202 const char* const& name, 00203 vtkColorWord const& color); 00205 //ETX 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 /* VTK_PALETTE_H_ */ 00231 /* 00232 * End of: $Id$. 00233 * 00234 */

Generated on Tue Aug 10 03:37:04 2004 for vtkExtensions by doxygen 1.3.7