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

vtkKWPresetSelector Class Reference

a preset selector. More...

#include <vtkKWPresetSelector.h>

Inheritance diagram for vtkKWPresetSelector:

Inheritance graph
[legend]
Collaboration diagram for vtkKWPresetSelector:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkKWPresetSelector, vtkKWCompositeWidget)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void Create (vtkKWApplication *app)
virtual int AddPreset ()
virtual int HasPreset (int id)
virtual double GetPresetCreationTime (int id)
virtual int GetNthPresetWithGroupRank (int index, const char *group)
virtual void SetPresetAddCommand (vtkObject *object, const char *method)
virtual void SetPresetUpdateCommand (vtkObject *object, const char *method)
virtual void SetPresetApplyCommand (vtkObject *object, const char *method)
virtual void SetPresetRemoveCommand (vtkObject *object, const char *method)
virtual void Update ()
virtual void UpdateEnableState ()
virtual void PresetCellThumbnailCallback (const char *, int, int, const char *)
virtual void PresetCellUpdatedCallback (int row, int col, const char *text)
virtual int SetPresetGroup (int id, const char *group)
virtual const char * GetPresetGroup (int id)
virtual void SetGroupColumnVisibility (int)
virtual int GetGroupColumnVisibility ()
virtual void GroupColumnVisibilityOn ()
virtual void GroupColumnVisibilityOff ()
virtual void SetGroupColumnTitle (const char *)
virtual const char * GetGroupColumnTitle ()
virtual void SetGroupFilter (const char *group)
virtual char * GetGroupFilter ()
virtual int SetPresetComment (int id, const char *comment)
virtual const char * GetPresetComment (int id)
virtual void SetCommentColumnVisibility (int)
virtual int GetCommentColumnVisibility ()
virtual void CommentColumnVisibilityOn ()
virtual void CommentColumnVisibilityOff ()
virtual int SetPresetFileName (int id, const char *filename)
virtual const char * GetPresetFileName (int id)
virtual int SetPresetImage (int id, vtkImageData *image)
virtual int SetPresetImageFromRenderWindow (int id, vtkRenderWindow *win)
virtual vtkKWIconGetPresetThumbnail (int id)
virtual vtkKWIconGetPresetScreenshot (int id)
virtual void SetThumbnailColumnVisibility (int)
virtual int GetThumbnailColumnVisibility ()
virtual void ThumbnailColumnVisibilityOn ()
virtual void ThumbnailColumnVisibilityOff ()
virtual void SetThumbnailSize (int)
virtual int GetThumbnailSize ()
virtual void SetScreenshotSize (int)
virtual int GetScreenshotSize ()
virtual int HasPresetUserSlot (int id, const char *slot_name)
virtual int SetPresetUserSlotAsDouble (int id, const char *slot_name, double value)
virtual double GetPresetUserSlotAsDouble (int id, const char *slot_name)
virtual int SetPresetUserSlotAsInt (int id, const char *slot_name, int value)
virtual int GetPresetUserSlotAsInt (int id, const char *slot_name)
virtual int SetPresetUserSlotAsString (int id, const char *slot_name, const char *value)
virtual const char * GetPresetUserSlotAsString (int id, const char *slot_name)
virtual int SetPresetUserSlotAsPointer (int id, const char *slot_name, void *ptr)
virtual void * GetPresetUserSlotAsPointer (int id, const char *slot_name)
virtual int GetNumberOfPresets ()
virtual int GetNumberOfPresetsWithGroup (const char *group)
virtual int GetNumberOfVisiblePresets ()
virtual int GetNthPresetId (int index)
virtual int GetNthPresetWithGroupId (int index, const char *group)
virtual int GetPresetAtRowId (int row_index)
virtual int GetPresetRow (int id)
virtual int RemovePreset (int id)
virtual int RemoveAllPresets ()
virtual int RemoveAllPresetsWithGroup (const char *group)
virtual void SetListHeight (int)
virtual int GetListHeight ()
virtual void SetSelectSpinButtonsVisibility (int)
virtual int GetSelectSpinButtonsVisibility ()
virtual void SelectSpinButtonsVisibilityOn ()
virtual void SelectSpinButtonsVisibilityOff ()
virtual void SetApplyPresetOnSelection (int)
virtual int GetApplyPresetOnSelection ()
virtual void ApplyPresetOnSelectionOn ()
virtual void ApplyPresetOnSelectionOff ()
virtual void SetPromptBeforeRemovePreset (int)
virtual int GetPromptBeforeRemovePreset ()
virtual void PromptBeforeRemovePresetOn ()
virtual void PromptBeforeRemovePresetOff ()
virtual void SetPresetHasChangedCommand (vtkObject *object, const char *method)
virtual void PresetAddCallback ()
virtual void PresetApplyCallback ()
virtual void PresetUpdateCallback ()
virtual void PresetRemoveCallback ()
virtual void PresetSelectionCallback ()
virtual void PresetSelectPreviousCallback ()
virtual void PresetSelectNextCallback ()
virtual const char * PresetCellEditStartCallback (int row, int col, const char *text)
virtual const char * PresetCellEditEndCallback (int row, int col, const char *text)

Static Public Member Functions

vtkKWPresetSelectorNew ()

Static Public Attributes

const char * IdColumnName
const char * ThumbnailColumnName
const char * GroupColumnName
const char * CommentColumnName

Protected Member Functions

 vtkKWPresetSelector ()
 ~vtkKWPresetSelector ()
virtual void CreateColumns ()
virtual void DeAllocatePreset (int vtkNotUsed(id))
virtual int UpdatePresetRow (int id)
virtual void NumberOfPresetsHasChanged ()
virtual void UpdateRowsInPresetList ()
virtual void InvokePresetAddCommand ()
virtual void InvokePresetUpdateCommand (int id)
virtual void InvokePresetApplyCommand (int id)
virtual int InvokePresetRemoveCommand (int id)
virtual void InvokePresetHasChangedCommand (int id)
virtual void Pack ()
virtual void SetDefaultHelpStrings ()
virtual int GetIdColumnIndex ()
virtual int GetThumbnailColumnIndex ()
virtual int GetGroupColumnIndex ()
virtual int GetCommentColumnIndex ()

Protected Attributes

vtkKWMultiColumnListWithScrollbarsPresetList
vtkKWFramePresetControlFrame
vtkKWSpinButtonsPresetSelectSpinButtons
vtkKWPushButtonSetPresetButtons
int ApplyPresetOnSelection
int SelectSpinButtonsVisibility
int ThumbnailSize
int ScreenshotSize
int PromptBeforeRemovePreset
char * GroupFilter
vtkKWPresetSelectorInternals * Internals
char * PresetAddCommand
char * PresetUpdateCommand
char * PresetApplyCommand
char * PresetRemoveCommand
char * PresetHasChangedCommand

Static Protected Attributes

int AddButtonId
int ApplyButtonId
int RemoveButtonId
int UpdateButtonId

Detailed Description

a preset selector.

This class is the basis for a preset selector framework. Presets can be added to the selector and identified by unique IDs. They can be assigned pre-defined fields like a group, a filename, a comment, a thumbnail and a screenshot, as well as an unlimited number of user-defined slots. Presets are listed vertically in a table list widget (vtkKWMultiColumnList), one by row. Each column is used to display one of the predefined field. The class can be used as-is, or extended to support more columns or features, as examplified in the vtkKWWindowLevelPresetSelector and vtkKWVolumePropertyPresetSelector sub-classes. Several callbacks can be specified to enable external code to add presets, apply presets, update them, etc. presets.

Thanks:
This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on the National Centers for Biomedical Computing can be obtained from http://nihroadmap.nih.gov/bioinformatics.
See also:
vtkKWWindowLevelPresetSelector vtkKWVolumePropertyPresetSelector

Definition at line 53 of file vtkKWPresetSelector.h.


Constructor & Destructor Documentation

vtkKWPresetSelector::vtkKWPresetSelector  )  [protected]
 

vtkKWPresetSelector::~vtkKWPresetSelector  )  [protected]
 


Member Function Documentation

vtkKWPresetSelector* vtkKWPresetSelector::New  )  [static]
 

Reimplemented from vtkKWCompositeWidget.

Reimplemented in vtkKWVolumePropertyPresetSelector, and vtkKWWindowLevelPresetSelector.

vtkKWPresetSelector::vtkTypeRevisionMacro vtkKWPresetSelector  ,
vtkKWCompositeWidget 
 

void vtkKWPresetSelector::PrintSelf ostream &  os,
vtkIndent  indent
 

Reimplemented from vtkKWCompositeWidget.

Reimplemented in vtkKWVolumePropertyPresetSelector, and vtkKWWindowLevelPresetSelector.

virtual void vtkKWPresetSelector::Create vtkKWApplication app  )  [virtual]
 

Create the widget.

Reimplemented from vtkKWCompositeWidget.

virtual int vtkKWPresetSelector::AddPreset  )  [virtual]
 

Add a new preset. Return the unique Id of the preset

virtual int vtkKWPresetSelector::HasPreset int  id  )  [virtual]
 

Query if pool has given preset. Return 1 if in the pool, 0 otherwise

virtual int vtkKWPresetSelector::SetPresetGroup int  id,
const char *  group
[virtual]
 

Set/Get the group associated to a preset. This provide a way of grouping presets and filter them out using the SetGroupFilter() method. The group field is not displayed as a column by default, but this can be changed using the SetGroupColumnVisibility() method. This column can not be edited by default, but this can be changed by a subclass. Return 1 on success, 0 on error

virtual const char* vtkKWPresetSelector::GetPresetGroup int  id  )  [virtual]
 

Set/Get the group associated to a preset. This provide a way of grouping presets and filter them out using the SetGroupFilter() method. The group field is not displayed as a column by default, but this can be changed using the SetGroupColumnVisibility() method. This column can not be edited by default, but this can be changed by a subclass. Return 1 on success, 0 on error

virtual void vtkKWPresetSelector::SetGroupColumnVisibility int   )  [virtual]
 

Set/Get the visibility of the group column. Hidden by default. No effect if called before Create().

virtual int vtkKWPresetSelector::GetGroupColumnVisibility  )  [virtual]
 

Set/Get the visibility of the group column. Hidden by default. No effect if called before Create().

virtual void vtkKWPresetSelector::GroupColumnVisibilityOn  )  [virtual]
 

Set/Get the visibility of the group column. Hidden by default. No effect if called before Create().

virtual void vtkKWPresetSelector::GroupColumnVisibilityOff  )  [virtual]
 

Set/Get the visibility of the group column. Hidden by default. No effect if called before Create().

virtual void vtkKWPresetSelector::SetGroupColumnTitle const char *   )  [virtual]
 

Set/Get the title of the group column. No effect if called before Create().

virtual const char* vtkKWPresetSelector::GetGroupColumnTitle  )  [virtual]
 

Set/Get the title of the group column. No effect if called before Create().

virtual void vtkKWPresetSelector::SetGroupFilter const char *  group  )  [virtual]
 

Set/Get the group filter. Set it to a specific group to show only those presets with a matching group. Set it to NULL to display all presets.

virtual char* vtkKWPresetSelector::GetGroupFilter  )  [virtual]
 

Set/Get the group filter. Set it to a specific group to show only those presets with a matching group. Set it to NULL to display all presets.

virtual int vtkKWPresetSelector::SetPresetComment int  id,
const char *  comment
[virtual]
 

Set/Get the comment associated to a preset. This provide a way to create a small description or comment for each preset. The comment field is displayed as a column by default, but this can be changed using the SetCommentColumnVisibility() method. This column can be edited by default, by double-clicking on the corresponding table cell. Return 1 on success, 0 on error

virtual const char* vtkKWPresetSelector::GetPresetComment int  id  )  [virtual]
 

Set/Get the comment associated to a preset. This provide a way to create a small description or comment for each preset. The comment field is displayed as a column by default, but this can be changed using the SetCommentColumnVisibility() method. This column can be edited by default, by double-clicking on the corresponding table cell. Return 1 on success, 0 on error

virtual void vtkKWPresetSelector::SetCommentColumnVisibility int   )  [virtual]
 

Set/Get the visibility of the comment column. No effect if called before Create().

virtual int vtkKWPresetSelector::GetCommentColumnVisibility  )  [virtual]
 

Set/Get the visibility of the comment column. No effect if called before Create().

virtual void vtkKWPresetSelector::CommentColumnVisibilityOn  )  [virtual]
 

Set/Get the visibility of the comment column. No effect if called before Create().

virtual void vtkKWPresetSelector::CommentColumnVisibilityOff  )  [virtual]
 

Set/Get the visibility of the comment column. No effect if called before Create().

virtual int vtkKWPresetSelector::SetPresetFileName int  id,
const char *  filename
[virtual]
 

Set/Get the filename associated to a preset. This field is neither used nor displayed in this implementation but is provided as a convenience for subclasses that need to save preset to disks and keep track of the corresponding filename. Return 1 on success, 0 on error

virtual const char* vtkKWPresetSelector::GetPresetFileName int  id  )  [virtual]
 

Set/Get the filename associated to a preset. This field is neither used nor displayed in this implementation but is provided as a convenience for subclasses that need to save preset to disks and keep track of the corresponding filename. Return 1 on success, 0 on error

virtual double vtkKWPresetSelector::GetPresetCreationTime int  id  )  [virtual]
 

Get the creation time of a preset, as returned by the vtksys::SystemTools::GetTime() method (can be cast to time_t) This field is not displayed in this implementation, but is used internally in the thumbnail column so that sorting by "thumbnail" will actually sort by creation time. Return 0 on error.

virtual int vtkKWPresetSelector::SetPresetImage int  id,
vtkImageData *  image
[virtual]
 

Assign an image/screenshot to a preset. The 'image' is not stored but is used right-away to create a thumbnail icon to be displayed in the thumbnail column, and a small screenshot to be displayed as a pop-up when the user hovers over that thumbnail. The thumbnail field is not displayed as a column by default, but this can be changed using the SetThumbnailColumnVisibility() method. If passed a vtkRenderWindow, grabs an image of the window contents. Both thumbnail and screenshot icons can be retrieved.

virtual int vtkKWPresetSelector::SetPresetImageFromRenderWindow int  id,
vtkRenderWindow *  win
[virtual]
 

Assign an image/screenshot to a preset. The 'image' is not stored but is used right-away to create a thumbnail icon to be displayed in the thumbnail column, and a small screenshot to be displayed as a pop-up when the user hovers over that thumbnail. The thumbnail field is not displayed as a column by default, but this can be changed using the SetThumbnailColumnVisibility() method. If passed a vtkRenderWindow, grabs an image of the window contents. Both thumbnail and screenshot icons can be retrieved.

virtual vtkKWIcon* vtkKWPresetSelector::GetPresetThumbnail int  id  )  [virtual]
 

Assign an image/screenshot to a preset. The 'image' is not stored but is used right-away to create a thumbnail icon to be displayed in the thumbnail column, and a small screenshot to be displayed as a pop-up when the user hovers over that thumbnail. The thumbnail field is not displayed as a column by default, but this can be changed using the SetThumbnailColumnVisibility() method. If passed a vtkRenderWindow, grabs an image of the window contents. Both thumbnail and screenshot icons can be retrieved.

virtual vtkKWIcon* vtkKWPresetSelector::GetPresetScreenshot int  id  )  [virtual]
 

Assign an image/screenshot to a preset. The 'image' is not stored but is used right-away to create a thumbnail icon to be displayed in the thumbnail column, and a small screenshot to be displayed as a pop-up when the user hovers over that thumbnail. The thumbnail field is not displayed as a column by default, but this can be changed using the SetThumbnailColumnVisibility() method. If passed a vtkRenderWindow, grabs an image of the window contents. Both thumbnail and screenshot icons can be retrieved.

virtual void vtkKWPresetSelector::SetThumbnailColumnVisibility int   )  [virtual]
 

Set/Get the visibility of the thumbnail column. No effect if called before Create().

virtual int vtkKWPresetSelector::GetThumbnailColumnVisibility  )  [virtual]
 

Set/Get the visibility of the thumbnail column. No effect if called before Create().

virtual void vtkKWPresetSelector::ThumbnailColumnVisibilityOn  )  [virtual]
 

Set/Get the visibility of the thumbnail column. No effect if called before Create().

virtual void vtkKWPresetSelector::ThumbnailColumnVisibilityOff  )  [virtual]
 

Set/Get the visibility of the thumbnail column. No effect if called before Create().

virtual void vtkKWPresetSelector::SetThumbnailSize int   )  [virtual]
 

Set/Get the thumbnail size. Changing the size will not resize the current thumbnails, but will affect the presets added to the selector later on.

virtual int vtkKWPresetSelector::GetThumbnailSize  )  [virtual]
 

Set/Get the thumbnail size. Changing the size will not resize the current thumbnails, but will affect the presets added to the selector later on.

virtual void vtkKWPresetSelector::SetScreenshotSize int   )  [virtual]
 

Set/Get the screenshot size, i.e. the image that appears as a popup when the mouse is on top of the thumbnail. Changing the size will not resize the current screenshots, but will affect the presets added to the selector later on.

virtual int vtkKWPresetSelector::GetScreenshotSize  )  [virtual]
 

Set/Get the screenshot size, i.e. the image that appears as a popup when the mouse is on top of the thumbnail. Changing the size will not resize the current screenshots, but will affect the presets added to the selector later on.

virtual int vtkKWPresetSelector::HasPresetUserSlot int  id,
const char *  slot_name
[virtual]
 

Set/Get a preset user slot. An unlimited number of slots can be added to a preset. Each slot is identified by a name (string). Convenience methods are provided to store and retrieve various types of data (double, int, string, pointer). Return 1 on success, 0 on error

virtual int vtkKWPresetSelector::SetPresetUserSlotAsDouble int  id,
const char *  slot_name,
double  value
[virtual]
 

Set/Get a preset user slot. An unlimited number of slots can be added to a preset. Each slot is identified by a name (string). Convenience methods are provided to store and retrieve various types of data (double, int, string, pointer). Return 1 on success, 0 on error

virtual double vtkKWPresetSelector::GetPresetUserSlotAsDouble int  id,
const char *  slot_name
[virtual]
 

Set/Get a preset user slot. An unlimited number of slots can be added to a preset. Each slot is identified by a name (string). Convenience methods are provided to store and retrieve various types of data (double, int, string, pointer). Return 1 on success, 0 on error

virtual int vtkKWPresetSelector::SetPresetUserSlotAsInt int  id,
const char *  slot_name,
int  value
[virtual]
 

Set/Get a preset user slot. An unlimited number of slots can be added to a preset. Each slot is identified by a name (string). Convenience methods are provided to store and retrieve various types of data (double, int, string, pointer). Return 1 on success, 0 on error

virtual int vtkKWPresetSelector::GetPresetUserSlotAsInt int  id,
const char *  slot_name
[virtual]
 

Set/Get a preset user slot. An unlimited number of slots can be added to a preset. Each slot is identified by a name (string). Convenience methods are provided to store and retrieve various types of data (double, int, string, pointer). Return 1 on success, 0 on error

virtual int vtkKWPresetSelector::SetPresetUserSlotAsString int  id,
const char *  slot_name,
const char *  value
[virtual]
 

Set/Get a preset user slot. An unlimited number of slots can be added to a preset. Each slot is identified by a name (string). Convenience methods are provided to store and retrieve various types of data (double, int, string, pointer). Return 1 on success, 0 on error

virtual const char* vtkKWPresetSelector::GetPresetUserSlotAsString int  id,
const char *  slot_name
[virtual]
 

Set/Get a preset user slot. An unlimited number of slots can be added to a preset. Each slot is identified by a name (string). Convenience methods are provided to store and retrieve various types of data (double, int, string, pointer). Return 1 on success, 0 on error

virtual int vtkKWPresetSelector::SetPresetUserSlotAsPointer int  id,
const char *  slot_name,
void *  ptr
[virtual]
 

Set/Get a preset user slot. An unlimited number of slots can be added to a preset. Each slot is identified by a name (string). Convenience methods are provided to store and retrieve various types of data (double, int, string, pointer). Return 1 on success, 0 on error

virtual void* vtkKWPresetSelector::GetPresetUserSlotAsPointer int  id,
const char *  slot_name
[virtual]
 

Set/Get a preset user slot. An unlimited number of slots can be added to a preset. Each slot is identified by a name (string). Convenience methods are provided to store and retrieve various types of data (double, int, string, pointer). Return 1 on success, 0 on error

virtual int vtkKWPresetSelector::GetNumberOfPresets  )  [virtual]
 

Get the number of presets, or the number of presets with a specific group, or the number of visible presets, i.e. the presets that are displayed according to the GroupFilter for example.

virtual int vtkKWPresetSelector::GetNumberOfPresetsWithGroup const char *  group  )  [virtual]
 

Get the number of presets, or the number of presets with a specific group, or the number of visible presets, i.e. the presets that are displayed according to the GroupFilter for example.

virtual int vtkKWPresetSelector::GetNumberOfVisiblePresets  )  [virtual]
 

Get the number of presets, or the number of presets with a specific group, or the number of visible presets, i.e. the presets that are displayed according to the GroupFilter for example.

virtual int vtkKWPresetSelector::GetNthPresetId int  index  )  [virtual]
 

Retrieve the Id of the nth-preset, or the id of the nth preset with a given group. Return id on success, -1 otherwise

virtual int vtkKWPresetSelector::GetNthPresetWithGroupId int  index,
const char *  group
[virtual]
 

Retrieve the Id of the nth-preset, or the id of the nth preset with a given group. Return id on success, -1 otherwise

virtual int vtkKWPresetSelector::GetPresetAtRowId int  row_index  )  [virtual]
 

Retrieve the Id of the preset at a given row in the table, or the row of a given preset. Return id or row index on success, -1 otherwise

virtual int vtkKWPresetSelector::GetPresetRow int  id  )  [virtual]
 

Retrieve the Id of the preset at a given row in the table, or the row of a given preset. Return id or row index on success, -1 otherwise

virtual int vtkKWPresetSelector::GetNthPresetWithGroupRank int  index,
const char *  group
[virtual]
 

Retrieve the rank of the nth preset with a given group (i.e. the nth-preset with a given group). This rank can then be used to retrieve the preset id using the GetNthPresetId() method. Return rank on success, -1 otherwise

virtual int vtkKWPresetSelector::RemovePreset int  id  )  [virtual]
 

Remove a preset, or all of them, or all of the presets with the same group. Return 1 on success, 0 on error

virtual int vtkKWPresetSelector::RemoveAllPresets  )  [virtual]
 

Remove a preset, or all of them, or all of the presets with the same group. Return 1 on success, 0 on error

virtual int vtkKWPresetSelector::RemoveAllPresetsWithGroup const char *  group  )  [virtual]
 

Remove a preset, or all of them, or all of the presets with the same group. Return 1 on success, 0 on error

virtual void vtkKWPresetSelector::SetListHeight int   )  [virtual]
 

Set/Get the list height (in number of items) No effect if called before Create().

virtual int vtkKWPresetSelector::GetListHeight  )  [virtual]
 

Set/Get the list height (in number of items) No effect if called before Create().

virtual void vtkKWPresetSelector::SetSelectSpinButtonsVisibility int   )  [virtual]
 

Set/Get the visibility of the select spin buttons. The select spin button are two buttons that can be used to select the next or previous preset in the list. Note that if ApplyPresetOnSelection is On, this will also apply the preset at the same time, thus providing a quick way to loop over all presets and apply them.

virtual int vtkKWPresetSelector::GetSelectSpinButtonsVisibility  )  [virtual]
 

Set/Get the visibility of the select spin buttons. The select spin button are two buttons that can be used to select the next or previous preset in the list. Note that if ApplyPresetOnSelection is On, this will also apply the preset at the same time, thus providing a quick way to loop over all presets and apply them.

virtual void vtkKWPresetSelector::SelectSpinButtonsVisibilityOn  )  [virtual]
 

Set/Get the visibility of the select spin buttons. The select spin button are two buttons that can be used to select the next or previous preset in the list. Note that if ApplyPresetOnSelection is On, this will also apply the preset at the same time, thus providing a quick way to loop over all presets and apply them.

virtual void vtkKWPresetSelector::SelectSpinButtonsVisibilityOff  )  [virtual]
 

Set/Get the visibility of the select spin buttons. The select spin button are two buttons that can be used to select the next or previous preset in the list. Note that if ApplyPresetOnSelection is On, this will also apply the preset at the same time, thus providing a quick way to loop over all presets and apply them.

virtual void vtkKWPresetSelector::SetPresetAddCommand vtkObject *  object,
const char *  method
[virtual]
 

Specifies a command to be invoked when the "add preset" button is pressed. This gives the opportunity for the application to check and collect the relevant information to store in a new preset. The application is then free to add the preset (using the AddPreset() method) and set its fields independently (using the SetPresetGroup(), SetPresetComment(), SetPreset...() methods). Note that if not set, the "add preset" button is not visible.

virtual void vtkKWPresetSelector::SetPresetUpdateCommand vtkObject *  object,
const char *  method
[virtual]
 

Specifies a command to be invoked when the "update selected preset" button is pressed. This gives the opportunity for the application to check and collect the relevant information to update in the preset. The application is then free to update the preset's fields independently (using the SetPresetGroup(), SetPresetComment(), SetPreset...() methods). The id of the preset to update is passed to the command. Note that if not set, the "update selected preset" button is not visible.

virtual void vtkKWPresetSelector::SetPresetApplyCommand vtkObject *  object,
const char *  method
[virtual]
 

Specifies a command to be invoked when the "apply selected preset" button is pressed, or when ApplyPresetOnSelection is On and the user applies a preset by selecting it directly. This gives the opportunity for the application to query the preset's fields independently (using the GetPresetGroup(), GetPresetComment(), GetPreset...() methods) and apply those values to the relevant objects. The id of the preset to apply is passed to the command. Note that if not set or ApplyPresetOnSelection is On, the "apply selected preset" button is not visible.

virtual void vtkKWPresetSelector::SetApplyPresetOnSelection int   )  [virtual]
 

Set/Get if a preset should be applied directly when it is selected by a single-click, or only when the "apply selected preset" button is pressed. If set, only one preset can be selected at a time (if not, multiple preset can be selected, and removed for example). Note that if set, the "apply selected preset" button is not visible.

virtual int vtkKWPresetSelector::GetApplyPresetOnSelection  )  [virtual]
 

Set/Get if a preset should be applied directly when it is selected by a single-click, or only when the "apply selected preset" button is pressed. If set, only one preset can be selected at a time (if not, multiple preset can be selected, and removed for example). Note that if set, the "apply selected preset" button is not visible.

virtual void vtkKWPresetSelector::ApplyPresetOnSelectionOn  )  [virtual]
 

Set/Get if a preset should be applied directly when it is selected by a single-click, or only when the "apply selected preset" button is pressed. If set, only one preset can be selected at a time (if not, multiple preset can be selected, and removed for example). Note that if set, the "apply selected preset" button is not visible.

virtual void vtkKWPresetSelector::ApplyPresetOnSelectionOff  )  [virtual]
 

Set/Get if a preset should be applied directly when it is selected by a single-click, or only when the "apply selected preset" button is pressed. If set, only one preset can be selected at a time (if not, multiple preset can be selected, and removed for example). Note that if set, the "apply selected preset" button is not visible.

virtual void vtkKWPresetSelector::SetPresetRemoveCommand vtkObject *  object,
const char *  method
[virtual]
 

Specifies a command to be invoked when the "remove selected preset" button is pressed. This command is called *before* the preset is removed from the pool: this gives the opportunity for the application to query the preset's fields independently (using the GetPresetGroup(), GetPresetComment(), GetPreset...() methods), decide if the preset should be removed or not, and delete it from its internal structures accordingly, if needed. The id of the preset to remove is passed to the command. This command is expected to return an integer equal to 1 if the preset is really to be removed, 0 otherwise.

virtual void vtkKWPresetSelector::SetPromptBeforeRemovePreset int   )  [virtual]
 

Set/Get if the user should be prompted before removing one or more presets using "remove selected preset" button.

virtual int vtkKWPresetSelector::GetPromptBeforeRemovePreset  )  [virtual]
 

Set/Get if the user should be prompted before removing one or more presets using "remove selected preset" button.

virtual void vtkKWPresetSelector::PromptBeforeRemovePresetOn  )  [virtual]
 

Set/Get if the user should be prompted before removing one or more presets using "remove selected preset" button.

virtual void vtkKWPresetSelector::PromptBeforeRemovePresetOff  )  [virtual]
 

Set/Get if the user should be prompted before removing one or more presets using "remove selected preset" button.

virtual void vtkKWPresetSelector::SetPresetHasChangedCommand vtkObject *  object,
const char *  method
[virtual]
 

Specifies a command to be invoked when the preset has been changed using direct user-interaction on the widget interface. This includes double-clicking on a table cell (the comment field for example) and editing the contents of the cell directly, when allowed. This gives the opportunity for the application to query the preset's fields independently (using the GetPresetGroup(), GetPresetComment(), GetPreset...() methods), and update its internal structures accordingly, if needed. The id of the preset that has changed is passed to the command.

virtual void vtkKWPresetSelector::Update  )  [virtual]
 

Refresh the interface.

virtual void vtkKWPresetSelector::UpdateEnableState  )  [virtual]
 

Update the "enable" state of the object and its internal parts. Depending on different Ivars (this->Enabled, the application's Limited Edition Mode, etc.), the "enable" state of the object is updated and propagated to its internal parts/subwidgets. This will, for example, enable/disable parts of the widget UI, enable/disable the visibility of 3D widgets, etc.

Reimplemented from vtkKWWidget.

virtual void vtkKWPresetSelector::PresetAddCallback  )  [virtual]
 

Callbacks

virtual void vtkKWPresetSelector::PresetApplyCallback  )  [virtual]
 

Callbacks

virtual void vtkKWPresetSelector::PresetUpdateCallback  )  [virtual]
 

Callbacks

virtual void vtkKWPresetSelector::PresetRemoveCallback  )  [virtual]
 

Callbacks

virtual void vtkKWPresetSelector::PresetSelectionCallback  )  [virtual]
 

Callbacks

virtual void vtkKWPresetSelector::PresetSelectPreviousCallback  )  [virtual]
 

Callbacks

virtual void vtkKWPresetSelector::PresetSelectNextCallback  )  [virtual]
 

Callbacks

virtual void vtkKWPresetSelector::PresetCellThumbnailCallback const char *  ,
int  ,
int  ,
const char * 
[virtual]
 

Callback used to refresh the contents of the image cell for each preset

virtual const char* vtkKWPresetSelector::PresetCellEditStartCallback int  row,
int  col,
const char *  text
[virtual]
 

Callback invoked when the user starts editing a specific preset field located at cell ('row', 'col'), which current contents is 'text'. This method returns the value that is to become the initial contents of the temporary embedded widget used for editing: most of the time, this is the same value as 'text'. The next step (validation) is handled by PresetCellEditEndCallback

virtual const char* vtkKWPresetSelector::PresetCellEditEndCallback int  row,
int  col,
const char *  text
[virtual]
 

Callback invoked when the user ends editing a specific preset field located at cell ('row', 'col'). The main purpose of this method is to perform a final validation of the edit window's contents 'text'. This method returns the value that is to become the new contents for that cell. The next step (updating) is handled by PresetCellUpdateCallback

Reimplemented in vtkKWWindowLevelPresetSelector.

virtual void vtkKWPresetSelector::PresetCellUpdatedCallback int  row,
int  col,
const char *  text
[virtual]
 

Callback invoked when the user successfully updated the preset field located at ('row', 'col') with the new contents 'text', as a result of editing the corresponding cell interactively.

Reimplemented in vtkKWWindowLevelPresetSelector.

virtual void vtkKWPresetSelector::CreateColumns  )  [protected, virtual]
 

Create the columns. Subclasses should override this method to add their own columns and display their own preset fields (do not forget to call the superclass first).

Reimplemented in vtkKWWindowLevelPresetSelector.

virtual void vtkKWPresetSelector::DeAllocatePreset int   vtkNotUsed(id)  )  [inline, protected, virtual]
 

Deallocate a preset. Subclasses should override this method to release the memory allocated by their own preset fields (do not forget to call the superclass first).

Definition at line 406 of file vtkKWPresetSelector.h.

virtual int vtkKWPresetSelector::UpdatePresetRow int  id  )  [protected, virtual]
 

Update the preset row, i.e. add a row for that preset if it is not displayed already, hide it if it does not match GroupFilter, and update the table columns with the corresponding preset fields. Subclass should override this method to display their own fields. Return 1 on success, 0 if the row was not (or can not be) updated. Subclasses should call the parent's UpdatePresetRow, and abort if the result is not 1.

Reimplemented in vtkKWWindowLevelPresetSelector.

virtual void vtkKWPresetSelector::NumberOfPresetsHasChanged  )  [protected, virtual]
 

Called when the number of presets has changed

virtual void vtkKWPresetSelector::UpdateRowsInPresetList  )  [protected, virtual]
 

Update all rows in the list

virtual void vtkKWPresetSelector::InvokePresetAddCommand  )  [protected, virtual]
 

virtual void vtkKWPresetSelector::InvokePresetUpdateCommand int  id  )  [protected, virtual]
 

virtual void vtkKWPresetSelector::InvokePresetApplyCommand int  id  )  [protected, virtual]
 

virtual int vtkKWPresetSelector::InvokePresetRemoveCommand int  id  )  [protected, virtual]
 

virtual void vtkKWPresetSelector::InvokePresetHasChangedCommand int  id  )  [protected, virtual]
 

virtual int vtkKWPresetSelector::GetIdColumnIndex  )  [protected, virtual]
 

Convenience methods to get the index of a given column

virtual int vtkKWPresetSelector::GetThumbnailColumnIndex  )  [protected, virtual]
 

Convenience methods to get the index of a given column

virtual int vtkKWPresetSelector::GetGroupColumnIndex  )  [protected, virtual]
 

Convenience methods to get the index of a given column

virtual int vtkKWPresetSelector::GetCommentColumnIndex  )  [protected, virtual]
 

Convenience methods to get the index of a given column

virtual void vtkKWPresetSelector::Pack  )  [protected, virtual]
 

Pack

virtual void vtkKWPresetSelector::SetDefaultHelpStrings  )  [protected, virtual]
 

Set the default balloon help strings Subclass can override this method to change the help strings associated to the buttons.


Member Data Documentation

const char* vtkKWPresetSelector::IdColumnName [static]
 

Some constants BTX

Definition at line 387 of file vtkKWPresetSelector.h.

const char* vtkKWPresetSelector::ThumbnailColumnName [static]
 

Some constants BTX

Definition at line 388 of file vtkKWPresetSelector.h.

const char* vtkKWPresetSelector::GroupColumnName [static]
 

Some constants BTX

Definition at line 389 of file vtkKWPresetSelector.h.

const char* vtkKWPresetSelector::CommentColumnName [static]
 

Some constants BTX

Definition at line 390 of file vtkKWPresetSelector.h.

vtkKWMultiColumnListWithScrollbars* vtkKWPresetSelector::PresetList [protected]
 

Definition at line 417 of file vtkKWPresetSelector.h.

vtkKWFrame* vtkKWPresetSelector::PresetControlFrame [protected]
 

Definition at line 418 of file vtkKWPresetSelector.h.

vtkKWSpinButtons* vtkKWPresetSelector::PresetSelectSpinButtons [protected]
 

Definition at line 419 of file vtkKWPresetSelector.h.

vtkKWPushButtonSet* vtkKWPresetSelector::PresetButtons [protected]
 

Definition at line 420 of file vtkKWPresetSelector.h.

int vtkKWPresetSelector::ApplyPresetOnSelection [protected]
 

Definition at line 422 of file vtkKWPresetSelector.h.

int vtkKWPresetSelector::SelectSpinButtonsVisibility [protected]
 

Definition at line 423 of file vtkKWPresetSelector.h.

int vtkKWPresetSelector::ThumbnailSize [protected]
 

Definition at line 425 of file vtkKWPresetSelector.h.

int vtkKWPresetSelector::ScreenshotSize [protected]
 

Definition at line 426 of file vtkKWPresetSelector.h.

int vtkKWPresetSelector::PromptBeforeRemovePreset [protected]
 

Definition at line 427 of file vtkKWPresetSelector.h.

char* vtkKWPresetSelector::GroupFilter [protected]
 

Definition at line 429 of file vtkKWPresetSelector.h.

vtkKWPresetSelectorInternals* vtkKWPresetSelector::Internals [protected]
 

PIMPL Encapsulation for STL containers

Reimplemented from vtkKWWidget.

Definition at line 436 of file vtkKWPresetSelector.h.

char* vtkKWPresetSelector::PresetAddCommand [protected]
 

Definition at line 442 of file vtkKWPresetSelector.h.

char* vtkKWPresetSelector::PresetUpdateCommand [protected]
 

Definition at line 445 of file vtkKWPresetSelector.h.

char* vtkKWPresetSelector::PresetApplyCommand [protected]
 

Definition at line 448 of file vtkKWPresetSelector.h.

char* vtkKWPresetSelector::PresetRemoveCommand [protected]
 

Definition at line 451 of file vtkKWPresetSelector.h.

char* vtkKWPresetSelector::PresetHasChangedCommand [protected]
 

Definition at line 454 of file vtkKWPresetSelector.h.

int vtkKWPresetSelector::AddButtonId [static, protected]
 

Some constants BTX

Definition at line 474 of file vtkKWPresetSelector.h.

int vtkKWPresetSelector::ApplyButtonId [static, protected]
 

Some constants BTX

Definition at line 475 of file vtkKWPresetSelector.h.

int vtkKWPresetSelector::RemoveButtonId [static, protected]
 

Some constants BTX

Definition at line 476 of file vtkKWPresetSelector.h.

int vtkKWPresetSelector::UpdateButtonId [static, protected]
 

Some constants BTX

Definition at line 477 of file vtkKWPresetSelector.h.


The documentation for this class was generated from the following file:
Generated on Tue May 30 12:41:42 2006 for ParaView by doxygen 1.3.5