Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a user dialog for saving files. More...
#include <omGUISaveDialog.h>
Classes | |
class | Delegate |
A class that contains function objects that recieve save dialog events. More... | |
Public Member Functions | |
SaveDialog () | |
Create a save dialog with the default starting path. More... | |
~SaveDialog () | |
Destroy a save dialog, closing it if is visible and releasing all resources used. More... | |
Bool | run () |
Block the calling thread until the user selects a file. More... | |
UTF8String | getPath () const |
Return the current user-selected save file path. More... | |
UTF8String | getSearchPath () const |
Return a path representing the current directory of the save dialog. More... | |
Bool | setSearchPath (const UTF8String &newPath) |
Set the path for the current directory of the save dialog. More... | |
const UTF8String & | getDefaultName () const |
Return the default file name to use when saving. More... | |
Bool | setDefaultName (const UTF8String &newDefaultName) |
Set the default file name to use when saving. More... | |
Size | getTypeCount () const |
Return the number of allowed file types for this save dialog. More... | |
const UTF8String & | getType (Index typeIndex) const |
Return the file type extension string for the type at the specified index in this dialog. More... | |
const UTF8String & | getTypeName (Index typeIndex) const |
Return the file type display name for the type at the specified index in this dialog. More... | |
Bool | addType (const UTF8String &extension) |
Add a new file type to this save dialog. More... | |
Bool | addType (const UTF8String &extension, const UTF8String &displayName) |
Add a new file type to this save dialog with the specified display name. More... | |
Bool | removeType (const UTF8String &extension) |
Remove the specified file type string from this save dialog. More... | |
Bool | clearTypes () |
Remove all file types from this save dialog. More... | |
UTF8String | getTitle () const |
Return the title string for this save dialog. More... | |
Bool | setTitle (const UTF8String &newTitle) |
Set the title string for this save dialog. More... | |
Bool | getHiddenFiles () const |
Return whether or not this open dialog can see hidden files. More... | |
Bool | setHiddenFiles (Bool newHiddenFiles) |
Set whether or not this open dialog can see hidden files. More... | |
const Delegate & | getDelegate () const |
Get a reference to the delegate object associated with this save dialog. More... | |
void | setDelegate (const Delegate &delegate) |
Set the delegate object to which this save dialog sends events. More... | |
virtual void * | getInternalPointer () const |
Get a pointer to this save 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... | |
A class that represents a user dialog for saving files.
om::gui::objects::SaveDialog::SaveDialog | ( | ) |
Create a save dialog with the default starting path.
om::gui::objects::SaveDialog::~SaveDialog | ( | ) |
Destroy a save dialog, closing it if is visible and releasing all resources used.
Bool om::gui::objects::SaveDialog::run | ( | ) |
Block the calling thread until the user selects a file.
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().
UTF8String om::gui::objects::SaveDialog::getPath | ( | ) | const |
Return the current user-selected save file path.
UTF8String om::gui::objects::SaveDialog::getSearchPath | ( | ) | const |
Return a path representing the current directory of the save dialog.
This path is the parent of the file that the user has selected to be saved.
Bool om::gui::objects::SaveDialog::setSearchPath | ( | const UTF8String & | newPath | ) |
Set the path for the current directory of the save dialog.
The method returns whether or not the path was able to be set.
const UTF8String& om::gui::objects::SaveDialog::getDefaultName | ( | ) | const |
Return the default file name to use when saving.
Bool om::gui::objects::SaveDialog::setDefaultName | ( | const UTF8String & | newDefaultName | ) |
Set the default file name to use when saving.
Size om::gui::objects::SaveDialog::getTypeCount | ( | ) | const |
Return the number of allowed file types for this save dialog.
If there are no types specified, any file type is allowed.
const UTF8String& om::gui::objects::SaveDialog::getType | ( | Index | typeIndex | ) | const |
Return the file type extension string for the type at the specified index in this dialog.
const UTF8String& om::gui::objects::SaveDialog::getTypeName | ( | Index | typeIndex | ) | const |
Return the file type display name for the type at the specified index in this dialog.
Bool om::gui::objects::SaveDialog::addType | ( | const UTF8String & | extension | ) |
Add a new file type to this save dialog.
The method returns whether or not the new type was able to be added.
Bool om::gui::objects::SaveDialog::addType | ( | const UTF8String & | extension, |
const UTF8String & | displayName | ||
) |
Add a new file type to this save dialog with the specified display name.
The method returns whether or not the new type was able to be added.
Bool om::gui::objects::SaveDialog::removeType | ( | const UTF8String & | extension | ) |
Remove the specified file type string from this save dialog.
The method returns whether or not the new type was able to be removed.
Bool om::gui::objects::SaveDialog::clearTypes | ( | ) |
Remove all file types from this save dialog.
After this operation, any file type is allowed.
UTF8String om::gui::objects::SaveDialog::getTitle | ( | ) | const |
Return the title string for this save dialog.
On most platforms, this string will be placed at the top of the window in a title bar.
Bool om::gui::objects::SaveDialog::setTitle | ( | const UTF8String & | newTitle | ) |
Set the title string for this save dialog.
The method returns whether or not the title change operation was successful.
Bool om::gui::objects::SaveDialog::getHiddenFiles | ( | ) | const |
Return whether or not this open dialog can see hidden files.
Set whether or not this open dialog can see hidden files.
const Delegate& om::gui::objects::SaveDialog::getDelegate | ( | ) | const |
Get a reference to the delegate object associated with this save dialog.
void om::gui::objects::SaveDialog::setDelegate | ( | const Delegate & | delegate | ) |
Set the delegate object to which this save dialog sends events.
|
virtual |
Get a pointer to this save dialog's platform-specific internal representation.
On Mac OS X, this method returns a pointer to a subclass of NSSavePanel which represents the save dialog.
On Windows, this method returns an HWND indicating a handle to the save dialog window.
Implements om::gui::objects::GUIObject.