a directory preset selector. More...
#include <vtkKWDirectoryPresetSelector.h>


Public Types | |
| typedef vtkKWPresetSelector | Superclass |
Public Member Functions | |
| virtual const char * | GetClassName () |
| virtual int | IsA (const char *type) |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| virtual int | HasPresetWithDirectory (const char *directory) |
| virtual void | PresetCellUpdatedCallback (int row, int col, const char *text) |
| virtual int | AddDirectoryCallback () |
Static Public Member Functions | |
| static vtkKWDirectoryPresetSelector * | New () |
| static int | IsTypeOf (const char *type) |
| static vtkKWDirectoryPresetSelector * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
| vtkKWDirectoryPresetSelector () | |
| ~vtkKWDirectoryPresetSelector () | |
| virtual void | CreateWidget () |
| virtual void | CreateColumns () |
| virtual int | UpdatePresetRow (int id) |
Protected Attributes | |
| int | MaximumDirectoryLength |
| int | UniqueDirectories |
| vtkKWFileBrowserDialog * | FileBrowserDialog |
|
| |
| static const char * | DirectoryColumnName |
| static const char * | DirectoryEnabledColumnName |
| static int | GetEnabledPresetDirectoriesFromPresetDirectories (char **to_str, const char to_delim, const char *from_str, const char from_delim) |
| static int | UpdatePresetDirectoriesFromEnabledPresetDirectories (char **update_str, const char update_delim, const char *from_str, const char from_delim) |
| virtual int | SetPresetDirectory (int id, const char *directory) |
| virtual const char * | GetPresetDirectory (int id) |
| virtual int | GetPresetDirectoryEnabled (int id) |
| virtual int | SetPresetDirectoryEnabled (int id, int flag) |
| virtual void | SetDirectoryEnabledColumnVisibility (int) |
| virtual int | GetDirectoryEnabledColumnVisibility () |
| virtual void | DirectoryEnabledColumnVisibilityOn () |
| virtual void | DirectoryEnabledColumnVisibilityOff () |
| virtual void | SetMaximumDirectoryLength (int) |
| virtual int | GetMaximumDirectoryLength () |
| virtual void | SetUniqueDirectories (int) |
| virtual int | GetUniqueDirectories () |
| virtual void | UniqueDirectoriesOn () |
| virtual void | UniqueDirectoriesOff () |
| virtual int | AddEnabledPresetDirectoriesFromDelimitedString (const char *from_str, const char from_delim) |
| virtual int | GetEnabledPresetDirectoriesToDelimitedString (char **to_str, const char to_delim) |
| virtual int | AddPresetDirectoriesFromDelimitedString (const char *from_str, const char from_delim) |
| virtual int | GetPresetDirectoriesToDelimitedString (char **to_str, const char to_delim) |
| virtual const char * | PresetCellEditStartCallback (int row, int col, const char *text) |
| virtual const char * | PresetCellEditEndCallback (int row, int col, const char *text) |
| virtual vtkKWFileBrowserDialog * | GetFileBrowserDialog () |
| virtual int | GetDirectoryColumnIndex () |
| virtual int | GetDirectoryEnabledColumnIndex () |
a directory preset selector.
This class is a widget that can be used to pick and list of set of directories. presets.
Definition at line 44 of file vtkKWDirectoryPresetSelector.h.
Reimplemented from vtkKWPresetSelector.
Definition at line 49 of file vtkKWDirectoryPresetSelector.h.
| vtkKWDirectoryPresetSelector::vtkKWDirectoryPresetSelector | ( | ) | [protected] |
| vtkKWDirectoryPresetSelector::~vtkKWDirectoryPresetSelector | ( | ) | [protected] |
| static vtkKWDirectoryPresetSelector* vtkKWDirectoryPresetSelector::New | ( | ) | [static] |
Reimplemented from vtkKWPresetSelector.
| virtual const char* vtkKWDirectoryPresetSelector::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkKWPresetSelector.
| static int vtkKWDirectoryPresetSelector::IsTypeOf | ( | const char * | type | ) | [static] |
Reimplemented from vtkKWPresetSelector.
| virtual int vtkKWDirectoryPresetSelector::IsA | ( | const char * | type | ) | [virtual] |
Reimplemented from vtkKWPresetSelector.
| static vtkKWDirectoryPresetSelector* vtkKWDirectoryPresetSelector::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkKWPresetSelector.
| void vtkKWDirectoryPresetSelector::PrintSelf | ( | ostream & | os, | |
| vtkIndent | indent | |||
| ) | [virtual] |
Reimplemented from vtkKWPresetSelector.
| virtual int vtkKWDirectoryPresetSelector::SetPresetDirectory | ( | int | id, | |
| const char * | directory | |||
| ) | [virtual] |
Set/Get the directory for a given preset. Return 1 on success, 0 otherwise
| virtual const char* vtkKWDirectoryPresetSelector::GetPresetDirectory | ( | int | id | ) | [virtual] |
Some constants BTX
| virtual int vtkKWDirectoryPresetSelector::HasPresetWithDirectory | ( | const char * | directory | ) | [virtual] |
Query if the pool has a given directory preset
| virtual int vtkKWDirectoryPresetSelector::GetPresetDirectoryEnabled | ( | int | id | ) | [virtual] |
Set/Get the directory enabled flag for a given preset. Return 1 on success, 0 otherwise
| virtual int vtkKWDirectoryPresetSelector::SetPresetDirectoryEnabled | ( | int | id, | |
| int | flag | |||
| ) | [virtual] |
Some constants BTX
| virtual void vtkKWDirectoryPresetSelector::SetDirectoryEnabledColumnVisibility | ( | int | ) | [virtual] |
Set/Get the visibility of the directory enabled flag column. Hidden by default. No effect if called before Create().
| virtual int vtkKWDirectoryPresetSelector::GetDirectoryEnabledColumnVisibility | ( | ) | [virtual] |
Some constants BTX
| virtual void vtkKWDirectoryPresetSelector::DirectoryEnabledColumnVisibilityOn | ( | ) | [virtual] |
Some constants BTX
| virtual void vtkKWDirectoryPresetSelector::DirectoryEnabledColumnVisibilityOff | ( | ) | [virtual] |
Some constants BTX
| virtual void vtkKWDirectoryPresetSelector::SetMaximumDirectoryLength | ( | int | ) | [virtual] |
Set/Get the maximum length of the directory paths, in characters. If set to 0 (default), do not shorten the paths automatically.
| virtual int vtkKWDirectoryPresetSelector::GetMaximumDirectoryLength | ( | ) | [virtual] |
Some constants BTX
| virtual void vtkKWDirectoryPresetSelector::SetUniqueDirectories | ( | int | ) | [virtual] |
Set/Get if unique directories are enforced..
| virtual int vtkKWDirectoryPresetSelector::GetUniqueDirectories | ( | ) | [virtual] |
Some constants BTX
| virtual void vtkKWDirectoryPresetSelector::UniqueDirectoriesOn | ( | ) | [virtual] |
Some constants BTX
| virtual void vtkKWDirectoryPresetSelector::UniqueDirectoriesOff | ( | ) | [virtual] |
Some constants BTX
| virtual int vtkKWDirectoryPresetSelector::AddEnabledPresetDirectoriesFromDelimitedString | ( | const char * | from_str, | |
| const char | from_delim | |||
| ) | [virtual] |
Add/retrieve the whole list of enabled directories from/to a string. Each directory in this list is separated by a given delimiter (ex: ':' or ';'). Presets are added in an "enabled" state (see GetPresetDirectoryEnabled) to the end of the preset list. Only presets that were enabled are retrieved and stored into a string (note that said string will be allocated to the proper size with 'new' and should therefore be de-allocated by the called with 'delete []'). Return the number of enabled directories added, or retrieved.
| virtual int vtkKWDirectoryPresetSelector::GetEnabledPresetDirectoriesToDelimitedString | ( | char ** | to_str, | |
| const char | to_delim | |||
| ) | [virtual] |
Some constants BTX
| virtual int vtkKWDirectoryPresetSelector::AddPresetDirectoriesFromDelimitedString | ( | const char * | from_str, | |
| const char | from_delim | |||
| ) | [virtual] |
Add/retrieve the whole list of directories *and* their enabled flag from/to a string representation. Each item in this list is a directory and a boolean flag (0 or 1) specifying if that directory is actually enabled or not in the UI. Each element is separated by a given delimiter (ex: with '|' as delim, "c:/temp|0|d:/foo/bar|1|c:/windows|1" refers to "c:/temp" as disabled and both "d:/foo/bar" and "c:/windows" enabled; at this point, the string returned by AddEnabledPresetDirectoriesFromDelimitedString would be "d:/foo/bar;c:/windows" with a ';' delimiter). Presets are added to the end of the preset list. (note that said string will be allocated to the proper size with 'new' and should therefore be de-allocated by the caller with 'delete []'). Return the number of directories added, or retrieved.
| virtual int vtkKWDirectoryPresetSelector::GetPresetDirectoriesToDelimitedString | ( | char ** | to_str, | |
| const char | to_delim | |||
| ) | [virtual] |
Some constants BTX
| static int vtkKWDirectoryPresetSelector::GetEnabledPresetDirectoriesFromPresetDirectories | ( | char ** | to_str, | |
| const char | to_delim, | |||
| const char * | from_str, | |||
| const char | from_delim | |||
| ) | [static] |
Static helper method. This method extracts the list of enabled directories (to a string) from the list of directories + flag (as a string, as it was returned by GetPresetDirectoriesToDelimitedString for example). Each list can be separated by different delimiters (ex: with '|' as from_delim, "c:/temp|0|d:/foo/bar|1|c:/windows|1" as from_str will be output to to_str as "d:/foo/bar;c:/windows" if to_delim is ';'). (note that said string will be allocated to the proper size with 'new' and should therefore be de-allocated by the caller with 'delete []'). Return the number of enabled directories retrieved.
| static int vtkKWDirectoryPresetSelector::UpdatePresetDirectoriesFromEnabledPresetDirectories | ( | char ** | update_str, | |
| const char | update_delim, | |||
| const char * | from_str, | |||
| const char | from_delim | |||
| ) | [static] |
Static helper method. This method *updates* the list of directories + flag (to a string) from a list of enabled directories (as a string, as it was returned by Duplicated directories are not supported here. Each list can be separated by different delimiters (ex: with ';' as from_delim, "c:/temp;d:/bill" as from_str, '|' as to_delim and "c:/temp|0|d:/foo/bar|0|c:/windows|1" as to_str, to_str will be updated (i.e. potentially re-allocated) to a new string "c:/temp|1|d:/foo/bar|0|d:/bill|1", where the already existing "c:/temp" was updated/enabled, ""d:/foo/bar" was ignored, "c:/windows" was removed (since considered not enabled) and "d:/bill was added. (note that said string will be allocated to the proper size with 'new' and should therefore be de-allocated by the caller with 'delete []'). Return the number of directories updated (i.e. removed, updated or added).
| virtual const char* vtkKWDirectoryPresetSelector::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
Reimplemented from vtkKWPresetSelector.
| virtual const char* vtkKWDirectoryPresetSelector::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 from vtkKWPresetSelector.
| virtual void vtkKWDirectoryPresetSelector::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 from vtkKWPresetSelector.
| virtual int vtkKWDirectoryPresetSelector::AddDirectoryCallback | ( | ) | [virtual] |
Callback invoked when the user press the "Add" button
| virtual vtkKWFileBrowserDialog* vtkKWDirectoryPresetSelector::GetFileBrowserDialog | ( | ) | [virtual] |
Access to sub-widgets.
| virtual void vtkKWDirectoryPresetSelector::CreateWidget | ( | ) | [protected, virtual] |
Create the widget.
Reimplemented from vtkKWPresetSelector.
| virtual void vtkKWDirectoryPresetSelector::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 from vtkKWPresetSelector.
| virtual int vtkKWDirectoryPresetSelector::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 from vtkKWPresetSelector.
| virtual int vtkKWDirectoryPresetSelector::GetDirectoryColumnIndex | ( | ) | [protected, virtual] |
Get the index of a given column
| virtual int vtkKWDirectoryPresetSelector::GetDirectoryEnabledColumnIndex | ( | ) | [protected, virtual] |
Some constants BTX
const char* vtkKWDirectoryPresetSelector::DirectoryColumnName [static] |
Some constants BTX
Definition at line 165 of file vtkKWDirectoryPresetSelector.h.
const char* vtkKWDirectoryPresetSelector::DirectoryEnabledColumnName [static] |
Some constants BTX
Definition at line 166 of file vtkKWDirectoryPresetSelector.h.
int vtkKWDirectoryPresetSelector::MaximumDirectoryLength [protected] |
Definition at line 210 of file vtkKWDirectoryPresetSelector.h.
int vtkKWDirectoryPresetSelector::UniqueDirectories [protected] |
Definition at line 211 of file vtkKWDirectoryPresetSelector.h.
Definition at line 236 of file vtkKWDirectoryPresetSelector.h.
1.6.1