HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PI_OHLPersistent.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: PI_OHLPersistent.h.h ( PI Library, C++)
7  *
8  * COMMENTS:
9  *
10  * Abstraction for a persistent PI.
11  */
12 
13 #ifndef __PI_OHLPersistent__
14 #define __PI_OHLPersistent__
15 
16 #include "PI_API.h"
17 #include <OP/OP_Value.h>
18 #include "PI_OpHandleLink.h"
19 #include "PI_SettingList.h"
20 
21 class PI_Manager;
22 
24 {
25 public:
26  const UT_String &getName() const;
27  void setName(const char *name);
28 
29  const UT_String &getPaneMask() const;
30  void setPaneMask(const char *mask);
31 
32  bool getExpose() const;
33  void setExpose(bool expose);
34 
35  bool getDisplayInParent() const;
36  void setDisplayInParent(bool display);
37  bool getDisplayInChild() const;
38  void setDisplayInChild(bool display);
39  bool getDisplayInSibling() const;
40  void setDisplayInSibling(bool display);
41  bool getDisplayAlways() const;
42  void setDisplayAlways(bool display);
43 
44  // Accessor to the PI handle link which owns this persistent PI.
45  // The OHLPersistent is never the MPI or IMP you eventually define,
46  // but is owned by it. However, the PI_Manager only has a list
47  // of OHLs.
48  void setPIOwner(PI_OpHandleLink *piowner)
49  { myPIOwner = piowner; }
50  PI_OpHandleLink *getPIOwner() const { return myPIOwner; }
51 
52  void setActiveColor(const UT_Color &c) override;
53 
54  const PI_SettingList &getSettingList() const { return mySettingList; }
55  PI_SettingList &getSettingList() { return mySettingList; }
56  void setSettings(const char *setting_string);
57  void clearSettingList() { mySettingList.clear(); }
58 
59  int setEqual(const PI_OpHandleLink &pi) override;
60 
61 protected:
62  void handleOpChange(OP_Node *op, OP_EventType etype,
63  void *data) override;
64 
65 private:
66  PI_OHLPersistent(PI_Manager *manager, const char *name,
67  const PI_PITemplate &templ);
68  ~PI_OHLPersistent() override;
69 
70  PI_Manager *myManager;
71  UT_String myName;
72  UT_String myPaneMask;
73  bool myExpose;
74 
75  bool myNetDisplayInParent;
76  bool myNetDisplayInChild;
77  bool myNetDisplayInSibling;
78  bool myNetDisplayAlways;
79 
80  PI_SettingList mySettingList;
81 
82  PI_OpHandleLink *myPIOwner;
83 
84  friend class PI_Manager;
85 };
86 
87 #endif
88 
#define PI_API
Definition: PI_API.h:10
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
GLint GLuint mask
Definition: glcorearb.h:124
void setPIOwner(PI_OpHandleLink *piowner)
GLuint const GLchar * name
Definition: glcorearb.h:786
PI_SettingList & getSettingList()
OP_EventType
Definition: OP_Value.h:22
constexpr T pi()
Pi constant taken from Boost to match old behaviour.
Definition: Math.h:119
const PI_SettingList & getSettingList() const
Definition: format.h:895
PI_OpHandleLink * getPIOwner() const