![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2010 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtElementIDHierarchyAttributes.h,v $ $Revision: 1.2 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 #include <vrvCore/vrvCore.h> 00015 #include <vrvCore/DtUniqueID.h> 00016 #include <vrvCore/DtElementAttributes.h> 00017 00018 namespace makVrv 00019 { 00023 class DT_DLL_VRVCORE DtElementIDHierarchyState 00024 { 00025 public: 00026 typedef std::vector<DtElementID> ElementIDVector; 00027 00028 public: 00030 DtElementIDHierarchyState(); 00031 00033 DtElementIDHierarchyState(const DtElementIDHierarchyState& orig); 00034 00035 DtElementIDHierarchyState& operator=(const DtElementIDHierarchyState& rhs); 00036 00037 void setFlags(int flags); 00038 int flags() const; 00039 00040 void addChild(DtElementID id); 00041 00042 void removeChild(DtElementID id); 00043 00044 const ElementIDVector& children() const; 00045 00046 void setParentId(DtElementID id); 00047 DtElementID parentId() const; 00048 00049 protected: 00050 DtElementID myParentId; 00051 ElementIDVector myChildren; 00052 int myFlags; 00053 }; 00054 00055 AddTypeId(DtElementIDHierarchyState, 2424); 00056 00057 typedef DtUniqueElementAttribute<DtElementIDHierarchyState, 00058 DtElementAttributes::ElementIDHierarchyStateAttribute> 00059 DtElementIDHierarchyStateAttribute; 00060 #ifndef _WIN32 00061 template class DtUniqueElementAttribute<DtElementIDHierarchyState, 00062 DtElementAttributes::ElementIDHierarchyStateAttribute>; 00063 #endif 00064 00069 class DT_DLL_VRVCORE DtElementIDHierarchyDisplayState 00070 { 00071 public: 00072 enum DisplayState 00073 { 00074 Expand = 1, 00075 Collapse = 2, 00076 ExpandAll = 3, 00077 CollapseAll = 4 00078 }; 00079 }; 00080 00081 typedef DtUniqueElementAttribute<int, 00082 DtElementAttributes::ElementIDHierarchyDisplayStateAttribute> 00083 DtElementIDHierarchyDisplayStateAttribute; 00084 #ifndef _WIN32 00085 template class DtUniqueElementAttribute<int, 00086 DtElementAttributes::ElementIDHierarchyDisplayStateAttribute>; 00087 #endif 00088 }