FileDialog

Engine/source/platform/nativeDialogs/fileDialog.h

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

More...

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 
    

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

Private Types

Parent 

Protected Attributes

bool

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

bool

Exposed ChangePath Property.

Stores platform agnostic information about the dialogs properties.

Public Static Functions

Protected Static Functions

bool
setFile(void * object, const char * index, const char * data)

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:

OpenFileDialog for a practical example on opening a file

see:

SaveFileDialog for a practical example of saving a file

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 
    

setDefaultPath(void * object, const char * index, const char * data)

setDefaultFile(void * object, const char * index, const char * data)

setFilters(void * object, const char * index, const char * data)

setChangePath(void * object, const char * index, const char * data)

getChangePath(void * obj, const char * data)

Private Types

typedef SimObject Parent 

Protected Attributes

bool mBoolTranslator 

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

bool mChangePath 

Exposed ChangePath Property.

FileDialogData mData 

Stores platform agnostic information about the dialogs properties.

bool mForceRelativePath 

Public Functions

FileDialog()

~FileDialog()

DECLARE_CONOBJECT(FileDialog )

Execute()

getData()

Public Static Functions

initPersistFields()

Protected Static Functions

setFile(void * object, const char * index, const char * data)