InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IInCopyDocUserList.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Kevin Van Wiel
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 __IInCopyDocUserList__
25 #define __IInCopyDocUserList__
26 
27 #include "IPMUnknown.h"
28 
29 #include "InCopySharedID.h"
30 
31 class PMString;
32 
33 
34 
42 {
43 public:
44  enum { kDefaultIID = IID_IINCOPYDOCUSERLIST };
45 
46  // Append a user to the list
47  virtual void AppendUser(const PMString & userName, int32 userColor) = 0;
48 
49  // Methods to search list for a specific user
50  virtual PMString GetUserNameByIndex(int32 index) = 0;
51  virtual int32 FindUserByName(const PMString& userName) = 0;
52 
53  virtual int32 GetUserColorIndex(int32 index) = 0;
54  virtual int32 GetUserColorIndex(const PMString& userName) = 0;
55 
56  // Gets the unique user color
57  virtual int32 GetUniqueUserColorIndex(int32 index) = 0;
58  virtual int32 GetUniqueUserColorIndex(const PMString& userName) = 0;
59 
60  // Replace an attribute in the list.
61  virtual void ReplaceColorIndex(const PMString& userName, int32 newColorIndex) = 0;
62  virtual void ReplaceColorIndex(const int32 userIndex, int32 newColorIndex) = 0;
63 
64  // Delete a specified user from the list. Returns true if successful.
65  virtual bool DeleteUser(int32 index) = 0;
66  virtual bool DeleteUser(const PMString& userName) = 0;
67 
68  // Return the number of users in the list.
69  virtual int32 GetUserCount() const = 0;
70 
71  // Get the name of the current user in the list. The actual current user name
72  // is stored as a document preference this method reads the preference and
73  // finds the corespondins id to match it in this list.
74  // @param added return KTrue if current user is new added, this is for the CreateUserCmd undo purpose
75  virtual PMString GetCurrentUser(bool16 * added = nil) = 0;
76 
77  // Set the User Name
78  virtual void SetUserName(const PMString& oldUserName, const PMString& newUserName) = 0;
79  virtual void SetUserName(const int32 userIndex, const PMString& newUserName) = 0;
80 };
81 
82 #endif // __IInCopyDocUserList__