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

vtkKWMostRecentFilesManager Class Reference

a "most recent files" manager. More...

#include <vtkKWMostRecentFilesManager.h>

Inheritance diagram for vtkKWMostRecentFilesManager:

Inheritance graph
[legend]
Collaboration diagram for vtkKWMostRecentFilesManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkKWMostRecentFilesManager, vtkKWObject)
void PrintSelf (ostream &os, vtkIndent indent)
vtkKWMenuGetMenu ()
virtual void UpdateMenuStateInParent ()
virtual void PopulateMenu (vtkKWMenu *, int max_nb)
virtual void AddFile (const char *filename, vtkObject *target_object=NULL, const char *target_command=NULL)
virtual vtkObject * GetDefaultTargetObject ()
virtual void SetDefaultTargetObject (vtkObject *)
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)

Static Public Member Functions

vtkKWMostRecentFilesManagerNew ()

Protected Member Functions

 vtkKWMostRecentFilesManager ()
 ~vtkKWMostRecentFilesManager ()
virtual void UpdateMenu ()
virtual void AddFileInternal (const char *filename, vtkObject *target_object=NULL, const char *target_command=NULL)

Protected Attributes

char * DefaultTargetCommand
vtkObject * DefaultTargetObject
char * RegistryKey
int MaximumNumberOfFilesInRegistry
int MaximumNumberOfFilesInMenu
vtkKWMostRecentFilesManagerInternals * Internals

Friends

class vtkKWMostRecentFilesManagerInternals

Detailed Description

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

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:
vtkKWWindowBase

Definition at line 40 of file vtkKWMostRecentFilesManager.h.


Constructor & Destructor Documentation

vtkKWMostRecentFilesManager::vtkKWMostRecentFilesManager  )  [protected]
 

vtkKWMostRecentFilesManager::~vtkKWMostRecentFilesManager  )  [protected]
 


Member Function Documentation

vtkKWMostRecentFilesManager* vtkKWMostRecentFilesManager::New  )  [static]
 

Reimplemented from vtkKWObject.

vtkKWMostRecentFilesManager::vtkTypeRevisionMacro vtkKWMostRecentFilesManager  ,
vtkKWObject 
 

void vtkKWMostRecentFilesManager::PrintSelf ostream &  os,
vtkIndent  indent
 

Reimplemented from vtkKWObject.

virtual void vtkKWMostRecentFilesManager::AddFile const char *  filename,
vtkObject *  target_object = NULL,
const char *  target_command = 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.

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 *   )  [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 char* vtkKWMostRecentFilesManager::GetDefaultTargetCommand  )  [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::SetDefaultTargetCommand const char *   )  [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::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 DefaultRegistryKey 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]
 

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 DefaultRegistryKey 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::RestoreFilesListFromRegistry const char *  reg_key,
int  max_nb
[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 DefaultRegistryKey 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 const char *  reg_key,
int  max_nb
[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 DefaultRegistryKey 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 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]
 

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 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]
 

Set/Get the default maximum number of recent files in the registry when this number is not specified explicitly while calling load/save.

vtkKWMenu* vtkKWMostRecentFilesManager::GetMenu  ) 
 

Get a convenience 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]
 

Set/Get the maximum number of recent files in the internal most recent files menu object (see GetMenu()).

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]
 

Convenience method to 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
[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


Friends And Related Function Documentation

friend class vtkKWMostRecentFilesManagerInternals [friend]
 

Definition at line 143 of file vtkKWMostRecentFilesManager.h.


Member Data Documentation

char* vtkKWMostRecentFilesManager::DefaultTargetCommand [protected]
 

Definition at line 132 of file vtkKWMostRecentFilesManager.h.

vtkObject* vtkKWMostRecentFilesManager::DefaultTargetObject [protected]
 

Definition at line 133 of file vtkKWMostRecentFilesManager.h.

char* vtkKWMostRecentFilesManager::RegistryKey [protected]
 

Definition at line 134 of file vtkKWMostRecentFilesManager.h.

int vtkKWMostRecentFilesManager::MaximumNumberOfFilesInRegistry [protected]
 

Definition at line 135 of file vtkKWMostRecentFilesManager.h.

int vtkKWMostRecentFilesManager::MaximumNumberOfFilesInMenu [protected]
 

Definition at line 136 of file vtkKWMostRecentFilesManager.h.

vtkKWMostRecentFilesManagerInternals* vtkKWMostRecentFilesManager::Internals [protected]
 

Definition at line 142 of file vtkKWMostRecentFilesManager.h.


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