FileDialog Class Reference [Using System Dialogs]

#include <fileDialog.h>

Inheritance diagram for FileDialog:

Inheritance graph
[legend]
List of all members.

Detailed Description

FileDialog is a platform agnostic dialog interface for querying the user for file locations.

It is designed to be used through the exposed scripting interface.

FileDialog is the base class for Native File Dialog controls in Torque. It provides these basic areas of functionality:

  • Inherits from SimObject and is exposed to the scripting interface
  • Provides blocking interface to allow instant return to script execution
  • Simple object configuration makes practical use easy and effective

Attention:
FileDialog is *NOT* intended to be used directly in script and is only exposed to script to expose generic file dialog attributes.
See also:
OpenFileDialog for a practical example on opening a file

SaveFileDialog for a practical example of saving a file


Public Member Functions

 FileDialog ()
virtual ~FileDialog ()
 DECLARE_CONOBJECT (FileDialog)
virtual bool Execute ()
FileDialogDatagetData ()

Static Public Member Functions

static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Static Protected Member Functions

static bool setFile (void *obj, const char *data)
FileDialog Properties
@property DefaultPath (String) : Path to use as the default when the dialog is shown.
 %fd.DefaultPath = "/source/myGameProject/data/images"; 

  • ChangePath (bool) : Will change the working path of the tools to the selected path when not canceled
     %fd.ChangePath = true; // Change Working Path on Success 
    


static bool setDefaultPath (void *obj, const char *data)
static bool setDefaultFile (void *obj, const char *data)
static bool setFilters (void *obj, const char *data)
static bool setChangePath (void *obj, const char *data)
static const char * getChangePath (void *obj, const char *data)

Protected Attributes

FileDialogData mData
 Stores platform agnostic information about the dialogs properties.
bool mChangePath
 Exposed ChangePath Property.
bool mBoolTranslator
 Internally used to translate boolean values into their respective bits of dialog style.

Private Types

typedef SimObject Parent


Member Typedef Documentation

typedef SimObject FileDialog::Parent [private]

Reimplemented from SimObject.

Reimplemented in OpenFileDialog, OpenFolderDialog, and SaveFileDialog.


Constructor & Destructor Documentation

FileDialog::FileDialog (  ) 

virtual FileDialog::~FileDialog (  )  [virtual]


Member Function Documentation

FileDialog::DECLARE_CONOBJECT ( FileDialog   ) 

static void FileDialog::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDeprecatedField(), addGroup(), endGroup()

Reimplemented from SimObject.

Reimplemented in OpenFileDialog, OpenFolderDialog, and SaveFileDialog.

virtual bool FileDialog::Execute (  )  [virtual]

FileDialogData& FileDialog::getData (  )  [inline]

static bool FileDialog::setDefaultPath ( void obj,
const char *  data 
) [static, protected]

static bool FileDialog::setDefaultFile ( void obj,
const char *  data 
) [static, protected]

static bool FileDialog::setFilters ( void obj,
const char *  data 
) [static, protected]

static bool FileDialog::setChangePath ( void obj,
const char *  data 
) [static, protected]

static const char* FileDialog::getChangePath ( void obj,
const char *  data 
) [static, protected]

static bool FileDialog::setFile ( void obj,
const char *  data 
) [static, protected]


Member Data Documentation

Stores platform agnostic information about the dialogs properties.

Exposed ChangePath Property.

Internally used to translate boolean values into their respective bits of dialog style.