InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextDataValidation Class Referenceabstract
Inheritance diagram for ITextDataValidation:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITEXTDATAVALIDATION }
 
enum  RangeError {
  kNoError = 0, kNoEntryWhenRequired, kInvalidValue, kValueOutOfRange,
  kInvalidStartPage, kInvalidEndPage, kUnknownPagesInRange, kAmbiguousPage
}
 

Public Member Functions

virtual void EnableRangeChecking (const bool16 &checkingOn)=0
 
virtual bool16 RangeCheckingEnabled () const =0
 
virtual bool16 IsBlankEntryAllowed () const =0
 
virtual void AllowBlankEntry (const bool16 &blankAllowed)=0
 
virtual bool16 IsEntryLegal ()=0
 
virtual PMString GetErrorString ()=0
 
virtual PMReal GetUpperLimit () const =0
 
virtual void SetUpperLimit (const PMReal &limit)=0
 
virtual PMReal GetLowerLimit () const =0
 
virtual void SetLowerLimit (const PMReal &limit)=0
 
virtual bool16 GetRestoreLastValueOnError () const =0
 
virtual void SetRestoreLastValueOnError (const bool16 &restoreValue)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Enumeration Documentation

fErrorState values set in IsEntryLegal.
Enumerator
kNoError 

No error, initial state.

kNoEntryWhenRequired 

No entry, and IsBlankEntryAllowed doesn't return kTrue

kInvalidValue 

Generic error code

kValueOutOfRange 

Value doesn't fall within limits

kInvalidStartPage 

Bad start page value

kInvalidEndPage 

Bad end page value

kUnknownPagesInRange 

Bad page range value.

kAmbiguousPage 

Can't determine page value uniquely. More than one page in documents maps to this string

Member Function Documentation

virtual void ITextDataValidation::AllowBlankEntry (const bool16 & blankAllowed)
pure virtual

Set the policy for this control for allowing blank entries.

Parameters
blankAllowed[IN]: pass in kTrue to allow blanks, otherwise pass in kFalse.
virtual void ITextDataValidation::EnableRangeChecking (const bool16 & checkingOn)
pure virtual

Turn on (kTrue) or off (kFalse) range checking for this control.

Parameters
checkingOn[IN]: the boolean flag to turn on/off.
virtual PMString ITextDataValidation::GetErrorString ()
pure virtual

Get the error string if the entry is not legal. An empty string will return if the entry is legal.

Returns
PMString the error string explaining to the user what the error is.
virtual PMReal ITextDataValidation::GetLowerLimit () const
pure virtual

Get the lower limit for this control. The control's value must be >= this value.

Returns
PMReal the lower limit value for this control.
virtual bool16 ITextDataValidation::GetRestoreLastValueOnError () const
pure virtual

Get the boolean flag indicates if we should restore the last good value of this control or not when an error occurs. For example, when IsEntryLegal() returns kFalse, we might check this to see if he last good value should be restored or not.

Returns
bool16 kTrue indicates control wants to restore last good value, otherwise return kFalse.
virtual PMReal ITextDataValidation::GetUpperLimit () const
pure virtual

Get the upper limit value for this control. The control's value must be <= this value.

Returns
PMReal the upper limit for the value
virtual bool16 ITextDataValidation::IsBlankEntryAllowed () const
pure virtual

Get the policy for this control for allowing blank entries (kTrue) or not (kFalse).

Returns
bool16 the boolean flag indicates if we allow to have blank entry or not.
virtual bool16 ITextDataValidation::IsEntryLegal ()
pure virtual

Check if the text value in the control is legal or not. Return kTrue for valid entry, kFalse for invalid entry.

Returns
bool16 indicates the legality value.
virtual bool16 ITextDataValidation::RangeCheckingEnabled () const
pure virtual

Get the range checking flag for enabling range checking (kTrue) or not (kFalse).

Returns
bool16 the boolean flag for range checking.
virtual void ITextDataValidation::SetLowerLimit (const PMReallimit)
pure virtual

Set the lower limit value for this control.

Parameters
limit[IN]: the new lower limit for this control.
virtual void ITextDataValidation::SetRestoreLastValueOnError (const bool16 & restoreValue)
pure virtual

Set the boolean value for the control indicates that it wants to restore last good value if there is error.

Parameters
restoreValue[IN]: passin kTrue to restore last good value on error, otherwise pass in kFalse. Default value is set as kTrue in CTextDataValidation.cpp.
virtual void ITextDataValidation::SetUpperLimit (const PMReallimit)
pure virtual

Set the upper limit value for this control.

Parameters
limit[IN]: the new upper limit for this control.