Add renderer settings to VariablesViewNodeInfo.

This commit is contained in:
Rene Gollent
2013-04-16 21:18:59 -04:00
parent ba2c3d57f6
commit c819aef9a1
2 changed files with 19 additions and 2 deletions
@@ -21,7 +21,8 @@
VariablesViewNodeInfo::VariablesViewNodeInfo() VariablesViewNodeInfo::VariablesViewNodeInfo()
: :
fNodeExpanded(false), fNodeExpanded(false),
fCastedType(NULL) fCastedType(NULL),
fRendererSettings()
{ {
} }
@@ -29,7 +30,8 @@ VariablesViewNodeInfo::VariablesViewNodeInfo()
VariablesViewNodeInfo::VariablesViewNodeInfo(const VariablesViewNodeInfo& other) VariablesViewNodeInfo::VariablesViewNodeInfo(const VariablesViewNodeInfo& other)
: :
fNodeExpanded(other.fNodeExpanded), fNodeExpanded(other.fNodeExpanded),
fCastedType(other.fCastedType) fCastedType(other.fCastedType),
fRendererSettings(other.fRendererSettings)
{ {
if (fCastedType != NULL) if (fCastedType != NULL)
fCastedType->AcquireReference(); fCastedType->AcquireReference();
@@ -48,6 +50,7 @@ VariablesViewNodeInfo::operator=(const VariablesViewNodeInfo& other)
{ {
fNodeExpanded = other.fNodeExpanded; fNodeExpanded = other.fNodeExpanded;
SetCastedType(other.fCastedType); SetCastedType(other.fCastedType);
fRendererSettings = other.fRendererSettings;
return *this; return *this;
} }
@@ -72,6 +75,13 @@ VariablesViewNodeInfo::SetCastedType(Type* type)
} }
void
VariablesViewNodeInfo::SetRendererSettings(const BMessage& settings)
{
fRendererSettings = settings;
}
// #pragma mark - Key // #pragma mark - Key
@@ -7,6 +7,7 @@
#define VARIABLES_VIEW_STATE_H #define VARIABLES_VIEW_STATE_H
#include <Message.h>
#include <Referenceable.h> #include <Referenceable.h>
#include <util/OpenHashTable.h> #include <util/OpenHashTable.h>
@@ -35,9 +36,15 @@ public:
{ return fCastedType; } { return fCastedType; }
void SetCastedType(Type* type); void SetCastedType(Type* type);
const BMessage& GetRendererSettings() const
{ return fRendererSettings; }
void SetRendererSettings(const BMessage& settings);
private: private:
bool fNodeExpanded; bool fNodeExpanded;
Type* fCastedType; Type* fCastedType;
BMessage fRendererSettings;
}; };