vtkKWColorPresetMenu Class Reference

a color preset selector. More...

#include <vtkKWColorPresetMenu.h>

Inheritance diagram for vtkKWColorPresetMenu:
Inheritance graph
[legend]
Collaboration diagram for vtkKWColorPresetMenu:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkKWMenuButtonWithLabel Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetPresetSelectedCommand (vtkObject *object, const char *method)
virtual void PresetSelectedCallback (const char *name)

Static Public Member Functions

static vtkKWColorPresetMenuNew ()
static int IsTypeOf (const char *type)
static vtkKWColorPresetMenuSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkKWColorPresetMenu ()
 ~vtkKWColorPresetMenu ()
virtual void CreateWidget ()
virtual void InvokePresetSelectedCommand (const char *name)
virtual void CreateDefaultPresets ()
virtual void PopulatePresetMenu ()

Protected Attributes

double ScalarRange [2]
vtkColorTransferFunctionColorTransferFunction
int PreviewSize
int SolidColorPresetsVisibility
int GradientPresetsVisibility
int ApplyPresetBetweenEndPoints
int PresetNameVisibility
char * PresetSelectedCommand
vtkKWColorPresetMenuInternals * Internals



virtual void SetColorTransferFunction (vtkColorTransferFunction *p)
virtual vtkColorTransferFunctionGetColorTransferFunction ()
virtual double * GetScalarRange ()
virtual void GetScalarRange (double &, double &)
virtual void GetScalarRange (double[2])
virtual void SetScalarRange (double, double)
void SetScalarRange (double[2])
virtual int GetApplyPresetBetweenEndPoints ()
virtual void SetApplyPresetBetweenEndPoints (int)
virtual void ApplyPresetBetweenEndPointsOn ()
virtual void ApplyPresetBetweenEndPointsOff ()
virtual int AddPreset (const char *name, vtkColorTransferFunction *func, double range[2])
virtual int RemovePreset (const char *name)
virtual int RemoveAllPresets ()
virtual int AddSolidRGBPreset (const char *name, double rgb[3])
virtual int AddSolidRGBPreset (const char *name, double r, double g, double b)
virtual int AddSolidHSVPreset (const char *name, double hsv[3])
virtual int AddSolidHSVPreset (const char *name, double h, double s, double v)
virtual int AddGradientRGBPreset (const char *name, double rgb1[3], double rgb2[3])
virtual int AddGradientRGBPreset (const char *name, double r1, double g1, double b1, double r2, double g2, double b2)
virtual int AddGradientHSVPreset (const char *name, double hsv1[3], double hsv2[3])
virtual int AddGradientHSVPreset (const char *name, double h1, double s1, double v1, double h2, double s2, double v2)
virtual int AddFlagRGBPreset (const char *name, int nb_colors, double **rgb, int repeat)
virtual int GetPreviewSize ()
virtual void SetPreviewSize (int)
virtual int GetSolidColorPresetsVisibility ()
virtual void SolidColorPresetsVisibilityOn ()
virtual void SolidColorPresetsVisibilityOff ()
virtual void SetSolidColorPresetsVisibility (int)
virtual int GetGradientPresetsVisibility ()
virtual void GradientPresetsVisibilityOn ()
virtual void GradientPresetsVisibilityOff ()
virtual void SetGradientPresetsVisibility (int)
virtual int GetPresetNameVisibility ()
virtual void PresetNameVisibilityOn ()
virtual void PresetNameVisibilityOff ()
virtual void SetPresetNameVisibility (int)
virtual int HasPreset (const char *name)
virtual int AllocatePreset (const char *name)
virtual vtkColorTransferFunctionGetPresetColorTransferFunction (const char *name)
virtual int MapColorTransferFunction (vtkColorTransferFunction *source, double source_range[2], vtkColorTransferFunction *target, double target_range[2])
virtual int CreateColorTransferFunctionPreview (vtkColorTransferFunction *func, const char *img_name)

Detailed Description

a color preset selector.

This class displays a color preset selector as an option menu. Different type of presets can be enabled/disabled.

See also:
vtkKWMenuButton

Definition at line 31 of file vtkKWColorPresetMenu.h.


Member Typedef Documentation

Reimplemented from vtkKWMenuButtonWithLabel.

Definition at line 36 of file vtkKWColorPresetMenu.h.


Constructor & Destructor Documentation

vtkKWColorPresetMenu::vtkKWColorPresetMenu (  )  [protected]
vtkKWColorPresetMenu::~vtkKWColorPresetMenu (  )  [protected]

Member Function Documentation

static vtkKWColorPresetMenu* vtkKWColorPresetMenu::New (  )  [static]

Reimplemented from vtkKWMenuButtonWithLabel.

virtual const char* vtkKWColorPresetMenu::GetClassName (  )  [virtual]

Reimplemented from vtkKWMenuButtonWithLabel.

static int vtkKWColorPresetMenu::IsTypeOf ( const char *  type  )  [static]

Reimplemented from vtkKWMenuButtonWithLabel.

virtual int vtkKWColorPresetMenu::IsA ( const char *  type  )  [virtual]

Reimplemented from vtkKWMenuButtonWithLabel.

static vtkKWColorPresetMenu* vtkKWColorPresetMenu::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkKWMenuButtonWithLabel.

void vtkKWColorPresetMenu::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkKWMenuButtonWithLabel.

virtual void vtkKWColorPresetMenu::SetColorTransferFunction ( vtkColorTransferFunction p  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual vtkColorTransferFunction* vtkKWColorPresetMenu::GetColorTransferFunction (  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual double* vtkKWColorPresetMenu::GetScalarRange (  )  [virtual]

Set/Get the scalar range along which the preset will be applied. Solid color presets will be created using two entries, one at each end of the range. Gradient, or custom presets will be scaled appropriately along the range. If ApplyPresetBetweenEndPoint is true, the preset is applied given the scalar range defined between the two end-points (if any)

virtual void vtkKWColorPresetMenu::GetScalarRange ( double &  ,
double &   
) [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::GetScalarRange ( double  [2]  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::SetScalarRange ( double  ,
double   
) [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

void vtkKWColorPresetMenu::SetScalarRange ( double  [2]  ) 

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::GetApplyPresetBetweenEndPoints (  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::SetApplyPresetBetweenEndPoints ( int   )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::ApplyPresetBetweenEndPointsOn (  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::ApplyPresetBetweenEndPointsOff (  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::AddPreset ( const char *  name,
vtkColorTransferFunction func,
double  range[2] 
) [virtual]

Add a color preset. A name is required, as well as a color transfer function and a range. The range specifies the scalar range of the color tfunc, and is used to store a normalized version of the color transfer function so that it can be applied to the ColorTransferFunction ivar according to the ScalarRange ivar. The color transfer function passed as parameter is not Register()'ed. Return 1 on success, 0 otherwise

virtual int vtkKWColorPresetMenu::RemovePreset ( const char *  name  )  [virtual]

Remove one (or all) color preset(s). Return 1 on success, 0 otherwise

virtual int vtkKWColorPresetMenu::RemoveAllPresets (  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::AddSolidRGBPreset ( const char *  name,
double  rgb[3] 
) [virtual]

Add a color preset. Add a preset given a solid color, in RGB or HSV format.

virtual int vtkKWColorPresetMenu::AddSolidRGBPreset ( const char *  name,
double  r,
double  g,
double  b 
) [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::AddSolidHSVPreset ( const char *  name,
double  hsv[3] 
) [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::AddSolidHSVPreset ( const char *  name,
double  h,
double  s,
double  v 
) [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::AddGradientRGBPreset ( const char *  name,
double  rgb1[3],
double  rgb2[3] 
) [virtual]

Add a color preset. Add a gradient preset given the endpoints of the gradient, in RGB or HSV format.

virtual int vtkKWColorPresetMenu::AddGradientRGBPreset ( const char *  name,
double  r1,
double  g1,
double  b1,
double  r2,
double  g2,
double  b2 
) [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::AddGradientHSVPreset ( const char *  name,
double  hsv1[3],
double  hsv2[3] 
) [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::AddGradientHSVPreset ( const char *  name,
double  h1,
double  s1,
double  v1,
double  h2,
double  s2,
double  v2 
) [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::AddFlagRGBPreset ( const char *  name,
int  nb_colors,
double **  rgb,
int  repeat 
) [virtual]

Add a color preset. Add a "flag" preset given the number of colors in the flag, a pointer to those colors, and the number of time the flag should be repeated in the scalar range.

virtual int vtkKWColorPresetMenu::GetPreviewSize (  )  [virtual]

Set/Get the preview size. Each entry in the menu also displays a preview of the preset.

virtual void vtkKWColorPresetMenu::SetPreviewSize ( int   )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::GetSolidColorPresetsVisibility (  )  [virtual]

Set/Get visibility of solid color presets in menu.

virtual void vtkKWColorPresetMenu::SolidColorPresetsVisibilityOn (  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::SolidColorPresetsVisibilityOff (  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::SetSolidColorPresetsVisibility ( int   )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::GetGradientPresetsVisibility (  )  [virtual]

Set/Get visibility of gradient presets in menu.

virtual void vtkKWColorPresetMenu::GradientPresetsVisibilityOn (  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::GradientPresetsVisibilityOff (  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::SetGradientPresetsVisibility ( int   )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual int vtkKWColorPresetMenu::GetPresetNameVisibility (  )  [virtual]

Set/Get the preset name visibility in the menu.

virtual void vtkKWColorPresetMenu::PresetNameVisibilityOn (  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::PresetNameVisibilityOff (  )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::SetPresetNameVisibility ( int   )  [virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual void vtkKWColorPresetMenu::SetPresetSelectedCommand ( vtkObject object,
const char *  method 
) [virtual]

Specifies a command to associate with the widget. This command is invoked when a preset is selected. The 'object' argument is the object that will have the method called on it. The 'method' argument is the name of the method to be called and any arguments in string form. If the object is NULL, the method is still evaluated as a simple command. The following parameters are also passed to the command: - name of the selected preset: const char*

virtual void vtkKWColorPresetMenu::PresetSelectedCallback ( const char *  name  )  [virtual]

Callbacks. Internal, do not use.

virtual void vtkKWColorPresetMenu::CreateWidget (  )  [protected, virtual]

Create the widget.

Reimplemented from vtkKWMenuButtonWithLabel.

virtual void vtkKWColorPresetMenu::InvokePresetSelectedCommand ( const char *  name  )  [protected, virtual]
virtual int vtkKWColorPresetMenu::HasPreset ( const char *  name  )  [protected, virtual]

Query if there is a preset with a given name, create a preset with a given name Return 1 on success, 0 otherwise

virtual int vtkKWColorPresetMenu::AllocatePreset ( const char *  name  )  [protected, virtual]

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual vtkColorTransferFunction* vtkKWColorPresetMenu::GetPresetColorTransferFunction ( const char *  name  )  [protected, virtual]

Get a preset color transfer function. Return the func on success, NULL otherwise

virtual void vtkKWColorPresetMenu::CreateDefaultPresets (  )  [protected, virtual]

Create the default presets

virtual int vtkKWColorPresetMenu::MapColorTransferFunction ( vtkColorTransferFunction source,
double  source_range[2],
vtkColorTransferFunction target,
double  target_range[2] 
) [protected, virtual]

Map one transfer function to another Return 1 on success, 0 otherwise

virtual int vtkKWColorPresetMenu::CreateColorTransferFunctionPreview ( vtkColorTransferFunction func,
const char *  img_name 
) [protected, virtual]

Create preview (icon/image) for a preset

virtual void vtkKWColorPresetMenu::PopulatePresetMenu (  )  [protected, virtual]

Populate the preset menu


Member Data Documentation

double vtkKWColorPresetMenu::ScalarRange[2] [protected]

Definition at line 161 of file vtkKWColorPresetMenu.h.

Definition at line 162 of file vtkKWColorPresetMenu.h.

Definition at line 163 of file vtkKWColorPresetMenu.h.

Definition at line 164 of file vtkKWColorPresetMenu.h.

Definition at line 165 of file vtkKWColorPresetMenu.h.

Definition at line 166 of file vtkKWColorPresetMenu.h.

Definition at line 167 of file vtkKWColorPresetMenu.h.

Definition at line 169 of file vtkKWColorPresetMenu.h.

vtkKWColorPresetMenuInternals* vtkKWColorPresetMenu::Internals [protected]

PIMPL Encapsulation for STL containers

Reimplemented from vtkKWCoreWidget.

Definition at line 174 of file vtkKWColorPresetMenu.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Tue Apr 27 02:33:47 2010 for KWWidgets by  doxygen 1.6.1