InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CRenderingObjectDrawer.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: SusanCL
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 __CRenderingObjectDrawer__
25 #define __CRenderingObjectDrawer__
26 
27 #include "IRenderingObjectDrawer.h"
28 #include "CPMUnknown.h"
29 #include "InterfaceFontInfo.h"
30 
31 class CRenderingObjectDrawer : public CPMUnknown<IRenderingObjectDrawer>
32 {
33 public:
34 
35  enum
36  {
37  kRenderObjectSwatchStart = 4,
38  kSwatchNameStart = kRenderObjectSwatchStart + 3,
39  kIconInset = 3,
40  kSwatchesPanelIconWidth = 13,
41  };
42 
44  virtual ~CRenderingObjectDrawer( );
45 
46  virtual void DrawRenderObjectUI ( IViewPort* viewPort, IControlView* view, SysRgn updateRgn, PMRect frame ) const;
47  virtual void DrawRenderObjectUIName ( IGraphicsContext* gc, const InterfaceFontInfo& fontInfo, const PMRect& frame, const int16& alignment, const bool16& isHilited, const bool16& isEnabled) const;
48  virtual void DrawRenderObjectUISwatch ( IGraphicsPort* gPort, const PMRect& frame ) const;
49  virtual void DrawRenderObjectUIIcons ( IViewPort* viewPort, const SysRect& sysFrame, const bool16& brightnessAware = kTrue) const {};
50 
51 protected:
52  void DrawNoEditIcon ( IViewPort* viewPort, const SysRect& bbox, const bool16& brightnessAware = kTrue) const;
53  void DrawBackground ( IGraphicsPort* gPort, const IControlView* widget, const PMRect& frame, const bool16& isHilited, const bool16& bInsetHilite ) const;
54 };
55 
56 #endif // __CRenderingObjectDrawer__