a "most recent files" manager. More...
#include <vtkKWMostRecentFilesManager.h>


Public Types | |
| typedef vtkKWObject | Superclass |
Public Member Functions | |
| virtual const char * | GetClassName () |
| virtual int | IsA (const char *type) |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| vtkKWMenu * | GetMenu () |
| virtual void | SetFileLabel (const char *filename, const char *label) |
| virtual void | UpdateMenuStateInParent () |
| virtual void | PopulateMenu (vtkKWMenu *, int max_nb) |
Static Public Member Functions | |
| static vtkKWMostRecentFilesManager * | New () |
| static int | IsTypeOf (const char *type) |
| static vtkKWMostRecentFilesManager * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
| vtkKWMostRecentFilesManager () | |
| ~vtkKWMostRecentFilesManager () | |
| virtual void | UpdateMenu () |
Protected Attributes | |
| char * | DefaultTargetCommand |
| vtkObject * | DefaultTargetObject |
| char * | RegistryKey |
| int | MaximumNumberOfFilesInRegistry |
| int | MaximumNumberOfFilesInMenu |
| int | LabelVisibilityInMenu |
| int | BaseNameVisibilityInMenu |
| int | SeparatePathInMenu |
| vtkKWMostRecentFilesManagerInternals * | Internals |
Friends | |
| class | vtkKWMostRecentFilesManagerInternals |
|
| |
| enum | { MenuHasChangedEvent = 24000 } |
| virtual void | AddFile (const char *filename, vtkObject *target_object=NULL, const char *target_command=NULL, const char *label=NULL) |
| virtual int | GetNumberOfFiles () |
| virtual const char * | GetNthFileName (int idx) |
| virtual vtkObject * | GetNthTargetObject (int idx) |
| virtual const char * | GetNthTargetCommand (int idx) |
| virtual const char * | GetNthLabel (int idx) |
| virtual vtkObject * | GetDefaultTargetObject () |
| virtual void | SetDefaultTargetObject (vtkObject *object) |
| virtual char * | GetDefaultTargetCommand () |
| virtual void | SetDefaultTargetCommand (const char *) |
| virtual void | RestoreFilesListFromRegistry () |
| virtual void | SaveFilesToRegistry () |
| virtual void | RestoreFilesListFromRegistry (const char *reg_key, int max_nb) |
| virtual void | SaveFilesToRegistry (const char *reg_key, int max_nb) |
| virtual char * | GetRegistryKey () |
| virtual void | SetRegistryKey (const char *) |
| virtual int | GetMaximumNumberOfFilesInRegistry () |
| virtual void | SetMaximumNumberOfFilesInRegistry (int) |
| virtual int | GetMaximumNumberOfFilesInMenu () |
| virtual void | SetMaximumNumberOfFilesInMenu (int) |
| virtual void | SetLabelVisibilityInMenu (int) |
| virtual void | LabelVisibilityInMenuOn () |
| virtual void | LabelVisibilityInMenuOff () |
| virtual int | GetLabelVisibilityInMenu () |
| virtual void | SetBaseNameVisibilityInMenu (int) |
| virtual void | BaseNameVisibilityInMenuOn () |
| virtual void | BaseNameVisibilityInMenuOff () |
| virtual int | GetBaseNameVisibilityInMenu () |
| virtual void | SetSeparatePathInMenu (int) |
| virtual void | SeparatePathInMenuOn () |
| virtual void | SeparatePathInMenuOff () |
| virtual int | GetSeparatePathInMenu () |
| virtual void | AddFileInternal (const char *filename, vtkObject *target_object=NULL, const char *target_command=NULL, const char *label=NULL) |
a "most recent files" manager.
This class is basically a manager that acts as a container for a set of most recent files. It provides methods to manipulate them, load/save them from/to the registry, and display them as entries in a menu. An instance of this class is created in vtkKWWindowBase
Definition at line 43 of file vtkKWMostRecentFilesManager.h.
Reimplemented from vtkKWObject.
Definition at line 48 of file vtkKWMostRecentFilesManager.h.
| anonymous enum |
Event list BTX
Definition at line 177 of file vtkKWMostRecentFilesManager.h.
| vtkKWMostRecentFilesManager::vtkKWMostRecentFilesManager | ( | ) | [protected] |
| vtkKWMostRecentFilesManager::~vtkKWMostRecentFilesManager | ( | ) | [protected] |
| static vtkKWMostRecentFilesManager* vtkKWMostRecentFilesManager::New | ( | ) | [static] |
Reimplemented from vtkKWObject.
| virtual const char* vtkKWMostRecentFilesManager::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkKWObject.
| static int vtkKWMostRecentFilesManager::IsTypeOf | ( | const char * | type | ) | [static] |
Reimplemented from vtkKWObject.
| virtual int vtkKWMostRecentFilesManager::IsA | ( | const char * | type | ) | [virtual] |
Reimplemented from vtkKWObject.
| static vtkKWMostRecentFilesManager* vtkKWMostRecentFilesManager::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkKWObject.
| void vtkKWMostRecentFilesManager::PrintSelf | ( | ostream & | os, | |
| vtkIndent | indent | |||
| ) | [virtual] |
Reimplemented from vtkKWObject.
| virtual void vtkKWMostRecentFilesManager::AddFile | ( | const char * | filename, | |
| vtkObject * | target_object = NULL, |
|||
| const char * | target_command = NULL, |
|||
| const char * | label = NULL | |||
| ) | [virtual] |
Add a most recent file to the list. Each most recent file is associated to a target object and a target command: when a most recent file is invoked (either programmatically or using the most recent files menu), the associated target commmand is invoked on the associated target object. If one and/or the other was not specified when the most recent file was added, the default target object and/or default target command are used. An optional label can be specified too. This label will be used in the menu if LabelVisibilityInMenu is true. The entry is always added at the beginning of the list (thus, becoming the most recently used).
| virtual int vtkKWMostRecentFilesManager::GetNumberOfFiles | ( | ) | [virtual] |
Query the files
| virtual const char* vtkKWMostRecentFilesManager::GetNthFileName | ( | int | idx | ) | [virtual] |
Event list BTX
| virtual vtkObject* vtkKWMostRecentFilesManager::GetNthTargetObject | ( | int | idx | ) | [virtual] |
Event list BTX
| virtual const char* vtkKWMostRecentFilesManager::GetNthTargetCommand | ( | int | idx | ) | [virtual] |
Event list BTX
| virtual const char* vtkKWMostRecentFilesManager::GetNthLabel | ( | int | idx | ) | [virtual] |
Event list BTX
| virtual vtkObject* vtkKWMostRecentFilesManager::GetDefaultTargetObject | ( | ) | [virtual] |
Set/Get the default target object and command. Each most recent file is associated to a target object and a target command: when a most recent file is invoked (either programmatically or using the most recent files menu), the associated target commmand is invoked on the associated target object. If one and/or the other was not specified when the most recent file was added, the default target object and default target command are used.
| virtual void vtkKWMostRecentFilesManager::SetDefaultTargetObject | ( | vtkObject * | object | ) | [virtual] |
Event list BTX
| virtual char* vtkKWMostRecentFilesManager::GetDefaultTargetCommand | ( | ) | [virtual] |
Event list BTX
| virtual void vtkKWMostRecentFilesManager::SetDefaultTargetCommand | ( | const char * | ) | [virtual] |
Event list BTX
| virtual void vtkKWMostRecentFilesManager::RestoreFilesListFromRegistry | ( | ) | [virtual] |
Load/Save up to 'max_nb' most recent files from/to the registry under the application's 'reg_key' key. The parameter-less methods use RegistryKey as 'reg_key' and MaximumNumberOfFilesInRegistry as 'max_nb'. Only the filename and target command are saved. When entries are loaded make sure DefaultTargetObject is set to a valid object.
| virtual void vtkKWMostRecentFilesManager::SaveFilesToRegistry | ( | ) | [virtual] |
Event list BTX
| virtual void vtkKWMostRecentFilesManager::RestoreFilesListFromRegistry | ( | const char * | reg_key, | |
| int | max_nb | |||
| ) | [virtual] |
Event list BTX
| virtual void vtkKWMostRecentFilesManager::SaveFilesToRegistry | ( | const char * | reg_key, | |
| int | max_nb | |||
| ) | [virtual] |
Event list BTX
| virtual char* vtkKWMostRecentFilesManager::GetRegistryKey | ( | ) | [virtual] |
Set/Get the default registry key the most recent files are saved to or loaded from when it is not specified explicitly while calling load/save.
| virtual void vtkKWMostRecentFilesManager::SetRegistryKey | ( | const char * | ) | [virtual] |
Event list BTX
| virtual int vtkKWMostRecentFilesManager::GetMaximumNumberOfFilesInRegistry | ( | ) | [virtual] |
Set/Get the default maximum number of recent files in the registry when this number is not specified explicitly while calling load/save.
| virtual void vtkKWMostRecentFilesManager::SetMaximumNumberOfFilesInRegistry | ( | int | ) | [virtual] |
Event list BTX
| vtkKWMenu* vtkKWMostRecentFilesManager::GetMenu | ( | ) |
Get a most recent files menu object. This menu is updated automatically as entries are added and removed, up to MaximumNumberOfFilesInMenu entries. It is up to the caller to set its parent, and it should be done as soon as possible if there is a need to use this menu.
| virtual int vtkKWMostRecentFilesManager::GetMaximumNumberOfFilesInMenu | ( | ) | [virtual] |
Set/Get the maximum number of recent files in the internal most recent files menu object (see GetMenu()).
| virtual void vtkKWMostRecentFilesManager::SetMaximumNumberOfFilesInMenu | ( | int | ) | [virtual] |
Event list BTX
| virtual void vtkKWMostRecentFilesManager::SetFileLabel | ( | const char * | filename, | |
| const char * | label | |||
| ) | [virtual] |
Set a label for a specific file entry. This label will be used in the menu if LabelVisibilityInMenu is true.
| virtual void vtkKWMostRecentFilesManager::SetLabelVisibilityInMenu | ( | int | ) | [virtual] |
Set/Get the label visibility in menu (Off by default).
| virtual void vtkKWMostRecentFilesManager::LabelVisibilityInMenuOn | ( | ) | [virtual] |
Event list BTX
| virtual void vtkKWMostRecentFilesManager::LabelVisibilityInMenuOff | ( | ) | [virtual] |
Event list BTX
| virtual int vtkKWMostRecentFilesManager::GetLabelVisibilityInMenu | ( | ) | [virtual] |
Event list BTX
| virtual void vtkKWMostRecentFilesManager::SetBaseNameVisibilityInMenu | ( | int | ) | [virtual] |
Set/Get the basename visibility in menu (On by default). (i.e., instead of "d:/temp/foo.raw", display "d:/temp") This setting is ignored per entry if no label is found for that specific menu entry (in which case only a directory would be displayed, which makes poor sense).
| virtual void vtkKWMostRecentFilesManager::BaseNameVisibilityInMenuOn | ( | ) | [virtual] |
Event list BTX
| virtual void vtkKWMostRecentFilesManager::BaseNameVisibilityInMenuOff | ( | ) | [virtual] |
Event list BTX
| virtual int vtkKWMostRecentFilesManager::GetBaseNameVisibilityInMenu | ( | ) | [virtual] |
Event list BTX
| virtual void vtkKWMostRecentFilesManager::SetSeparatePathInMenu | ( | int | ) | [virtual] |
Separate path from basename in menu (Off by default). (i.e., instead of "d:/temp/foo.raw", display "foo.raw in d:/temp")
| virtual void vtkKWMostRecentFilesManager::SeparatePathInMenuOn | ( | ) | [virtual] |
Event list BTX
| virtual void vtkKWMostRecentFilesManager::SeparatePathInMenuOff | ( | ) | [virtual] |
Event list BTX
| virtual int vtkKWMostRecentFilesManager::GetSeparatePathInMenu | ( | ) | [virtual] |
Event list BTX
| virtual void vtkKWMostRecentFilesManager::UpdateMenuStateInParent | ( | ) | [virtual] |
Disable/Enable the most recent files menu if it is a cascade in its parent. If the menu is empty, it will be disabled.
| virtual void vtkKWMostRecentFilesManager::PopulateMenu | ( | vtkKWMenu * | , | |
| int | max_nb | |||
| ) | [virtual] |
Populate a given menu with up to 'max_nb' most recent files entries. You do not need to call this method on GetMenu(), the internal menu is updated automatically.
| virtual void vtkKWMostRecentFilesManager::AddFileInternal | ( | const char * | filename, | |
| vtkObject * | target_object = NULL, |
|||
| const char * | target_command = NULL, |
|||
| const char * | label = NULL | |||
| ) | [protected, virtual] |
Add a most recent file to the list (internal, do not update the menu or save to the registry).
| virtual void vtkKWMostRecentFilesManager::UpdateMenu | ( | ) | [protected, virtual] |
Update the most recent files menu
friend class vtkKWMostRecentFilesManagerInternals [friend] |
Definition at line 204 of file vtkKWMostRecentFilesManager.h.
char* vtkKWMostRecentFilesManager::DefaultTargetCommand [protected] |
Definition at line 190 of file vtkKWMostRecentFilesManager.h.
Definition at line 191 of file vtkKWMostRecentFilesManager.h.
char* vtkKWMostRecentFilesManager::RegistryKey [protected] |
Definition at line 192 of file vtkKWMostRecentFilesManager.h.
int vtkKWMostRecentFilesManager::MaximumNumberOfFilesInRegistry [protected] |
Definition at line 193 of file vtkKWMostRecentFilesManager.h.
int vtkKWMostRecentFilesManager::MaximumNumberOfFilesInMenu [protected] |
Definition at line 194 of file vtkKWMostRecentFilesManager.h.
int vtkKWMostRecentFilesManager::LabelVisibilityInMenu [protected] |
Definition at line 195 of file vtkKWMostRecentFilesManager.h.
int vtkKWMostRecentFilesManager::BaseNameVisibilityInMenu [protected] |
Definition at line 196 of file vtkKWMostRecentFilesManager.h.
int vtkKWMostRecentFilesManager::SeparatePathInMenu [protected] |
Definition at line 197 of file vtkKWMostRecentFilesManager.h.
vtkKWMostRecentFilesManagerInternals* vtkKWMostRecentFilesManager::Internals [protected] |
Definition at line 203 of file vtkKWMostRecentFilesManager.h.
1.6.1