InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextEditorUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __ITextEditorUtils__
25 #define __ITextEditorUtils__
26 
27 #include "Utils.h"
28 #include "RangeData.h"
29 #include "ICursorMgr.h"
30 #include "TextEditorID.h" // default IID
31 
32 class CursorSpec;
33 class IControlView;
34 class IDialog;
35 class ITextModel;
36 class ITextParcelList;
38 class ITextStoryThread;
39 class ParcelKey;
40 class ITextVariableTable;
41 class PMString;
42 class ICharacterAlternatesData;
43 
50 {
51 public:
52  enum { kDefaultIID = IID_ITEXTEDITORUTILS };
53 
59  virtual void GetIBeamCursor(const PMMatrix& innerToPBMatrix, CursorSpec& spec) = 0;
60 
69  virtual CursorSpec GetPointerCursorForTextTool(const SysPoint currentPt, IControlView* view, ICursorMgr::eCursorModifierState modifiers, CursorSpec defaultCursor) = 0;
70 
79  virtual PMReal HitTestStoryThread(ITextStoryThread* storyThread, ParcelKey key, IControlView* view, const PMPoint &viewLoc, TextIndex *nextLine) = 0;
80 
89  virtual RangeData AdjustHitTestTextIndex(ITextStoryThread* storyThread, IControlView* view, PMReal& charHit, const TextIndex nextLine, bool16* useCharHitForParagraphSnap = nil) = 0;
90 
98  virtual RangeData PrepareToConvertToDisplay(ITextModel *model, IControlView *view, TextIndex hitIndex, RangeData rangeToConvert) = 0;
99 
104  virtual ErrorCode ManageVariables(ITextVariableTable* varTable, const PMString* varName) = 0;
105 
117  virtual bool16 ActivateTextEditorView(IControlView* view,
118  const UIDRef& splineRef) const = 0;
119 
123  virtual const ITextSelectionAdornment* GetTextSelectionAdornment() const = 0;
124 
129  virtual IDialog* ShowCharacterAlternatesUI(const PMPoint& globalPt, const char* classForLogs) const = 0;
130 
134  virtual bool16 IsCharacterAlternatesUIShown() const = 0;
135 
140  virtual IControlView* GetCharacterAlternatesView() const = 0;
141 
144  virtual void CloseCharacterAlternatesUI() const = 0;
145 
150  virtual bool16 ShouldShowCharacterAlternatesUI(bool16 &isWordSelection, TextIndex &indexOfFirstCharWithAlt) const = 0;
151 
154  virtual ErrorCode FillWithPlaceHolderText(ITextModel* model) const = 0;
155 
160  virtual ErrorCode DeletePlaceHolderText(ITextModel* pModel, bool16 &deleted) const = 0;
161 
167  virtual void InsertAlternateForSelection(const ICharacterAlternatesData *alternatesData, const int32 &index) const = 0;
168 
173  virtual void ShowOpenTypeIcon()const = 0;
174 };
175 
176 #endif // __ITextEditorUtils__