00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Side Effects Software Inc 00008 * 477 Richmond Street West 00009 * Toronto, Ontario 00010 * Canada M5V 3E7 00011 * 416-504-9876 00012 * 00013 * NAME: PI_OHLPersistent.h.h ( PI Library, C++) 00014 * 00015 * COMMENTS: 00016 * 00017 * Abstraction for a persistent PI. 00018 */ 00019 00020 #ifndef __PI_OHLPersistent__ 00021 #define __PI_OHLPersistent__ 00022 00023 #include "PI_API.h" 00024 #include <OP/OP_Value.h> 00025 #include "PI_OpHandleLink.h" 00026 #include "PI_SettingList.h" 00027 00028 class PI_Manager; 00029 00030 class BM_OpHandleLink; 00031 00032 class PI_API PI_OHLPersistent : public PI_OpHandleLink 00033 { 00034 public: 00035 const UT_String &getName() const; 00036 void setName(const char *name); 00037 00038 const UT_String &getPaneMask() const; 00039 void setPaneMask(const char *mask); 00040 00041 bool getExpose() const; 00042 void setExpose(bool expose); 00043 00044 bool getDisplayInParent() const; 00045 void setDisplayInParent(bool display); 00046 bool getDisplayInChild() const; 00047 void setDisplayInChild(bool display); 00048 bool getDisplayInSibling() const; 00049 void setDisplayInSibling(bool display); 00050 00051 // This allows people to extract the BM handle link which owns this 00052 // persistent PI. The OHLPersistent is never the MPI or IMP you 00053 // eventually define, but is owned by it. However, the PI_Manager 00054 // only has a list of OHLs. Thus this suspicious upcast. 00055 void setBMOwner(BM_OpHandleLink *bmowner) 00056 { myBMOwner = bmowner; } 00057 BM_OpHandleLink *getBMOwner() const { return myBMOwner; } 00058 00059 virtual void setActiveColor(const UT_Color &c); 00060 00061 const PI_SettingList &getSettingList() const { return mySettingList; } 00062 PI_SettingList &getSettingList() { return mySettingList; } 00063 void setSettings(const char *setting_string); 00064 void clearSettingList() { mySettingList.clear(); } 00065 00066 virtual int setEqual(const PI_OpHandleLink &pi); 00067 00068 protected: 00069 virtual void handleOpChange(OP_Node *op, OP_EventType etype, 00070 void *data); 00071 00072 private: 00073 PI_OHLPersistent(PI_Manager *manager, const char *name, 00074 const PI_PITemplate &templ); 00075 virtual ~PI_OHLPersistent(); 00076 00077 PI_Manager *myManager; 00078 UT_String myName; 00079 UT_String myPaneMask; 00080 bool myExpose; 00081 00082 bool myNetDisplayInParent; 00083 bool myNetDisplayInChild; 00084 bool myNetDisplayInSibling; 00085 00086 PI_SettingList mySettingList; 00087 00088 BM_OpHandleLink *myBMOwner; 00089 00090 friend class PI_Manager; 00091 }; 00092 00093 #endif 00094
1.5.9