Om  1.0.0
A universal framework for multimedia simulation
Classes | Public Member Functions | List of all members
om::gui::objects::OpenDialog Class Reference

A class that represents a user dialog for saving files. More...

#include <omGUIOpenDialog.h>

Inheritance diagram for om::gui::objects::OpenDialog:
om::gui::objects::GUIObject

Classes

class  Delegate
 A class that contains function objects that recieve open dialog events. More...
 

Public Member Functions

 OpenDialog ()
 Create an open dialog with the default starting path. More...
 
 ~OpenDialog ()
 Destroy an open dialog, closing it if is visible and releasing all resources used. More...
 
Bool run ()
 Block the calling thread until the user selects a file to open. More...
 
Size getPathCount () const
 Return the number of paths that the user currently has selected. More...
 
const UTF8String & getPath (Index pathIndex) const
 Return the user-selected file path at the specified index. More...
 
UTF8String getSearchPath () const
 Return a path representing the current directory of the open dialog. More...
 
Bool setSearchPath (const UTF8String &newPath)
 Set the path for the current directory of the open dialog. More...
 
Size getTypeCount () const
 Return the number of allowed file types for this open dialog. More...
 
const UTF8String & getType (Index typeIndex) const
 Return the file type string for the type at the specified index in this dialog. More...
 
Bool addType (const UTF8String &newType)
 Add a new file type string to this open dialog. More...
 
Bool removeType (const UTF8String &type)
 Remove the specified file type string from this open dialog. More...
 
Bool clearTypes ()
 Remove all file types from this open dialog. More...
 
UTF8String getTitle () const
 Return the title string for this open dialog. More...
 
Bool setTitle (const UTF8String &newTitle)
 Set the title string for this open dialog. More...
 
Bool getHiddenFiles () const
 Return whether or not this open dialog can see hidden files. More...
 
Bool setHiddenFiles (Bool hiddenFiles)
 Set whether or not this open dialog can see hidden files. More...
 
Bool getAllowsDirectories () const
 Return whether or not this open dialog allows selection of directories. More...
 
Bool setAllowsDirectories (Bool allowsDirectories)
 Set whether or not this open dialog allows selection of directories. More...
 
Bool getAllowsMultiple () const
 Return whether or not this open dialog allows selection of multiple files. More...
 
Bool setAllowsMultiple (Bool allowsMultiple)
 Set whether or not this open dialog allows selection of multiple files. More...
 
const DelegategetDelegate () const
 Get a reference to the delegate object associated with this open dialog. More...
 
void setDelegate (const Delegate &delegate)
 Set the delegate object to which this open dialog sends events. More...
 
virtual void * getInternalPointer () const
 Get a pointer to this open dialog's platform-specific internal representation. More...
 
- Public Member Functions inherited from om::gui::objects::GUIObject
virtual ~GUIObject ()
 Destroy a GUI element and release all resources associated with it. More...
 

Detailed Description

A class that represents a user dialog for saving files.

Constructor & Destructor Documentation

om::gui::objects::OpenDialog::OpenDialog ( )

Create an open dialog with the default starting path.

om::gui::objects::OpenDialog::~OpenDialog ( )

Destroy an open dialog, closing it if is visible and releasing all resources used.

Member Function Documentation

Bool om::gui::objects::OpenDialog::run ( )

Block the calling thread until the user selects a file to open.

The selected file path is sent to the delegate for the dialog. The method returns whether or not the file was successfully opened by the delegate.

If the method returns TRUE, the path of the file can be accessed by calling getPath().

Size om::gui::objects::OpenDialog::getPathCount ( ) const

Return the number of paths that the user currently has selected.

const UTF8String& om::gui::objects::OpenDialog::getPath ( Index  pathIndex) const

Return the user-selected file path at the specified index.

UTF8String om::gui::objects::OpenDialog::getSearchPath ( ) const

Return a path representing the current directory of the open dialog.

This path is the parent of the file that the user has selected to be opend.

Bool om::gui::objects::OpenDialog::setSearchPath ( const UTF8String &  newPath)

Set the path for the current directory of the open dialog.

The method returns whether or not the path was able to be set.

Size om::gui::objects::OpenDialog::getTypeCount ( ) const

Return the number of allowed file types for this open dialog.

If there are no types specified, any file type is allowed.

const UTF8String& om::gui::objects::OpenDialog::getType ( Index  typeIndex) const

Return the file type string for the type at the specified index in this dialog.

Bool om::gui::objects::OpenDialog::addType ( const UTF8String &  newType)

Add a new file type string to this open dialog.

The method returns whether or not the new type was able to be added.

Bool om::gui::objects::OpenDialog::removeType ( const UTF8String &  type)

Remove the specified file type string from this open dialog.

The method returns whether or not the new type was able to be removed.

Bool om::gui::objects::OpenDialog::clearTypes ( )

Remove all file types from this open dialog.

After this operation, any file type is allowed.

UTF8String om::gui::objects::OpenDialog::getTitle ( ) const

Return the title string for this open dialog.

On most platforms, this string will be placed at the top of the window in a title bar.

Bool om::gui::objects::OpenDialog::setTitle ( const UTF8String &  newTitle)

Set the title string for this open dialog.

The method returns whether or not the title change operation was successful.

Bool om::gui::objects::OpenDialog::getHiddenFiles ( ) const

Return whether or not this open dialog can see hidden files.

Bool om::gui::objects::OpenDialog::setHiddenFiles ( Bool  hiddenFiles)

Set whether or not this open dialog can see hidden files.

Bool om::gui::objects::OpenDialog::getAllowsDirectories ( ) const

Return whether or not this open dialog allows selection of directories.

Bool om::gui::objects::OpenDialog::setAllowsDirectories ( Bool  allowsDirectories)

Set whether or not this open dialog allows selection of directories.

Bool om::gui::objects::OpenDialog::getAllowsMultiple ( ) const

Return whether or not this open dialog allows selection of multiple files.

Bool om::gui::objects::OpenDialog::setAllowsMultiple ( Bool  allowsMultiple)

Set whether or not this open dialog allows selection of multiple files.

const Delegate& om::gui::objects::OpenDialog::getDelegate ( ) const

Get a reference to the delegate object associated with this open dialog.

void om::gui::objects::OpenDialog::setDelegate ( const Delegate delegate)

Set the delegate object to which this open dialog sends events.

virtual void* om::gui::objects::OpenDialog::getInternalPointer ( ) const
virtual

Get a pointer to this open dialog's platform-specific internal representation.

On Mac OS X, this method returns a pointer to a subclass of NSOpenPanel which represents the open dialog.

On Windows, this method returns an HWND indicating a handle to the open dialog window.

Implements om::gui::objects::GUIObject.


The documentation for this class was generated from the following file: