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

vtkColorPalette Class Reference

#include <vtkColorPalette.h>

Inheritance diagram for vtkColorPalette:

Inheritance graph
[legend]
Collaboration diagram for vtkColorPalette:

Collaboration graph
[legend]
List of all members.

Detailed Description

An associative array of color materials.

vtkColorPalette provides an interface to an associative array of color materials.

Author:
Sean McInerney
Version:
$Revision$
Date:
$Date$

Definition at line 35 of file vtkColorPalette.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkColorPalette, vtkPalette)
vtkIdType GetNumberOfChildColors (void) const
 Get the number of subpalettes in this palette.

Child Material Methods
virtual bool InsertMaterial (const char *name, vtkMaterialmaterial)
 Add an associated name - material pair to the map.

virtual bool FindMaterial (const char *name, vtkMaterial &material)
 Find material data associated with the given name.

virtual bool RemoveMaterial (const char *name)
 Remove the material pair associated with the given name.

Child Color Methods
bool InsertColor (const char *name, vtkColorWordrgba)
 Adds an associated name-color pair to the map.

bool FindColor (const char *name, vtkColorWord &rgba)
 Given a name, find an associated color in the map.

bool RemoveColor (const char *name)
 Remove an associated name - color pair from the map.

Name Finding Methods
virtual bool FindName (vtkPalette *palette, const char *&name)
 Find the first name in the map associated with the given palette.

virtual bool FindName (vtkMaterialmaterial, const char *&name)
 Find the first name in the map associated with the given material.

virtual bool FindName (vtkColorWordrgba, const char *&name)
 Find the first name in the map associated with the given color.

virtual bool FindNextName (const char *&name)
 Find the next name in the map associated with a palette, material, or color specified in a previous call to FindName.

is \c NULL or
Initiates traversal through the map.empty, traversal starts at the first pair in the map.

Parameters:
name The name of the material at which the traversal iterator will be positioned. If


virtual void InitTraversal (const char *name=NULL)
virtual bool TraverseForward (const char *&name, vtkPalette &palette)
 Get the current name - palette association in the map and iterate forward to the next pair.

virtual bool TraverseForward (const char *&name, vtkMaterial &material)
 Get the current name - material association in the map and iterate forward to the next pair.

virtual bool TraverseForward (const char *&name, vtkColorWord &rgba)
 Get the current name - color association in the map and iterate forward to the next pair.

void InitColorScope (void)
bool IncrementColorInScope (const char *&name, vtkColorWord &color)
bool DecrementColorInScope (const char *&name, vtkColorWord &color)
bool CurrentColorInScope (const char *&name, vtkColorWord &color) const
Methods for Inserting Default Associations
void InsertDefaultPalettes (bool=false)
 Insert default palette pairs into the map.

void InsertDefaultMaterials (bool=false)
 Insert default material pairs into the map.

void InsertDefaultColors (boolrevert=false)
 Insert default color pairs into the map.

Formatted Output Methods
void PrintColor (ostream &target, vtkIndent indent, const char *const &name, vtkColorWord const &color)
 Print the color data associated with name as a formatted string on the target output stream.


Static Public Member Functions

vtkColorPaletteNew (void)

Protected Member Functions

 vtkColorPalette (void)
 ~vtkColorPalette ()


Constructor & Destructor Documentation

vtkColorPalette::vtkColorPalette void   )  [protected]
 

vtkColorPalette::~vtkColorPalette  )  [protected]
 


Member Function Documentation

bool vtkColorPalette::CurrentColorInScope const char *&  name,
vtkColorWord color
const
 

bool vtkColorPalette::DecrementColorInScope const char *&  name,
vtkColorWord color
 

bool vtkColorPalette::FindColor const char *  name,
vtkColorWord rgba
 

Given a name, find an associated color in the map.

Returns:
true on success, false otherwise.

Reimplemented from vtkPalette.

virtual bool vtkColorPalette::FindMaterial const char *  name,
vtkMaterial material
[virtual]
 

Find material data associated with the given name.

Returns:
true on success, false otherwise.

Reimplemented from vtkPalette.

virtual bool vtkColorPalette::FindName vtkColorWord  rgba,
const char *&  name
[inline, virtual]
 

Find the first name in the map associated with the given color.

Returns:
true on success, false otherwise.

Definition at line 111 of file vtkColorPalette.h.

virtual bool vtkColorPalette::FindName vtkMaterial  material,
const char *&  name
[inline, virtual]
 

Find the first name in the map associated with the given material.

Returns:
true on success, false otherwise.

Definition at line 104 of file vtkColorPalette.h.

virtual bool vtkColorPalette::FindName vtkPalette palette,
const char *&  name
[inline, virtual]
 

Find the first name in the map associated with the given palette.

Returns:
true on success, false otherwise.

Definition at line 97 of file vtkColorPalette.h.

virtual bool vtkColorPalette::FindNextName const char *&  name  )  [inline, virtual]
 

Find the next name in the map associated with a palette, material, or color specified in a previous call to FindName.

Returns:
true on success, false otherwise.

Definition at line 120 of file vtkColorPalette.h.

vtkIdType vtkColorPalette::GetNumberOfChildColors void   )  const
 

Get the number of subpalettes in this palette.

bool vtkColorPalette::IncrementColorInScope const char *&  name,
vtkColorWord color
 

void vtkColorPalette::InitColorScope void   ) 
 

virtual void vtkColorPalette::InitTraversal const char *  name = NULL  )  [inline, virtual]
 

Reimplemented from vtkPalette.

Definition at line 131 of file vtkColorPalette.h.

bool vtkColorPalette::InsertColor const char *  name,
vtkColorWordrgba 
 

Adds an associated name-color pair to the map.

Returns:
true on success, false otherwise.

Reimplemented from vtkPalette.

void vtkColorPalette::InsertDefaultColors boolrevert  = false  ) 
 

Insert default color pairs into the map.

void vtkColorPalette::InsertDefaultMaterials bool  = false  ) 
 

Insert default material pairs into the map.

void vtkColorPalette::InsertDefaultPalettes bool  = false  ) 
 

Insert default palette pairs into the map.

virtual bool vtkColorPalette::InsertMaterial const char *  name,
vtkMaterialmaterial 
[virtual]
 

Add an associated name - material pair to the map.

Returns:
true on success, false otherwise.

Reimplemented from vtkPalette.

vtkColorPalette* vtkColorPalette::New void   )  [static]
 

Reimplemented from vtkPalette.

void vtkColorPalette::PrintColor ostream &  target,
vtkIndent  indent,
const char *const &  name,
vtkColorWord const &  color
 

Print the color data associated with name as a formatted string on the target output stream.

Reimplemented from vtkPalette.

bool vtkColorPalette::RemoveColor const char *  name  ) 
 

Remove an associated name - color pair from the map.

Returns:
true on success, false otherwise.

virtual bool vtkColorPalette::RemoveMaterial const char *  name  )  [virtual]
 

Remove the material pair associated with the given name.

Returns:
true on success, false otherwise.

virtual bool vtkColorPalette::TraverseForward const char *&  name,
vtkColorWord rgba
[inline, virtual]
 

Get the current name - color association in the map and iterate forward to the next pair.

Returns:
false if either the map is empty, traversal was initialized with a name not associated with any color in the map, or traversal has reached the end of the map. Otherwise true is returned.

Definition at line 168 of file vtkColorPalette.h.

virtual bool vtkColorPalette::TraverseForward const char *&  name,
vtkMaterial material
[inline, virtual]
 

Get the current name - material association in the map and iterate forward to the next pair.

Returns:
false if either the map is empty, traversal was initialized with a name not associated with any material in the map, or traversal has reached the end of the map. Otherwise true is returned.

Definition at line 155 of file vtkColorPalette.h.

virtual bool vtkColorPalette::TraverseForward const char *&  name,
vtkPalette palette
[inline, virtual]
 

Get the current name - palette association in the map and iterate forward to the next pair.

Returns:
false if either the map is empty, traversal was initialized with a name not associated with any palette in the map, or traversal has reached the end of the map. Otherwise true is returned.

Definition at line 142 of file vtkColorPalette.h.

vtkColorPalette::vtkTypeRevisionMacro vtkColorPalette  ,
vtkPalette 
 


The documentation for this class was generated from the following file:
Generated on Tue Aug 10 03:42:04 2004 for vtkExtensions by doxygen 1.3.7