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 
23 class BM_OpHandleLink;
24 
26 {
27 public:
28  const UT_String &getName() const;
29  void setName(const char *name);
30 
31  const UT_String &getPaneMask() const;
32  void setPaneMask(const char *mask);
33 
34  bool getExpose() const;
35  void setExpose(bool expose);
36 
37  bool getDisplayInParent() const;
38  void setDisplayInParent(bool display);
39  bool getDisplayInChild() const;
40  void setDisplayInChild(bool display);
41  bool getDisplayInSibling() const;
42  void setDisplayInSibling(bool display);
43  bool getDisplayAlways() const;
44  void setDisplayAlways(bool display);
45 
46  // This allows people to extract the BM handle link which owns this
47  // persistent PI. The OHLPersistent is never the MPI or IMP you
48  // eventually define, but is owned by it. However, the PI_Manager
49  // only has a list of OHLs. Thus this suspicious upcast.
50  void setBMOwner(BM_OpHandleLink *bmowner)
51  { myBMOwner = bmowner; }
52  BM_OpHandleLink *getBMOwner() const { return myBMOwner; }
53 
54  virtual void setActiveColor(const UT_Color &c);
55 
56  const PI_SettingList &getSettingList() const { return mySettingList; }
57  PI_SettingList &getSettingList() { return mySettingList; }
58  void setSettings(const char *setting_string);
59  void clearSettingList() { mySettingList.clear(); }
60 
61  virtual int setEqual(const PI_OpHandleLink &pi);
62 
63 protected:
64  virtual void handleOpChange(OP_Node *op, OP_EventType etype,
65  void *data);
66 
67 private:
68  PI_OHLPersistent(PI_Manager *manager, const char *name,
69  const PI_PITemplate &templ);
70  virtual ~PI_OHLPersistent();
71 
72  PI_Manager *myManager;
73  UT_String myName;
74  UT_String myPaneMask;
75  bool myExpose;
76 
77  bool myNetDisplayInParent;
78  bool myNetDisplayInChild;
79  bool myNetDisplayInSibling;
80  bool myNetDisplayAlways;
81 
82  PI_SettingList mySettingList;
83 
84  BM_OpHandleLink *myBMOwner;
85 
86  friend class PI_Manager;
87 };
88 
89 #endif
90 
GLint GLuint mask
Definition: glcorearb.h:123
#define PI_API
Definition: PI_API.h:10
GLboolean * data
Definition: glcorearb.h:130
GLuint const GLchar * name
Definition: glcorearb.h:785
BM_OpHandleLink * getBMOwner() const
void setBMOwner(BM_OpHandleLink *bmowner)
PI_SettingList & getSettingList()
OP_EventType
Definition: OP_Value.h:22
const PI_SettingList & getSettingList() const