InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IStringListControlData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Michael Burbidge
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 __IStringListControlData_h__
25 #define __IStringListControlData_h__
26 
27 #include "IPMUnknown.h"
28 #include "PMString.h"
29 #include "widgetid.h"
30 
31 //========================================================================================
32 // CLASS IStringListControlData
35 //========================================================================================
36 
38 {
39 public:
40 
41  enum { kDefaultIID = IID_ISTRINGLISTCONTROLDATA }; // for UseDefaultIID()
42 
43  // ----- Constants -----
45  enum {
47  kBeginning = 0,
49  kEnd = -2,
52  };
53 
54  // ----- List maintainence -----
62  virtual void AddString(const PMString& newString, int32 at = kEnd, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
63 
70  virtual void RemoveString(int32 index, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
71 
77  virtual void Clear(bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
78 
80  virtual PMString GetString(int32 index) const = 0;
81 
89  virtual void SetString(int32 index, const PMString& replaceString, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
90 
97  virtual int32 GetIndex(const PMString& string, bool16 skipIfDisabled = kFalse) const = 0;
98 
106  virtual int32 GetIndexOfPartialString(const PMString& stringBeginning, bool16 caseSensitive, bool16 skipIfDisabled = kFalse) const = 0;
107 
109  virtual int32 Length() const = 0;
110 
111  // Enable/Disable
119  virtual void Enable(int32 index, bool16 doEnable = kTrue, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
120 
127  virtual void Disable(int32 index, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
128 
130  virtual bool16 IsEnabled(int32 index) const = 0;
131 };
132 
133 #endif