InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGalleyTextNavigationSuite.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Ben Park
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 __IGalleyTextNavigationSuite__
25 #define __IGalleyTextNavigationSuite__
26 
27 #include "IPMUnknown.h"
28 #include "ICTextNavigationSuite.h" // For TextSelectionIndex
29 
30 #include "UIDRef.h"
31 #include "WritingModeUIID2.h"
32 
33 /*
34  This sucker is used for navigating the Galley Text. The big table below was copied from
35  ITextSelectionNavigator, and it's a list of keyboard shortcuts that can be used.
36  I'll modify it as new stuff is added. Of course, this can be used w/o keyboard shortcuts
37  (ex. triple click will select a paragraph).
38 
39  No. Shortcut Unit Direction Type Mac OS Windows
40  ======================================================================================================
41  699 Move to the right one character kChar kNext replace Right arrow Right arrow
42  700 Move to the left one character kChar kPrev replace Left arrow Left arrow
43  701 Move up one line kLine kPrev replace Up arrow Up arrow
44  702 Move down one line kLine kNext replace Down arrow Down arrow
45  703 Move to the right one word kWord kNext replace Cmd + Right Arrow Ctrl + Right Arrow
46  704 Move to the left one word kWord kPrev replace Cmd + Left Arrow Ctrl + Left Arrow
47  705 Move to the start of the line kLine kStart replace Home Home
48  706 Move to the end of the line kLine kEnd replace End End
49  707 Move to the previous para kPara kPrev replace Cmd + Up Arrow Ctrl + Up Arrow
50  708 Move to the next para kPara kNext replace Cmd + Down Arrow Ctrl + Down Arrow
51  709 Move to end of story kStory kEnd replace Cmd + End Ctrl + End
52  710 Move to begining of story kStory kStart replace Cmd + Home Ctrl + Home
53  712 Select word kWord kAll replace Double Click Double Click
54  713 Select one character to the right kChar kNext expand Shift + Right Arrow Shift + Right Arrow
55  714 Select one character to the left kChar kPrev expand Shift + Left Arrow Shift + Left Arrow
56  715 Select one word to the right kWord kNext expand Cmd + Shift + Right Arrow Ctrl + Shift + Right Arrow
57  716 Select one word to the left kWord kPrev expand Cmd + Shift + Left Arrow Ctrl + Shift + Left Arrow
58  717 Select to the start of the line kLine kStart expand Shift + Home Shift + Home
59  718 Select to the end of the line kLine kEnd expand Shift + End Shift + End
60  719 Select one line above kLine kPrev expand Shift + Up Arrow Shift + Up Arrow
61  720 Select one line below kLine kNext expand Shift + Down Arrow Shift + Down Arrow
62  721 Select one paragraph before kPara kPrev expand Cmd + Shift + Up Arrow Ctrl + Shift + Up Arrow
63  722 Select one paragraph forward kPara kPrev expand Cmd + Shift + Down Arrow Ctrl + Shift + Down Arrow
64  723 Select all chars. in story kStory kAll expand Cmd + A Ctrl + A
65  724 Select chars. from insertion point kChar kAll expand Shift + Click Shift + Click
66  725 Select to end of story kStory kEnd expand Cmd + Shift + End Ctrl + Shift + End
67  726 Select to beginning of story kStory kStart expand Cmd + Shift + Home Ctrl + Shift + Home
68 */
69 
72 {
73 public:
74  enum { kDefaultIID = IID_IGALLEYTEXTNAVIGATIONSUITE };
75 
77  enum Units {
90  };
91 
93  enum Direction {
104  };
105 
114  virtual bool16 SetTextSelection( TextSelectionIndex nStart, TextSelectionIndex nEnd, bool16 endUsedLast = kTrue, bool16 drawIt = kFalse ) = 0;
115 
119  virtual bool16 SelectAll ( bool16 drawIt = kFalse) = 0;
120 
128  virtual bool16 MoveTextSelection ( TextSelectionIndex nTo = kInvalidTextSelectionIndex, bool16 drawIt = kFalse, Units nUnits = kNone, Direction nDirection = kNext ) = 0;
129 
137  virtual bool16 ExpandTextSelection ( TextSelectionIndex nTo = kInvalidTextSelectionIndex, bool16 drawIt = kFalse, Units nUnits = kNone, Direction nDirection = kNext ) = 0;
138 
144  virtual bool16 ScrollViewToSelection ( TextSelectionIndex nStart, TextSelectionIndex nEnd ) = 0;
145 
147  virtual void Reset () = 0;
148 
149  // These functins allow outside users to get the relevant Text Nav Data. The factors tracked here are:
150  // Last up/down position
151  // Anchor point
152  // Start/end indexes end of line data
153 
158  virtual void GetAnchorData ( TextSelectionIndex *anchorIndex, bool16 *usedEndLast ) = 0;
159 // virtual void GetEndOfLineData ( bool16 *startAtEndOfLine, bool16 *endAdEndOfLine ) = 0;
160 
161 
162 };
163 
164 
165 #endif // __IGalleyTextNavigationSuite__