24 #ifndef __ITextUtils__ 25 #define __ITextUtils__ 27 #include "IPMUnknown.h" 30 #include "CTextEnum.h" 31 #include "IScaleObject.h" 32 #include "LanguageID.h" 33 #include "TextAttrID.h" 34 #include "OwnedItemDataList.h" 35 #include "K2SmartPtr.h" 36 #include "AttributeBossList.h" 37 #include "RangeData.h" 38 #include "ITextOptions.h" 39 #include "ITextStoryThreadDictHier.h" 40 #include "IMultiColumnTextFrame.h" 41 #include "BravoForwardDecl.h" 42 #include "IDrawingStyle.h" 43 #include "ICreateMCFrameData.h" 93 #define kInvalidChapterNumber -1 103 enum { kDefaultIID = IID_ITEXTUTILS };
190 bool16 noGraphicAttr,
192 bool16 isHorizontal = kTrue,
193 bool16 isFrameGrid = kFalse,
194 bool16 isLeftToRight = kTrue,
196 bool16 isEndnoteStory = kFalse) = 0;
211 bool16 noGraphicAttr,
213 bool16 isHorizontal = kTrue,
214 bool16 isFrameGrid = kFalse,
215 bool16 isLeftToRight = kTrue,
232 bool16 noGraphicAttr,
235 bool16 isHorizontal = kTrue,
236 bool16 isFrameGrid = kFalse,
237 bool16 isLeftToRight = kTrue,
253 bool16 noGraphicAttr,
256 bool16 atEnd = kTrue,
273 bool16 noGraphicAttr,
276 bool16 insertAfter = kTrue,
294 bool16 noGraphicAttr,
311 bool16 isHorizontal = kTrue,
312 bool16 isFrameGrid = kFalse,
313 bool16 isLeftToRight = kTrue,
329 bool16 isHorizontal = kTrue,
330 bool16 isFrameGrid = kFalse,
331 bool16 isLeftToRight = kTrue,
345 bool16 atEnd = kTrue,
361 bool16 insertAfter = kTrue,
389 bool16 stripHardHyphens = kTrue,
390 bool16 stripDiscretionaryHyphens = kTrue,
391 bool16 convertApostrophes = kTrue,
392 bool16 stripNobreakNonspace = kTrue,
393 bool16 convertHyphens = kTrue,
394 bool16 stripLeadingSpaces = kTrue,
395 bool16 convertForGrammarCheck = kFalse) = 0;
476 bool16 remapExactFontStylesOnly = kFalse) = 0;
491 virtual bool16 IsWordBreak(
const UTF32TextChar& curChar) = 0;
549 TextIndex start, int32 len,
551 bool16 nested = kFalse) = 0;
557 TextIndex start, int32 len,
558 VisitableItems *resultList) = 0;
590 TextIndex start, int32 len,
591 StoryRangeList* resultList,
592 TextIndex hIndex = kInvalidTextIndex,
594 bool16 bIncludeAnchorSpan = kTrue) = 0;
603 StoryRangeList* resultList) = 0;
619 TextIndex at,
PMRect *pCBounds) = 0;
630 virtual bool16
IsScriptOfText(
const char *anyText, int32 writingScript ) = 0;
634 virtual int32
GuessScriptOfText(
const char *anyText, int32 preferredWritingScript = kDontKnowScript ) = 0;
684 bool16 wantParaStyle;
685 bool16 wantCharStyle;
686 bool16 wantParaOverrides;
687 bool16 wantCharOverrides;
690 wantCharOverrides(kFalse), wantParaOverrides(kFalse),
691 wantCharStyle(kFalse), wantParaStyle(kFalse)
705 TextAttrs() : charOverrides(nil), paraOverrides(nil),
706 charStyle(kInvalidUID), paraStyle(kInvalidUID) {}
730 Text::GridAlignmentMetric alignment,
731 PMReal alignmentMetricOffset)
const = 0;
749 virtual int32
CountChars(
const UTF16TextChar *buffer, int32 length)
const = 0;
788 int32 *pFirstFrameIndex,
789 int32 *pLastFrameIndex) = 0;
791 virtual UIDList* CreateOppositeDirectionFrameList (
UIDList *pStoryList,
792 ITextOptions::WritingDirection dir) = 0;
867 virtual ErrorCode ProcessScaleParcelContent(
const ITextParcelList* tpl,
898 typedef enum { kStartCounting = 0, kCustomizeStartCounting, kContinueCounting, kContinueCountingForComposedFrame, kEndCounting } WordCountUpdateState;
900 virtual void GetWordCountInfo
903 const uint32& startIndex,
904 const int32& lengthToCount,
906 const ITextUtils::WordCountUpdateState& state,
912 uint32& oversetCharacters,
913 uint32& oversetWords,
914 uint32& oversetParagraphs,
915 uint32& oversetLines,
916 bool16& bWordAcrossOverset,
945 virtual void GetWordCountInfo
948 const uint32& startIndex,
949 const int32& lengthToCount,
951 const ITextUtils::WordCountUpdateState& state,
953 uint32& fullWidthChars, uint32& oversetFullWidthChars,
954 uint32& halfWidthChars, uint32& oversetHalfWidthChars,
955 uint32& japaneseChars, uint32& oversetJapaneseChars,
956 uint32& kanjis, uint32& oversetKanjis,
957 uint32& words, uint32& oversetWords,
958 uint32& lines, uint32& oversetLines,
959 uint32& paragraphs, uint32& oversetParagraphs,
960 uint32& allChars, uint32& oversetAllChars,
961 bool16& bWordAcrossOverset ,
1101 virtual TextIndex GetTextIndexForTrackedParagraph(
const UIDRef& paraStrandDiskPageRef,
1103 uint32 trackerData)
const = 0;
1155 const UIDList& uidList)
const = 0;
1225 std::vector<std::pair<Text::GlyphID, TextIndex>> *newGlyphPoints, bool16 clearOverrides=kFalse)
const = 0;
1263 bool16 remapExactFontStylesOnly = kFalse,
PMReal pointSize = -1) = 0;
1274 #endif // __ITextUtils__