InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextPanelData.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 
24 #ifndef __ITextPanelData__
25 #define __ITextPanelData__
26 
27 #include "IPMUnknown.h"
28 #include "IDialog.h"
29 
30 //----------------------------------------------------------------------------------------
31 // Class ITextPanelData
32 //----------------------------------------------------------------------------------------
33 
34 // Query for IID_ITEXTPANELDATA which is defined in TextPanelID.h.
35 
39 class ITextPanelData : public IPMUnknown
40 {
41 public:
42  virtual RsrcID GetTextResourceID() const = 0;
43  virtual void SetTextResourceID( RsrcID rsrcID ) = 0;
44  virtual PluginID GetTextResourcePluginID() const = 0;
45  virtual void SetTextResourcePluginID( const PluginID& pluginID ) = 0;
46 
47  virtual void SetTextDialogType( IDialog::DialogType dialogType ) = 0;
48  virtual IDialog::DialogType GetTextDialogType() const = 0;
49  virtual RsrcID GetTextSelectableID() const = 0;
50  virtual void SetTextSelectableID( RsrcID rsrcID ) = 0;
51 };
52 
53 //----------------------------------------------------------------------------------------
54 // CREATE_TEXTPANEL_DATA macro
55 //----------------------------------------------------------------------------------------
56 
57 #define CREATE_TEXTPANEL_DATA( TheName, TheRsrcID, TheSelRsrcID, TheRsrcPluginID, TheDialogType ) \
58  class TheName : public ITextPanelData \
59  { \
60  public: \
61  inline TheName(IPMUnknown *boss) : HELPER_METHODS_INIT( boss ) { fRsrcID = TheRsrcID; fSelRsrcID = TheSelRsrcID; fRsrcPluginID = TheRsrcPluginID; fDlgType = TheDialogType; } \
62  protected: \
63  virtual RsrcID GetTextResourceID() const { return fRsrcID; } \
64  virtual PluginID GetTextResourcePluginID() const { return fRsrcPluginID; } \
65  virtual IDialog::DialogType GetTextDialogType() const { return fDlgType; } \
66  virtual void SetTextResourceID( RsrcID rsrcID ) { fRsrcID = rsrcID; } \
67  virtual void SetTextResourcePluginID( const PluginID& pluginID ) { fRsrcPluginID = pluginID; } \
68  virtual void SetTextDialogType( IDialog::DialogType dialogType ) { fDlgType = dialogType; } \
69  virtual RsrcID GetTextSelectableID() const { return fSelRsrcID; } \
70  virtual void SetTextSelectableID( RsrcID rsrcID ) { fSelRsrcID = rsrcID; } \
71  private: \
72  RsrcID fRsrcID; \
73  PluginID fRsrcPluginID; \
74  IDialog::DialogType fDlgType; \
75  RsrcID fSelRsrcID; \
76  \
77  }; \
78  DEFINE_HELPER_METHODS( TheName )
79 
80 #endif