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

#include <IStringListControlData.h>

Inheritance diagram for IStringListControlData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISTRINGLISTCONTROLDATA }
 

list position constants

enum  { kBeginning = 0, kEnd = -2, kInvalidStringIndex = -1 }
 
virtual void AddString (const PMString &newString, int32 at=kEnd, bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue)=0
 
virtual void RemoveString (int32 index, bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue)=0
 
virtual void Clear (bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue)=0
 
virtual PMString GetString (int32 index) const =0
 
virtual void SetString (int32 index, const PMString &replaceString, bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue)=0
 
virtual int32 GetIndex (const PMString &string, bool16 skipIfDisabled=kFalse) const =0
 
virtual int32 GetIndexOfPartialString (const PMString &stringBeginning, bool16 caseSensitive, bool16 skipIfDisabled=kFalse) const =0
 
virtual int32 Length () const =0
 
virtual void Enable (int32 index, bool16 doEnable=kTrue, bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue)=0
 
virtual void Disable (int32 index, bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue)=0
 
virtual bool16 IsEnabled (int32 index) const =0
 

Additional Inherited Members

- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Control Data Interface associated with widgets based on a list of strings (typically a drop downs variant).

Member Enumeration Documentation

anonymous enum
Enumerator
kBeginning 

at the beginning of the list

kEnd 

at the end of the list

kInvalidStringIndex 

not found in the list

Member Function Documentation

virtual void IStringListControlData::AddString (const PMStringnewString,
int32 at = kEnd,
bool16 invalidate = kTrue,
bool16 notifyOfChange = kTrue 
)
pure virtual

Add a string to the list.

Parameters
newStringIN the string to add
atIN index to add the string, default is at end
invalidateIN invalidate the associated view, default is true
notifyOfChangeIN notify the associated subject, default is true
virtual void IStringListControlData::Clear (bool16 invalidate = kTrue,
bool16 notifyOfChange = kTrue 
)
pure virtual

Clear the list (remove all the strings).

Parameters
invalidateIN invalidate the associated view, default is true
notifyOfChangeIN notify the associated subject, default is true
virtual void IStringListControlData::Disable (int32 index,
bool16 invalidate = kTrue,
bool16 notifyOfChange = kTrue 
)
pure virtual

Disable the element at the given position in the list.

Parameters
indexIN item to disable
invalidateIN invalidate the associated view, default is true
notifyOfChangeIN notify the associated subject, default is true
virtual void IStringListControlData::Enable (int32 index,
bool16 doEnable = kTrue,
bool16 invalidate = kTrue,
bool16 notifyOfChange = kTrue 
)
pure virtual

Enable (or disable) the element at the given position in the list.

Parameters
indexIN item to enable/disable
doEnableIN enable or disable the item
invalidateIN invalidate the associated view, default is true
notifyOfChangeIN notify the associated subject, default is true
virtual int32 IStringListControlData::GetIndex (const PMStringstring,
bool16 skipIfDisabled = kFalse 
) const
pure virtual

Find the index of a string in the list

Parameters
stringIN the string to find
skipIfDisabledIN whether or not the match (if any) be skipped if it is disabled
Returns
index of the string, or kInvalidStringIndex if not found.
virtual int32 IStringListControlData::GetIndexOfPartialString (const PMStringstringBeginning,
bool16 caseSensitive,
bool16 skipIfDisabled = kFalse 
) const
pure virtual

Find the index of a string whose beginning matches the passed in string.

Parameters
stringBeginningIN the string to match
caseSensitiveIN should the comparison be case sensitive
skipIfDisabledIN whether or not the match (if any) be skipped if it is disabled
Returns
index of the string, or kInvalidStringIndex if not found.
virtual PMString IStringListControlData::GetString (int32 index) const
pure virtual

Get one of the strings

virtual bool16 IStringListControlData::IsEnabled (int32 index) const
pure virtual

Is this item enabled?

virtual int32 IStringListControlData::Length () const
pure virtual

How many strings are in the list?

virtual void IStringListControlData::RemoveString (int32 index,
bool16 invalidate = kTrue,
bool16 notifyOfChange = kTrue 
)
pure virtual

Remove a string to the list.

Parameters
indexIN index of string to remove
invalidateIN invalidate the associated view, default is true
notifyOfChangeIN notify the associated subject, default is true
virtual void IStringListControlData::SetString (int32 index,
const PMStringreplaceString,
bool16 invalidate = kTrue,
bool16 notifyOfChange = kTrue 
)
pure virtual

Replace one of the strings

Parameters
indexIN which string to replace
replaceStringIN the new string
invalidateIN invalidate the associated view, default is true
notifyOfChangeIN notify the associated subject, default is true