VkFileSelectionDialog(3x)VkFileSelectionDialog(3x)NAMEVkFileSelectionDialog - Dialog manager for file selection dialogs
INHERITS FROM
VkDialogManager : VkComponent : VkCallbackObject
HEADER FILE
#include <Vk/VkFileSelectionDialog.h>
PUBLIC PROTOCOL SUMMARY
Constructor/Destructor
VkFileSelectionDialog(const char* name);
virtual void ~VkFileSelectionDialog(void);
Access Functions
const char* fileName(void);
Controlling the Dialog
void setDirectory(const char* directory);
void setFilterPattern(const char* pattern);
PROTECTED PROTOCOL SUMMARY
Access functions
XmFileSelectionBoxCallbackStruct* callData(void);
CLASS DESCRIPTION
This class displays a Motif file selection dialog using the caching
facilities of the VkDialogManager class. Applications can use the
global dialog theFileSelectionDialog to prompt users for file names.
FUNCTION DESCRIPTIONScallData()
XmFileSelectionBoxCallbackStruct* callData(void);
Returns the file selection dialog's callData structure. This
structure is filled in by the file selection dialog with every
callback.
VkFileSelectionDialog()
VkFileSelectionDialog(const char* name);
Initializes a VkFileSelectionDialog object.
Page 1
VkFileSelectionDialog(3x)VkFileSelectionDialog(3x)
~VkFileSelectionDialog()
virtual void ~VkFileSelectionDialog(void);
Frees storage associated with the a VkFileSelectionDialog. The
global file selection dialog theFileSelectionDialog should not be
freed.
char*()
const char* fileName(void);
Returns the filename selected by the user. This string should not
be freed by the application.
setDirectory()
void setDirectory(const char* directory);
Sets current directory of the dialog.
setFilterPattern()
void setFilterPattern(const char* pattern);
Sets the filter pattern used by the dialog to determine which
filenames are displayed in the list box.
EXAMPLE
#include <iostream.h>
#include <Vk/VkFileSelectionDialog.h>
// ...
theFileSelectionDialog->setDirectory("/usr/tmp");
if(theFileSelectionDialog->postAndWait( )
== VkDialogManager::OK)
cout << "File name "
<< theFileSelectionDialog->fileName()
<< '0 << flush;
INHERITED MEMBER FUNCTIONS
Inherited from VkDialogManager
show(), hide(), prepost(),
setTitle(), setButtonLabels(), unpost(), unpostAll(),
centerOnScreen(), lastPosted(), post(), postModal(), postBlocked(),
postAndWait(), _action, _showOK, _showCancel, _showApply,
_allowMultipleDialogs, _minimizeMultipleDialogs, prepostCallback
Page 2
VkFileSelectionDialog(3x)VkFileSelectionDialog(3x)
Inherited from VkComponent
installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
setDefaultResources(), getResources(), callCallbacks(),
VkComponent(), manage(), unmanage(), baseWidget(), okToQuit(),
_name, _baseWidget, _w, deleteCallback
Inherited from VkCallbackObject
callCallbacks(), addCallback(), removeCallback(),
removeAllCallbacks()VIEWKIT 2.1 CHANGES
In multi-screen enabled applications or components, references to
theFileSelectionDialog will only be valid for the default screen in the
application. The following new function API will return the
VkFileSelectionDialog associated with the appropriate screen and should
be used instead of theFileSelectionDialog;
VkFileSelectionDialog *getAppFileSelectionDialog(VkComponent *comp);
SEE ALSOSgFileSelectionBox(3X), XmFileSelectionBox(3X)
VkDialogManager, VkComponent
ViewKit Programmer's Guide
The X Window System, DEC Press, Bob Sheifler and Jim Gettys
The X Window System Toolkit, DEC Press, Paul Asente and Ralph Swick
The OSF/Motif Programmers Reference, Prentice Hall, OSF
Page 3