InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CPanelBasedXMLGenerator.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Dave Burnard
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 // A base implementation of IXMLGenerator for panels involved in palette workspaces
24 // Handles common implementation of panels, kits and control sets.
25 //
26 //========================================================================================
27 
28 #ifndef __CPanelBasedXMLGenerator__
29 #define __CPanelBasedXMLGenerator__
30 
31 #include "CXMLGenerator.h"
32 #include "IControlView.h"
33 #include "IXMLOutStream.h"
34 #include "PaletteRef.h"
35 
36 class IKit;
37 
38 #ifdef WIDGET_BUILD
39 #endif
40 
51 {
52  typedef CXMLGenerator inherited;
53 
54 public:
56  virtual ~CPanelBasedXMLGenerator();
57 
60  virtual bool16 ShouldPanelBePersisted(IControlView* panel);
61 
63  virtual void GeneratePanelBeginTag(IXMLOutStream *s, IControlView* panel);
64 
66  virtual void GeneratePanelContents(IXMLOutStream *s, IControlView* panel);
67 
69  virtual void GeneratePanelEndTag(IXMLOutStream *s, IControlView* panel);
70 
71 protected:
72 
75 
77  virtual void GenerateControlSet(IXMLOutStream *s, IKit* panelKit);
78 
80  void PushBool(IXMLOutStream::AttributeList& attrs, const PMString& name, bool16 theBool);
82  void PushInt(IXMLOutStream::AttributeList& attrs, const PMString& name, int32 theInt);
84  void PushString(IXMLOutStream::AttributeList& attrs, const PMString& name, const PMString& value);
85 };
86 
87 
88 #endif //BasePaletteXMLGenerator