InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPageItemControlData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
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 // IPageItemControlData is an interface of the PageItemWidget. It contains one or more
24 // PageItems that are supported by the PageItemWidget: Add/Remove/Clear/Query/GetPageitem*.
25 // If IsDrawContent() is true the PageItemWidgetControlView will draw its content.
26 // The ItemID is the PMIID that identifies the supported pageitems.
27 //
28 //========================================================================================
29 
30 #ifndef __IPageItemControlData__
31 #define __IPageItemControlData__
32 
33 #include "IPMUnknown.h"
34 #include "widgetid.h"
35 
36 class IGeometry;
37 
38 //========================================================================================
39 // CLASS IPageItemControlData
40 //========================================================================================
41 
43 {
44 public:
45  enum { kDefaultIID = IID_IPAGEITEMCONTROLDATA };
46 
47  // --- multiple pageitem
48  virtual bool16 AddPageItem( IGeometry *pItem ) = 0;
49  virtual bool16 RemovePageItem( IGeometry *pItem ) = 0;
50  virtual void ClearPageItems() = 0;
51  virtual int32 GetPageItemCount() const = 0;
52  virtual IGeometry * QueryNthPageItem( int32 nIndex ) = 0;
53  virtual UID GetNthPageItemUID( int32 nIndex ) const = 0;
54 
55  // --- If IsDrawContent() is true the PageItemWidgetControlView will draw its content
56  virtual bool16 IsDrawContent() const = 0;
57  virtual void SetDrawContent( bool16 bDraw ) = 0;
58 
59  // --- The ItemID is the PMIID that identifies the supported pageitems (default: IID_IGEOMETRY)
60  virtual const PMIID& GetItemID() const = 0;
61  virtual void SetItemID( const PMIID& nId ) = 0;
62 
63  // --- returns true if our widget is a child of the Layout.
64  virtual bool16 IsChildOfLayout() const = 0;
65 
66 #ifdef DEBUG
67  // --- the Widget's debug mode: click the pageitem with pressed Control-Command-keys
68  virtual bool16 IsInDebugMode() const = 0;
69  virtual void SetDebugMode( bool16 bNew ) = 0;
70 #endif
71 };
72 
73 #endif