29 #ifndef __IAdaptiveHelper__ 30 #define __IAdaptiveHelper__ 32 #include "IPMUnknown.h" 33 #include "AutoLayoutID.h" 35 #include "ErrorUtils.h" 36 #include "IXPAttributeSuite.h" 39 #define NORMAILZE_ERROR(err) if(err == kItemDoesNotIntersectBoundsError || err == kItemTooSmallError || err == kUnableToSetBoundingBoxError) \ 40 { ErrorUtils::PMSetGlobalErrorCode(kSuccess); err = kSuccess; } 41 #define SHOW_ERROR(err, msg) if (err != kSuccess) \ 44 #define HANDLE_ADAPTIVE_ERR(err, msg) NORMAILZE_ERROR(err) \ 47 #define HANDLE_ADAPTIVE_ERR(err, msg) NORMAILZE_ERROR(err); 52 kMaintainAspectRatioForNonRectangular = 1,
53 kResizeIrrespectiveOfAspectRatio = 2,
60 enum { kDefaultIID = IID_IADAPTIVEHELPER };
109 virtual void RegisterMaxFontScaleOf(
UID uid,
PMReal fontScale) = 0;
111 virtual PMReal GetFontScale(
UID itemUID) = 0;
113 virtual bool16 LiesInsideMargin(
const UIDRef& pageItemRef,
const PMRect& initialBounds) = 0;
115 virtual ErrorCode AdjustEffects(
const UIDList& itemList,
const PMRect& initialBounds,
const PMRect& finalBounds) = 0;
117 virtual PMRect GetRelativeFinalBounds(
PMRect initialBounds,
PMRect initialReferenceBounds,
PMRect finalReferenceBounds) = 0;
119 virtual PMReal GetMaxAllowedFontSize() = 0;
120 virtual PMReal GetMinAllowedFontSize() = 0;
121 virtual void PreprocessText(
UIDRef uidRef) = 0;
122 virtual UID GetSpreadUID(
UIDRef pageItemUID) = 0;
126 #endif // __IAdaptiveHelper__