InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IFileNameWidgetController Class Referenceabstract

#include <IFileNameWidgetController.h>

Inheritance diagram for IFileNameWidgetController:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IFILENAMEWIDGETCONTROLLER }
 

Public Member Functions

virtual void Set (const PMString &widgetName, const IDFile &fileName, bool16 enabled, bool16 selected, const PMString &defaultText, const PMString &validFileType, const K2Vector< PMString > &validExt)=0
 
virtual ErrorCode SetFileName (const IDFile &newName)=0
 
virtual IDFile GetFileName () const =0
 
virtual void Enable ()=0
 
virtual void Disable ()=0
 
virtual bool16 GetEnabledState () const =0
 
virtual void GetFileTypeInfo (PMString &fileName, K2Vector< PMString > &extensions) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Interface that provides methods needed for the fileNameWidget to function properly

Member Function Documentation

virtual void IFileNameWidgetController::Disable ()
pure virtual

Use this to disable the edit box and browse button

virtual void IFileNameWidgetController::Enable ()
pure virtual

Use this to enable the edit box and browse button

virtual bool16 IFileNameWidgetController::GetEnabledState () const
pure virtual

Use this to find out if the widget should be enabled or not

Returns
- kTrue:Enabled/kFalse:Disabled
virtual IDFile IFileNameWidgetController::GetFileName () const
pure virtual

Use this to get the file name the widget should point to

Returns
- The name to use
virtual void IFileNameWidgetController::GetFileTypeInfo (PMStringfileName,
K2Vector< PMString > & extensions 
) const
pure virtual

Use this to get the filetype information

Parameters
fileName- The to display for this file type
extension- The extension this file should have
virtual void IFileNameWidgetController::Set (const PMStringwidgetName,
const IDFilefileName,
bool16 enabled,
bool16 selected,
const PMStringdefaultText,
const PMStringvalidFileType,
const K2Vector< PMString > & validExt 
)
pure virtual

Use this method to set the Controller in the interface

Parameters
widgetName- The anem that should be displayed by the checkbox
fileName- The filename that the widget points to
enabled- Whether this widget should be enabled
selected- Whether this widget should be selected (turned on)
defaultText- The text to display when there is no valid filename
validExt- The extensions that are valid when browsing for files
virtual ErrorCode IFileNameWidgetController::SetFileName (const IDFilenewName)
pure virtual

Use this to set the file name the widget should point to. The name must either point to a file that exists or be an uninitialized IDFile. Any other case will not change the data and will return an error.

Parameters
newName- The name to use
Returns
- kSuccess if name was valid and could be changed : kFailure if name was invalid