InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
INavigationPoints.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: wtislar
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 __INavigationPoints__
25 #define __INavigationPoints__
26 
27 #include "IPMUnknown.h"
28 #include "MediaID.h"
29 
31 
50 {
51 
52 public:
53  enum { kDefaultIID = IID_INAVIGATIONPOINTS };
54 
55  enum { kInvalidTime = 0xffffffff };
56  enum { kInvalidNavigationPointId = 0xffffffff };
57 
59 
62  {
63  public:
64 
66  : fId(kInvalidNavigationPointId), fTime(kInvalidTime) {}
67 
68  NavigationPoint( uint32 id, const PMString & displayName, uint32 time )
69  : fId(id),
70  fDisplayName(displayName),
71  fTime(time){}
72 
74  NavigationPoint( const NavigationPoint& orig ) { Set( orig ); }
75 
76  //----------OPERATORS---------------
77 
80  { Set(copy); return *this; }
81 
83  inline bool operator == (const NavigationPoint &np) const
84  { return fId == np.fId &&
85  fDisplayName == np.fDisplayName &&
86  fTime == np.fTime; }
87 
89  inline bool operator != (const NavigationPoint &np) const
90  { return (!(*this == np)); }
91 
93  uint32 fId; // Identifier unique to the list.
94  PMString fDisplayName; // Name to display in the UI.
95  uint32 fTime; // A video time in 1/100s seconds.
96 
97  private:
98  void Set( const NavigationPoint & copy )
99  { fId = copy.fId; fDisplayName = copy.fDisplayName; fTime = copy.fTime; }
100  }; // end NavigationPoint class
101 
102 
109  virtual int32 AddPoint( uint32 time, bool16 atEnd = kFalse ) = 0;
110 
115  virtual bool CanRemovePoint( int32 indexAt ) const = 0;
116 
121  virtual bool DoesNavigationPointExist( uint32 navPointID ) const = 0;
122 
128  virtual bool GetDisplayName( uint32 navPointID, PMString & outDisplayName ) const = 0;
129 
134  virtual bool GetNavigationPointById( uint32 navPointID, INavigationPoints::NavigationPoint & outNavPoint ) const = 0;
135 
144  virtual bool GetNextNavigationPoint( INavigationPoints::NavigationPoint & outNavPoint ) = 0;
145 
151  virtual bool GetNthNavigationPoint( uint32 index, INavigationPoints::NavigationPoint & outNavPoint ) const = 0;
152 
158  virtual bool GetNthNavigationPointTime( uint32 index, PMReal & outTime ) const = 0;
159 
163  virtual uint32 GetNumberOfNavigationPoints() const = 0;
164 
169  virtual uint32 GetTime( uint32 navPointID ) const = 0;
170 
177  virtual ErrorCode RemovePoints( const INavigationPoints::NavigationPointsIndexList & indexList ) = 0;
178 
182  virtual void ResetIterator() = 0;
183 
189  virtual ErrorCode SetDisplayName( uint32 navPointID, const PMString & inDisplayName ) = 0;
190 
197  virtual ErrorCode SetTime( uint32 navPointID, PMReal time ) = 0;
198 
200  virtual ErrorCode ResetId( uint32 oldNavPointID, uint32 newNavPointID ) = 0;
201 
208  virtual ErrorCode AddPoints( NamedUint32AttributeList & list ) = 0;
209 
210 }; // end INavigationPoints interface
211 
212 
213 #endif // __INavigationPoints__