InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGridListController.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Tom Taylor
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 __IGridListController__
25 #define __IGridListController__
26 
27 #include "IPMUnknown.h"
28 #include "IControlView.h"
29 
30 // Some List Constants
31 
32 const int16 kGridListTopAutoScrollSlop = 4; // area below top of list that we autoscroll the list in while dragging
33 
35 {
36 public:
37  // ----- Item selection -----
38 
39 
40  virtual void SetClickItem(int32 itemNumber) = 0;
41  // Set the item number of the last item clicked on
42 
43  virtual int32 GetClickItem() const = 0;
44  // Return the item number of the last item clicked, or -1 for no item
45 
46  virtual int32 FindItemHit(const PMPoint& clickPoint, bool16& hitOnLeft) = 0;
47  // Given a point, FindItemHit returns the item index under the point,
48  // Also hitOnLeft returns kTrue if hit on left side.
49  // Otherwise if hit on right, it returns kFalse.
50 
51  virtual void ScrollItemIntoView(int32 itemNumber) = 0;
52  // automatically scroll the list so that item "itemNumber" is visible
53 
54  virtual int32 GetFirstVisibleItem() const = 0;
55  // returns the zero based index of the first visible item at the top of the list box
56 
57  virtual int32 GetMaximumVisibleItems() const = 0;
58  // returns the numbers of "slots" completely visible in the list box
59 
60  virtual int32 FindFirstContinousSelectionBlock(int32& firstIndex) = 0;
61  // Find the first contiguous selection block. firstIndex returns the first
62  // index in the selection block. The method returns the last index in this
63  // selection block. If only one item is selected, then last index == firstIndex.
64 
65  virtual int32 Search(const PMString& subString) const = 0;
66  // Search first looks through all the items of the list looking for
67  // an item that has a name that begins with "subString." If such an
68  // item is found, the index of the item is returned. If no item is found,
69  // this function then looks for an item that has a name that *contains*
70  // "subString." If such an item is found, the index of the item is
71  // returned. If no item is found, Search returns -1. Typically, subclassers
72  // much override this function because only they know how to interpret
73  // their list control data or widget hierarchy stored in the list. By
74  // default, this function always returns -1.
75 
76  virtual PMString GetNthItemString(int32 n) const = 0;
77 
78 
79 };
80 
81 #endif