Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_FileSystemDialogs_Base Class Reference

Base class for a group of dialogs for dealing with the platforms file system dialogs / navigation services.

Inheritance diagram for CP_FileSystemDialogs_Base:

CP_AskRevertDialog CP_AskSaveChangesDialog CP_FileSystemDialogs_Reply CP_AskReviewDialog CP_GetDirectoryDialog CP_GetFileDialog CP_PutFileDialog List of all members.

Dialog handlers

virtual NavDialogRef CreateDialog (NavDialogCreationOptions &inOptions, NavEventUPP inEventUPP, void *inUserData)=0
virtual void HandleEvent (NavEventCallbackMessage inSelector, NavCBRec &ioParams)
virtual void HandleNavUserAction (NavUserAction inUserAction)
virtual void RunPlatformDialog ()
CP_E_NavDialogResult GetNavDialogResult (NavUserAction inUserAction)

Public Member Functions

Constructor / Destructor
 CP_FileSystemDialogs_Base ()
 Constructor.
virtual ~CP_FileSystemDialogs_Base () throw ()
 Destructor.

Protected Member Functions

Dialog handlers
virtual void RunPlatformDialog ()
Dialog handlers
virtual void RunPlatformDialog ()

Protected Attributes

CP_FileSelectionCallbackfSelectionCallback
CP_SaveChangesCallbackfSaveChangesCallback
CP_SaveChangesCallbackfRevertCallback
CP_SaveChangesCallbackfDontSaveChangesCallback
CP_SaveChangesCallbackfCancelCallback
NavDialogRef fNavDialog
bool fDialogIsRunning
NavDialogCreationOptions fNavDialogOptions

Private Member Functions

Cleanup
void PlatformCleanUp ()
Cleanup
void PlatformCleanUp ()
Cleanup
void PlatformCleanUp ()

Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_FileSystemDialogs_Base::CP_FileSystemDialogs_Base  ) 
 

Constructor.

Exceptions:
none 

CP_FileSystemDialogs_Base::~CP_FileSystemDialogs_Base  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

void CP_FileSystemDialogs_Base::Run  ) 
 

Runs the platforms file system / NavigationServices dialog. This calls the virtual RunPlatformDialog which handles the actual dialog, depending on the dialog and OS being used.

Exceptions:
none 
Returns:
void

void CP_FileSystemDialogs_Base::SetModality WindowModality  inModality,
CP_Window inParent = NULL
 

Sets the modality of the dialog, and optionally specifies a parent window to use in positioning the dialog relative to the passed in window.

Parameters:
inModality The WindowModality of the dialog. It can be one of the following:
  • kCP_E_WindowModalityNone,
  • kCP_E_WindowModalitySystemModal,
  • kCP_E_WindowModalityAppModal,
  • kCP_E_WindowModalityWindowModal
inParent The window, if any, that controls the position of the dialog.
Exceptions:
none 
Returns:
void

void CP_FileSystemDialogs_Base::SetFileSelectionCallback CP_FileSelectionCallback inCallback  ) 
 

Sets the callback when the user makes a file selection.

Parameters:
inCallback The function called upon the selection.
Exceptions:
none 
Returns:
void

void CP_FileSystemDialogs_Base::SetSaveChangesCallback CP_SaveChangesCallback inCallback  ) 
 

Sets the callback when the user chooses to save changes.

Parameters:
inCallback The function called when user chooses to save changes.
Exceptions:
none 
Returns:
void

void CP_FileSystemDialogs_Base::SetRevertCallback CP_SaveChangesCallback inCallback  ) 
 

Sets the callback when the user chooses to revert to last saved file.

Parameters:
inCallback The function called when user chooses to revert.
Exceptions:
none 
Returns:
void

void CP_FileSystemDialogs_Base::SetDontSaveChangesCallback CP_SaveChangesCallback inCallback  ) 
 

Sets the callback when the user chooses not to save changes.

Parameters:
inCallback The function called when user chooses not to save changes.
Exceptions:
none 
Returns:
void

void CP_FileSystemDialogs_Base::SetCancelCallback CP_SaveChangesCallback inCallback  ) 
 

Sets the callback when the user cancels Navigation Services dialog.

Parameters:
inCallback The function called when user cancels Navigation Services dialog.
Exceptions:
none 
Returns:
void

void CP_FileSystemDialogs_Base::SetAppName const CP_String inAppName  ) 
 

Sets the applications name for this dialog, if the underlying OS supports the display of the apps name.

Parameters:
inAppName Name of the application using this dialog.
Exceptions:
none 
Returns:
void

void CP_FileSystemDialogs_Base::SetFileName const CP_String inFileName  ) 
 

Sets the file name for this dialog, if the underlying OS supports the display of the file name. The file name only applies if this dialog is saving a file, and the user is suppling a default file name.

Parameters:
inFileName Name of the file using this dialog.
Exceptions:
none 
Returns:
void

static pascal void CP_FileSystemDialogs_Base::NavEventProc NavEventCallbackMessage  inCallBackSelector,
NavCBRecPtr  inCallBackParms,
void *  inCallBackUD
throw () [static]
 

Options used to control appearance and behavior of Navigation Services dialog.

NavUserAction CP_FileSystemDialogs_Base::GetUserAction  )  const
 

Returns the last user action of the dialog.

Exceptions:
none 
Returns:
NavUserAction The last user action in the dialog.

NavDialogRef CP_FileSystemDialogs_Base::GetNavDialog  ) 
 

Returns the MacOS NavDialogRef for the current Navigation Services dialog.

Exceptions:
none 
Returns:
NavDialogRef The MacOS Navigation Services dialog ref.

NavDialogOptionFlags CP_FileSystemDialogs_Base::GetOptionFlags  ) 
 

Returns the MacOS NavDialogOptionFlags for the current Navigation Services dialog. These are the options that control the appearance and behavior of the dialog.

Exceptions:
none 
Returns:
NavDialogOptionFlags The MacOS Navigation Services NavDialogOptionFlags.

void CP_FileSystemDialogs_Base::SetOptionFlags NavDialogOptionFlags  inFlags  ) 
 

Sets the MacOS NavDialogOptionFlags for the current Navigation Services dialog. These are the options that control the appearance and behavior of the dialog.

Parameters:
inFlags The flags to be used.
Exceptions:
none 
Returns:
NavDialogOptionFlags The MacOS Navigation Services NavDialogOptionFlags.

virtual NavDialogRef CP_FileSystemDialogs_Base::CreateDialog NavDialogCreationOptions &  inOptions,
NavEventUPP  inEventUPP,
void *  inUserData
[protected, pure virtual]
 

Virtual function that each class implements to create the specific dialog to implement the Navigation Services handling of the request.

Parameters:
inOptions NavDialogCreationOptions used to create the dialog.
inEventUPP The event handling UPP.
inUserData Used data passed between this class and the Navigation Services Dialog.
Exceptions:
none 
Returns:
NavDialogOptionFlags The MacOS Navigation Services NavDialogOptionFlags.

Implemented in CP_AskRevertDialog, CP_AskReviewDialog, CP_AskSaveChangesDialog, CP_GetDirectoryDialog, CP_GetFileDialog, and CP_PutFileDialog.

void CP_FileSystemDialogs_Base::HandleEvent NavEventCallbackMessage  inSelector,
NavCBRec &  ioParams
[protected, virtual]
 

Event handler to handle events in the NavigationServices dialogs.

Parameters:
inSelector The event to be handled.
ioParams Parameters passed between the NavigationServices dialog and this class.
Exceptions:
none 
Returns:
void

Reimplemented in CP_FileSystemDialogs_Reply.

void CP_FileSystemDialogs_Base::HandleNavUserAction NavUserAction  inUserAction  )  [protected, virtual]
 

Called when a kNavCBUserAction call is encountered.

Parameters:
inUserAction The user action that needs to be handled.
Exceptions:
none 
Returns:
void

void CP_FileSystemDialogs_Base::RunPlatformDialog  )  [protected, virtual]
 

Runs the platforms file system / NavigationServices dialog. This handles the interaction between the MacOS NavigationServices and the user.

Exceptions:
none 
Returns:
void

Reimplemented in CP_AskRevertDialog, CP_AskSaveChangesDialog, CP_FileSystemDialogs_Reply, CP_GetDirectoryDialog, CP_GetFileDialog, and CP_PutFileDialog.

CP_E_NavDialogResult CP_FileSystemDialogs_Base::GetNavDialogResult NavUserAction  inUserAction  )  [protected]
 

Returns the result of the user dismissing the NavigationServices dialog.

Exceptions:
none 
Returns:
CP_E_NavDialogResult The result of the user dismissing the NavigationServices dialog.

void CP_FileSystemDialogs_Base::HandleNavStart NavCBRec &  inOutParams  )  [protected, virtual]
 

Called when a kNavCBStart call is encountered.

Parameters:
inOutParams Not used.
Exceptions:
none 
Returns:
void

void CP_FileSystemDialogs_Base::HandleNavTerminate  )  [protected, virtual]
 

Called when a kNavCBTerminate call is encountered.

Exceptions:
none 
Returns:
void

void CP_FileSystemDialogs_Base::PlatformCleanUp  )  [private]
 

Cleanup any platform specific objects that have been allocated.

Exceptions:
none 
Returns:
void

virtual void CP_FileSystemDialogs_Base::RunPlatformDialog  )  [protected, virtual]
 

Reimplemented in CP_AskRevertDialog, CP_AskSaveChangesDialog, CP_FileSystemDialogs_Reply, CP_GetDirectoryDialog, CP_GetFileDialog, and CP_PutFileDialog.

void CP_FileSystemDialogs_Base::PlatformCleanUp  )  [private]
 

virtual void CP_FileSystemDialogs_Base::RunPlatformDialog  )  [protected, virtual]
 

Reimplemented in CP_AskRevertDialog, CP_AskSaveChangesDialog, CP_FileSystemDialogs_Reply, CP_GetDirectoryDialog, CP_GetFileDialog, and CP_PutFileDialog.

void CP_FileSystemDialogs_Base::PlatformCleanUp  )  [private]
 


Member Data Documentation

CP_FileSelectionCallback* CP_FileSystemDialogs_Base::fSelectionCallback [protected]
 

CP_SaveChangesCallback* CP_FileSystemDialogs_Base::fSaveChangesCallback [protected]
 

Signal called when the user selects a file.

CP_SaveChangesCallback* CP_FileSystemDialogs_Base::fRevertCallback [protected]
 

Signal called when the user responds to the AskSaveChanges dialog.

CP_SaveChangesCallback* CP_FileSystemDialogs_Base::fDontSaveChangesCallback [protected]
 

Signal called when the user responds to the AskRevert dialog.

CP_SaveChangesCallback* CP_FileSystemDialogs_Base::fCancelCallback [protected]
 

Signal called when the user responds to the AskSaveChanges/AskRevert dialog.

NavDialogRef CP_FileSystemDialogs_Base::fNavDialog [protected]
 

Signal called when the user responds to the AskSaveChanges/AskRevert dialog.

bool CP_FileSystemDialogs_Base::fDialogIsRunning [protected]
 

MacOS NavDialogRef for the current Navigation Services dialog.

NavDialogCreationOptions CP_FileSystemDialogs_Base::fNavDialogOptions [protected]
 

Flag to indicate the dialog is currently running.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:41 2005 for CPLAT by  doxygen 1.4.0