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

#include <ITextAttrRealNumber.h>

Inheritance diagram for ITextAttrRealNumber:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITEXTATTRREALNUMBER }
 
typedef PMReal ValueType
 
typedef PMReal value_type
 

Public Member Functions

virtual const value_typeGet () const =0
 
virtual void Set (const value_type &val)=0
 
virtual bool16 HasLimits (value_type &lLim, value_type &uLim) const =0
 
const value_typeGetRealNumber () const
 
void SetRealNumber (const value_type &val)
 
- 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 for a text attribute whose value is represented by a real number.

Member Function Documentation

virtual bool16 ITextAttrRealNumber::HasLimits (value_typelLim,
value_typeuLim 
) const
pure virtual
Report whether or not this attribute has upper and/or lower limits and what they are. The limits are the same units as the value.

Parameters
lLimIN If the return value is kTrue, is the lower limit of valid values. (value will always be >= the returned value)
uLimIN If the return value is kTrue, is the upper limit of valid values. (value will always be <= the returned value)
Returns
if the return value is kFalse the parameter values are undefined.
Note
the caller has ultimate responsibility for enforcing the limits. i.e. although well-behaved implementations will enforce the limits, not all are. Also, how the limits are enforced may vary with each implementation - i.e. some silently ignore the invalid values, some set to the nearest limit.
virtual void ITextAttrRealNumber::Set (const value_typeval)
pure virtual

A well-behaved implementation will enforce the limits, if any, returned by HasLimits(). If the value exceeds either limit, it should be set to that limit.