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

#include <IXMLImportOptionsService.h>

Inheritance diagram for IXMLImportOptionsService:
IPMUnknownCPMUnknown< IXMLImportOptionsService >CXMLImportOptionsServiceProvider

Public Types

enum  { kDefaultIID = IID_IIXMLIMPORTOPTIONSSERVICE }
 
enum  kUIElementType { kCheckbox, kPopup, kRadioGroup, kFileName }
 

Public Member Functions

virtual void Initialize (IDocument *doc)=0
 
virtual K2Vector< int32 > WarnOfChange (IXMLImportOptionsService *changedService, IControlView *controlView, int32 which)=0
 
virtual void CommitChanges ()=0
 
virtual PMString GetGroupName () const =0
 
virtual int32 GetUIElementsCount () const =0
 
virtual bool16 IsNthElementEnabled (int32 n) const =0
 
virtual
IXMLImportOptionsService::kUIElementType 
GetNthElementType (int32 n) const =0
 
virtual PMString GetNthElementName (int32 n) const =0
 
virtual bool16 GetNthElementBoolValue (int32 n) const =0
 
virtual void SetNthElementBoolValue (int32 n, bool16 newValue)=0
 
virtual void GetNthElementPopupValueList (int32 n, K2Vector< PMString > &valueList) const =0
 
virtual int32 GetNthElementIntValue (int32 n) const =0
 
virtual void SetNthElementIntValue (int32 n, int32 selected)=0
 
virtual IDFile GetNthElementFileName (int32 n) const =0
 
virtual void SetNthElementFileName (int32 n, IDFile fileName)=0
 
virtual PMString GetNthElementDefaultText (int32 n) const =0
 
virtual void GetNthFileTypeInfo (int32 n, PMString &typeName, PMString &extension) const =0
 
virtual bool16 ShouldIndentNthControl (int32 n) 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 to automatically build the UI elements for the XML import options dialog. Should be used in conjunction with kXMLImportUIService

Member Enumeration Documentation

Enumerator
kCheckbox 

Indicates that this element is a checkbox

kPopup 

Indicates that this element is a popup

kRadioGroup 

Indicates that this element is a radio group

kFileName 

Indicates that this element is a filename widget

Member Function Documentation

virtual void IXMLImportOptionsService::CommitChanges ()
pure virtual

Commit the changes that have been stored while the dialog was open.

Implemented in CXMLImportOptionsServiceProvider.

virtual PMString IXMLImportOptionsService::GetGroupName () const
pure virtual

Get the name of the group box for this list of options. A group box will not be added if the name is an empty string

Returns
- the name of the import options group

Implemented in CXMLImportOptionsServiceProvider.

virtual bool16 IXMLImportOptionsService::GetNthElementBoolValue (int32 n) const
pure virtual

Get the value of the Nth element

Parameters
n- The item you want information about
Returns
- The default value for this UI element (kFalse if the element is not a checkbox)

Implemented in CXMLImportOptionsServiceProvider.

virtual PMString IXMLImportOptionsService::GetNthElementDefaultText (int32 n) const
pure virtual

Get the default text to use when a text edit box is empty.

NOTE: This is only used for filename elements right now

Parameters
n- The item you want information about
Returns
- The text to use by default.

Implemented in CXMLImportOptionsServiceProvider.

virtual IDFile IXMLImportOptionsService::GetNthElementFileName (int32 n) const
pure virtual

Get the filename to use by default in the filename widget.

NOTE: This is only used for filename elements

Parameters
n- The item you want information about
Returns
- The fileName to use by default (Empty file if this is not a file name, or client wants nothing by default)

Implemented in CXMLImportOptionsServiceProvider.

virtual int32 IXMLImportOptionsService::GetNthElementIntValue (int32 n) const
pure virtual

Get the item to select in the popup or radio group.

NOTE: This is only used for popup or radio group elements

Parameters
n- The item you want information about
Returns
- The item to be selected by default (-1 if this is not a popup)

Implemented in CXMLImportOptionsServiceProvider.

virtual PMString IXMLImportOptionsService::GetNthElementName (int32 n) const
pure virtual

Get the name of the Nth element

Parameters
n- The item you want information about
Returns
- The name of the element that should appear in the dialog

Implemented in CXMLImportOptionsServiceProvider.

virtual void IXMLImportOptionsService::GetNthElementPopupValueList (int32 n,
K2Vector< PMString > & valueList 
) const
pure virtual

Get the list of items in the popup.

NOTE: This is only used for popup elements

Parameters
n- The item you want information about
valueList- Filled with all of the items in the popup

Implemented in CXMLImportOptionsServiceProvider.

virtual IXMLImportOptionsService::kUIElementType IXMLImportOptionsService::GetNthElementType (int32 n) const
pure virtual

Get the type of the Nth element

Parameters
n- The item you want information about
Returns
- The type of the element

Implemented in CXMLImportOptionsServiceProvider.

virtual void IXMLImportOptionsService::GetNthFileTypeInfo (int32 n,
PMStringtypeName,
PMStringextension 
) const
pure virtual

Get the file type information for file elements.

NOTE: This is only used for filename elements right now

Parameters
n- The item you want information about
typeName- The name to display for this file type
extension- The extension that type file box should expect

Implemented in CXMLImportOptionsServiceProvider.

virtual int32 IXMLImportOptionsService::GetUIElementsCount () const
pure virtual

Get the number of UI elements that this Service Provider supports

Returns
- the number of elements supported

Implemented in CXMLImportOptionsServiceProvider.

virtual void IXMLImportOptionsService::Initialize (IDocumentdoc)
pure virtual

Use this to initialze the state of each of the controls This simply makes it easier and faster to retrieve info about various controls while the dialog is running

Parameters
doc- The document we are initializing the options for. This is important because different docs can have different default options

Implemented in CXMLImportOptionsServiceProvider.

virtual bool16 IXMLImportOptionsService::IsNthElementEnabled (int32 n) const
pure virtual

Get the enabled state of the Nth element

Parameters
n- The item you want information about
Returns
- 'kTrue' element should be enabled

Implemented in CXMLImportOptionsServiceProvider.

virtual void IXMLImportOptionsService::SetNthElementBoolValue (int32 n,
bool16 newValue 
)
pure virtual

Get the value of the Nth element

Parameters
n- The item you want information about
newValue- The new value for this UI element

Implemented in CXMLImportOptionsServiceProvider.

virtual void IXMLImportOptionsService::SetNthElementFileName (int32 n,
IDFile fileName 
)
pure virtual

Set the filename to use by default in the filename widget.

NOTE: This is only used for filename elements

Parameters
n- The item you want information about
selected- The filename that is in the widget

Implemented in CXMLImportOptionsServiceProvider.

virtual void IXMLImportOptionsService::SetNthElementIntValue (int32 n,
int32 selected 
)
pure virtual

Set the item that the user selected in the popup or radio group.

NOTE: This is only used for popup or radio group elements

Parameters
n- The item you want information about
selected- The item that is selected

Implemented in CXMLImportOptionsServiceProvider.

virtual bool16 IXMLImportOptionsService::ShouldIndentNthControl (int32 n) const
pure virtual

Used to determine whether the control should be indented

Parameters
n- Which item you care about
Returns
- kTrue == Indent; kFalse == don't indent

Implemented in CXMLImportOptionsServiceProvider.

virtual K2Vector<int32> IXMLImportOptionsService::WarnOfChange (IXMLImportOptionsServicechangedService,
IControlViewcontrolView,
int32 which 
)
pure virtual

Warn this service that another control has changed values This gives this service a chance to change its state when other controls that it may care about change their states

Parameters
changedService- The service that has been changed
controlView- The control view of the element being changed
which- Which element in the service changed
Returns
- A list of elements that cared (empty list if nobody cares)

Implemented in CXMLImportOptionsServiceProvider.