vtkKWFileBrowserDialog Class Reference

dialog for browsing and selecting files or directories. More...

#include <vtkKWFileBrowserDialog.h>

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

List of all members.

Public Types

typedef vtkKWDialog Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetFileName (const char *)
void SetInitialSelectedFileNames (vtkStringArray *filenames)
virtual const char * GetCurrentFileExtensions ()
const char * GenerateLastPath (const char *path)
virtual void OK ()
virtual void Cancel ()
virtual void FileTypeChangedCallback (const char *filetype)
virtual void FileNameEditingCallback (const char *filename)

Static Public Member Functions

static vtkKWFileBrowserDialogNew ()
static int IsTypeOf (const char *type)
static vtkKWFileBrowserDialogSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkKWFileBrowserDialog ()
 ~vtkKWFileBrowserDialog ()
virtual void CreateWidget ()
virtual void CreatePreviewFrame ()
virtual void PopulateFileTypes ()
virtual void Update ()
virtual void UpdateEnableState ()
virtual void Display ()
virtual int ConfirmOverwrite (const char *filename)
virtual void InvokeFileNameChangedCommand (const char *)
virtual int SetupInitialSelectedFiles ()
virtual int OpenMultipleFileNames (const char *inputnames)

Protected Attributes

vtkKWFileBrowserDialogInternals * Internals
int PreviewFrameVisibility
int SaveDialog
int ChooseDirectory
vtkStringArrayFileNames
vtkStringArrayInitialSelecttedFileNames
char * FileNameChangedCommand



enum  { FileNameChangedEvent = 15000 }
vtkKWFileBrowserWidgetFileBrowserWidget
vtkKWFrameBottomFrame
vtkKWLabelFileNameLabel
vtkKWLabelFileTypesLabel
vtkKWEntryFileNameText
vtkKWComboBoxFileTypesBox
vtkKWPushButtonOKButton
vtkKWPushButtonCancelButton
vtkKWFramePreviewFrame
char * FileTypes
char * DefaultExtension
virtual char * GetFileName ()
int GetNumberOfFileNames ()
const char * GetNthFileName (int i)
virtual vtkStringArrayGetFileNames ()
virtual void SetInitialFileName (const char *)
virtual char * GetInitialFileName ()
virtual void SetFileTypes (const char *)
virtual char * GetFileTypes ()
virtual void SetDefaultExtension (const char *)
virtual char * GetDefaultExtension ()
virtual void SetSaveDialog (int)
virtual void SaveDialogOn ()
virtual void SaveDialogOff ()
virtual int GetSaveDialog ()
virtual void SetChooseDirectory (int)
virtual void ChooseDirectoryOn ()
virtual void ChooseDirectoryOff ()
virtual int GetChooseDirectory ()
virtual int GetMultipleSelection ()
virtual void SetMultipleSelection (int)
virtual void MultipleSelectionOn ()
virtual void MultipleSelectionOff ()
virtual char * GetLastPath ()
virtual void SetLastPath (const char *)
virtual vtkKWFileBrowserWidgetGetFileBrowserWidget ()
virtual vtkKWFrameGetPreviewFrame ()
virtual void SetPreviewFrameVisibility (int)
virtual void PreviewFrameVisibilityOn ()
virtual void PreviewFrameVisibilityOff ()
virtual int GetPreviewFrameVisibility ()
virtual void SaveGeometryToRegistry ()
virtual void RestoreGeometryFromRegistry ()
virtual void SaveLastPathToRegistry (const char *key)
virtual void RetrieveLastPathFromRegistry (const char *key)
virtual void SetFileNameChangedCommand (vtkObject *object, const char *method)
virtual void AddCallbackCommandObservers ()
virtual void RemoveCallbackCommandObservers ()
virtual int FileOK ()
virtual int DirectoryOK ()
virtual void ProcessCallbackCommandEvents (vtkObject *caller, unsigned long event, void *calldata)
virtual void ProcessDirectorySelectedEvent (const char *fullname)
virtual void ProcessFileSelectionChangedEvent (const char *fullname)
virtual void ProcessFileDoubleClickedEvent (const char *fullname)

Detailed Description

dialog for browsing and selecting files or directories.

It includes a Favorite Directories Places Bar, a Directory Explorer, a Multi-colomn list to list files, and some toolbar buttons to perform some related tasks on these components.

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:
vtkKWFileBrowserWidget vtkKWDiretoryExplorer vtkKWFileListTable vtkKWFavoriteDirectoriesFrame
Events:
vtkKWFileBrowserDialog::FileNameChangedEvent

Definition at line 49 of file vtkKWFileBrowserDialog.h.


Member Typedef Documentation

Reimplemented from vtkKWDialog.

Reimplemented in vtkKWLoadSaveDialog, and vtkKWSaveImageDialog.

Definition at line 54 of file vtkKWFileBrowserDialog.h.


Member Enumeration Documentation

anonymous enum

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

Enumerator:
FileNameChangedEvent 

Definition at line 196 of file vtkKWFileBrowserDialog.h.


Constructor & Destructor Documentation

vtkKWFileBrowserDialog::vtkKWFileBrowserDialog (  )  [protected]
vtkKWFileBrowserDialog::~vtkKWFileBrowserDialog (  )  [protected]

Member Function Documentation

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

Reimplemented from vtkKWDialog.

Reimplemented in vtkKWLoadSaveDialog, and vtkKWSaveImageDialog.

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

Reimplemented from vtkKWDialog.

Reimplemented in vtkKWLoadSaveDialog, and vtkKWSaveImageDialog.

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

Reimplemented from vtkKWDialog.

Reimplemented in vtkKWLoadSaveDialog, and vtkKWSaveImageDialog.

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

Reimplemented from vtkKWDialog.

Reimplemented in vtkKWLoadSaveDialog, and vtkKWSaveImageDialog.

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

Reimplemented from vtkKWDialog.

Reimplemented in vtkKWLoadSaveDialog, and vtkKWSaveImageDialog.

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

Reimplemented from vtkKWDialog.

Reimplemented in vtkKWLoadSaveDialog, and vtkKWSaveImageDialog.

virtual char* vtkKWFileBrowserDialog::GetFileName (  )  [virtual]

Get the file path(s) the user selected. Note that if the dialog was cancelled, the FileName is set to NULL, reflecting that the user did not select anything (i.e., the previous selection is *not* kept). If MultipleSelection is On, the above methods can also be used retrieve all the file (or directory) names that were selected.

int vtkKWFileBrowserDialog::GetNumberOfFileNames (  ) 

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

const char* vtkKWFileBrowserDialog::GetNthFileName ( int  i  ) 

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual vtkStringArray* vtkKWFileBrowserDialog::GetFileNames (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::SetFileName ( const char *   )  [virtual]

Set the file path that will be returned when calling GetFileName(). This method will reset FileNames array if FileNames[0] is different from the FileName. It will also reset the InitialFileName and LastPath if they are not set already. The idea is that user can just use this ONE method to initialize the dialog before invoke.

void vtkKWFileBrowserDialog::SetInitialSelectedFileNames ( vtkStringArray filenames  ) 

This function will take an array of file names (full names with path), and has to be called before calling Invoke(). Also, MultipleSelection has to be set to ON to select multiples before calling this function. In case of file browser, open the directory of the first file, then if the SelectionMode is MultipleSelection, select the files in the array if they are in the opened directory, otherwise ignored; if it is in the SingleSelectionMode, only the first file will be selected. In case of ChooseDirectoryOn, select all directories in the array for Multiple selection mode; select the first in Single selection mode. Note: in file browser case, this function will ignore FileTypes and LastPath.

virtual void vtkKWFileBrowserDialog::SetInitialFileName ( const char *   )  [virtual]

Set/Get a filename to be displayed in the dialog when it pops up.

virtual char* vtkKWFileBrowserDialog::GetInitialFileName (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::SetFileTypes ( const char *   )  [virtual]

Set/Get the file types the dialog will open or save. Should be in TK format. Example: "{{Text Document} {.txt}} {{JPEG image} {.jpg .jpeg}}"

virtual char* vtkKWFileBrowserDialog::GetFileTypes (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual const char* vtkKWFileBrowserDialog::GetCurrentFileExtensions (  )  [virtual]

Get current file extensions that is selected from the FileType dropdown box. If multiple extensions are available (for example: {{JPEG image} {.jpg .jpeg}}), the extensions will be returned as a space-separated string (e.g. ".jpg .jpeg"). NOTE: By default, the current file extension is set to ".*", and NULL will returned.

virtual void vtkKWFileBrowserDialog::SetDefaultExtension ( const char *   )  [virtual]

Set/Get the default file extension.

virtual char* vtkKWFileBrowserDialog::GetDefaultExtension (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::SetSaveDialog ( int   )  [virtual]

Set/Get if the dialog should be a "save file" dialog, or a "load file" dialog.

virtual void vtkKWFileBrowserDialog::SaveDialogOn (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::SaveDialogOff (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual int vtkKWFileBrowserDialog::GetSaveDialog (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::SetChooseDirectory ( int   )  [virtual]

Set/Get if the dialog should ask the user to pick a directory, or a file.

virtual void vtkKWFileBrowserDialog::ChooseDirectoryOn (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::ChooseDirectoryOff (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual int vtkKWFileBrowserDialog::GetChooseDirectory (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual int vtkKWFileBrowserDialog::GetMultipleSelection (  )  [virtual]

Set/Get if multiple selection are allowed.

virtual void vtkKWFileBrowserDialog::SetMultipleSelection ( int   )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::MultipleSelectionOn (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::MultipleSelectionOff (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual char* vtkKWFileBrowserDialog::GetLastPath (  )  [virtual]

Set/Get the last path.

virtual void vtkKWFileBrowserDialog::SetLastPath ( const char *   )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

const char* vtkKWFileBrowserDialog::GenerateLastPath ( const char *  path  ) 

Update the LastPath from a full path to a file.

virtual vtkKWFileBrowserWidget* vtkKWFileBrowserDialog::GetFileBrowserWidget (  )  [virtual]

Accessor for the file browser widget object.

virtual vtkKWFrame* vtkKWFileBrowserDialog::GetPreviewFrame (  )  [virtual]

Accessor for the preview frame, i.e. the frame where people can pack their own widgets (say preview images or files, etc.).

virtual void vtkKWFileBrowserDialog::SetPreviewFrameVisibility ( int   )  [virtual]

Set/Get the visibility of the preview frame

virtual void vtkKWFileBrowserDialog::PreviewFrameVisibilityOn (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::PreviewFrameVisibilityOff (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual int vtkKWFileBrowserDialog::GetPreviewFrameVisibility (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::SaveGeometryToRegistry (  )  [virtual]

Save/retrieve the last geometry to/from the registry.

virtual void vtkKWFileBrowserDialog::RestoreGeometryFromRegistry (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::SaveLastPathToRegistry ( const char *  key  )  [virtual]

Save/retrieve the last path to/from the registry. Note that the subkey used here is "RunTime".

virtual void vtkKWFileBrowserDialog::RetrieveLastPathFromRegistry ( const char *  key  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::SetFileNameChangedCommand ( vtkObject object,
const char *  method 
) [virtual]

Specifies a command to associate with the widget. This command is typically invoked when the a file has been 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: - filename (first selected): const char* (warning: NULL is passed as empty string)

virtual void vtkKWFileBrowserDialog::OK (  )  [virtual]

Callback. Confirm the action and close this dialog

Reimplemented from vtkKWDialog.

virtual void vtkKWFileBrowserDialog::Cancel (  )  [virtual]

Callback. Cancel the action and close this dialog

Reimplemented from vtkKWDialog.

virtual void vtkKWFileBrowserDialog::FileTypeChangedCallback ( const char *  filetype  )  [virtual]

Callback. A file type is selected in the File dropdown box.

virtual void vtkKWFileBrowserDialog::FileNameEditingCallback ( const char *  filename  )  [virtual]

Callback when user starts editing this entry box.

virtual void vtkKWFileBrowserDialog::AddCallbackCommandObservers (  )  [virtual]

Add all the default observers needed by that object, or remove all the observers that were added through AddCallbackCommandObserver. Subclasses can override these methods to add/remove their own default observers, but should call the superclass too.

Reimplemented from vtkKWObject.

virtual void vtkKWFileBrowserDialog::RemoveCallbackCommandObservers (  )  [virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

Reimplemented from vtkKWObject.

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

Create the widget.

Reimplemented from vtkKWDialog.

Reimplemented in vtkKWSaveImageDialog.

virtual void vtkKWFileBrowserDialog::CreatePreviewFrame (  )  [protected, virtual]

Create (and pack) preview frame.

virtual void vtkKWFileBrowserDialog::PopulateFileTypes (  )  [protected, virtual]

Fill in file types in TK format. Default is: "{{Text Document} {.txt}}"

virtual void vtkKWFileBrowserDialog::Update (  )  [protected, virtual]

Update the components of the dialog.

virtual void vtkKWFileBrowserDialog::UpdateEnableState (  )  [protected, 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 vtkKWTopLevel.

virtual void vtkKWFileBrowserDialog::Display (  )  [protected, virtual]

Display the dialog.

Reimplemented from vtkKWDialog.

virtual int vtkKWFileBrowserDialog::ConfirmOverwrite ( const char *  filename  )  [protected, virtual]

Prompt user for confirmation of overwriting file Return 1, confirmed; 0 otherwise

virtual int vtkKWFileBrowserDialog::FileOK (  )  [protected, virtual]

Final step on the selected files or directories

virtual int vtkKWFileBrowserDialog::DirectoryOK (  )  [protected, virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::InvokeFileNameChangedCommand ( const char *   )  [protected, virtual]
virtual int vtkKWFileBrowserDialog::SetupInitialSelectedFiles (  )  [protected, virtual]

Set up initial selected files if they are set. Return 1 on success, 0 on failure.

virtual void vtkKWFileBrowserDialog::ProcessCallbackCommandEvents ( vtkObject caller,
unsigned long  event,
void *  calldata 
) [protected, virtual]

Processes the events that are passed through CallbackCommand (or others). Subclasses can override this method to process their own events, but should call the superclass too.

Reimplemented from vtkKWObject.

virtual void vtkKWFileBrowserDialog::ProcessDirectorySelectedEvent ( const char *  fullname  )  [protected, virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::ProcessFileSelectionChangedEvent ( const char *  fullname  )  [protected, virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual void vtkKWFileBrowserDialog::ProcessFileDoubleClickedEvent ( const char *  fullname  )  [protected, virtual]

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

virtual int vtkKWFileBrowserDialog::OpenMultipleFileNames ( const char *  inputnames  )  [protected, virtual]

Check to see if the filename box input has multiple filenames. Return 1 on success, 0 on failure.


Member Data Documentation

vtkKWFileBrowserDialogInternals* vtkKWFileBrowserDialog::Internals [protected]

Internal PIMPL class for STL purposes.

Reimplemented from vtkKWCoreWidget.

Definition at line 265 of file vtkKWFileBrowserDialog.h.

GUI

Definition at line 269 of file vtkKWFileBrowserDialog.h.

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

Definition at line 270 of file vtkKWFileBrowserDialog.h.

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

Definition at line 271 of file vtkKWFileBrowserDialog.h.

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

Definition at line 272 of file vtkKWFileBrowserDialog.h.

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

Definition at line 273 of file vtkKWFileBrowserDialog.h.

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

Definition at line 274 of file vtkKWFileBrowserDialog.h.

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

Definition at line 275 of file vtkKWFileBrowserDialog.h.

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

Definition at line 276 of file vtkKWFileBrowserDialog.h.

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

Definition at line 277 of file vtkKWFileBrowserDialog.h.

Member variables.

Definition at line 282 of file vtkKWFileBrowserDialog.h.

Events. The FileNameChangedEvent is triggered when the FileName variable is changed. The following parameters are also passed as client data: - current filename: const char* BTX

Definition at line 283 of file vtkKWFileBrowserDialog.h.

Definition at line 286 of file vtkKWFileBrowserDialog.h.

Definition at line 287 of file vtkKWFileBrowserDialog.h.

Definition at line 288 of file vtkKWFileBrowserDialog.h.

Definition at line 290 of file vtkKWFileBrowserDialog.h.

Definition at line 291 of file vtkKWFileBrowserDialog.h.

Definition at line 293 of file vtkKWFileBrowserDialog.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:34:31 2010 for KWWidgets by  doxygen 1.6.1