1d315bfd5SIngo Weinhold/*
2d315bfd5SIngo Weinhold * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
377007502SRene Gollent * Copyright 2011-2018, Rene Gollent, rene@gollent.com.
4d315bfd5SIngo Weinhold * Distributed under the terms of the MIT License.
5d315bfd5SIngo Weinhold */
6d315bfd5SIngo Weinhold
7d315bfd5SIngo Weinhold
8d315bfd5SIngo Weinhold#include "VariablesView.h"
9d315bfd5SIngo Weinhold
10d315bfd5SIngo Weinhold#include <new>
11d315bfd5SIngo Weinhold
122a2e3bafSRene Gollent#include <debugger.h>
132a2e3bafSRene Gollent
14692d2db5SRene Gollent#include <Alert.h>
15473a74f7SRene Gollent#include <Clipboard.h>
1659ea286fSIngo Weinhold#include <Looper.h>
1759ea286fSIngo Weinhold#include <PopUpMenu.h>
182216ccb7SRene Gollent#include <ToolTip.h>
1959ea286fSIngo Weinhold
2059ea286fSIngo Weinhold#include <AutoDeleter.h>
21da4d62dbSIngo Weinhold#include <AutoLocker.h>
22e8cdcedeSRene Gollent#include <PromptWindow.h>
23da4d62dbSIngo Weinhold
24d315bfd5SIngo Weinhold#include "table/TableColumns.h"
25d315bfd5SIngo Weinhold
260712121cSRene Gollent#include "ActionMenuItem.h"
2710ba3348SRene Gollent#include "AppMessageCodes.h"
28d315bfd5SIngo Weinhold#include "Architecture.h"
29b7e72db3SRene Gollent#include "ExpressionInfo.h"
30b7e72db3SRene Gollent#include "ExpressionValues.h"
317b74c566SRene Gollent#include "FileSourceCode.h"
327b74c566SRene Gollent#include "Function.h"
33e8e4e613SIngo Weinhold#include "FunctionID.h"
34e8e4e613SIngo Weinhold#include "FunctionInstance.h"
35f4b1ddb5SIngo Weinhold#include "GuiSettingsUtils.h"
3659ea286fSIngo Weinhold#include "MessageCodes.h"
37920576bbSRene Gollent#include "RangeList.h"
38666222d3SRene Gollent#include "Register.h"
3959ea286fSIngo Weinhold#include "SettingsMenu.h"
407b74c566SRene Gollent#include "SourceLanguage.h"
417b74c566SRene Gollent#include "StackTrace.h"
42d315bfd5SIngo Weinhold#include "StackFrame.h"
43da4d62dbSIngo Weinhold#include "StackFrameValues.h"
44b4a86113SRene Gollent#include "StringUtils.h"
45b4a86113SRene Gollent#include "StringValue.h"
46b7e72db3SRene Gollent#include "SyntheticPrimitiveType.h"
47d88d941cSRene Gollent#include "TableCellValueEditor.h"
4859ea286fSIngo Weinhold#include "TableCellValueRenderer.h"
49da4d62dbSIngo Weinhold#include "Team.h"
50e8cdcedeSRene Gollent#include "TeamDebugInfo.h"
51da4d62dbSIngo Weinhold#include "Thread.h"
526e72ebfcSIngo Weinhold#include "Tracing.h"
53da4d62dbSIngo Weinhold#include "TypeComponentPath.h"
5477007502SRene Gollent#include "TypeHandler.h"
5577007502SRene Gollent#include "TypeHandlerMenuItem.h"
5659ea286fSIngo Weinhold#include "TypeHandlerRoster.h"
57e8cdcedeSRene Gollent#include "TypeLookupConstraints.h"
58920576bbSRene Gollent#include "UiUtils.h"
5959ea286fSIngo Weinhold#include "Value.h"
6059ea286fSIngo Weinhold#include "ValueHandler.h"
6159ea286fSIngo Weinhold#include "ValueHandlerRoster.h"
6217ef26a9SRene Gollent#include "ValueLocation.h"
6359ea286fSIngo Weinhold#include "ValueNode.h"
6413c04a36SRene Gollent#include "ValueNodeManager.h"
65d315bfd5SIngo Weinhold#include "Variable.h"
66d88d941cSRene Gollent#include "VariableEditWindow.h"
6759ea286fSIngo Weinhold#include "VariableValueNodeChild.h"
68e8e4e613SIngo Weinhold#include "VariablesViewState.h"
69e8e4e613SIngo Weinhold#include "VariablesViewStateHistory.h"
70d315bfd5SIngo Weinhold
71d315bfd5SIngo Weinhold
72e82b4941SIngo Weinholdenum {
73e82b4941SIngo Weinhold	VALUE_NODE_TYPE	= 'valn'
74e82b4941SIngo Weinhold};
75e82b4941SIngo Weinhold
76aa069e23SRene Gollent
77aa069e23SRene Gollentenum {
78657d2740SRene Gollent	MSG_MODEL_NODE_HIDDEN			= 'monh',
79657d2740SRene Gollent	MSG_VALUE_NODE_NEEDS_VALUE		= 'mvnv',
80b7e72db3SRene Gollent	MSG_RESTORE_PARTIAL_VIEW_STATE	= 'mpvs',
81b7e72db3SRene Gollent	MSG_ADD_WATCH_EXPRESSION		= 'awex',
8277007502SRene Gollent	MSG_REMOVE_WATCH_EXPRESSION		= 'rwex',
8377007502SRene Gollent	MSG_USE_AUTOMATIC_HANDLER		= 'uaha',
8477007502SRene Gollent	MSG_USE_EXPLICIT_HANDLER		= 'ueha'
85aa069e23SRene Gollent};
86aa069e23SRene Gollent
87aa069e23SRene Gollent
8873268865SIngo Weinhold// maximum number of array elements to show by default
8973268865SIngo Weinholdstatic const uint64 kMaxArrayElementCount = 10;
9073268865SIngo Weinhold
91e82b4941SIngo Weinhold
92b7e72db3SRene Gollent// #pragma mark - FunctionKey
93b7e72db3SRene Gollent
94b7e72db3SRene Gollent
95b7e72db3SRene Gollentstruct VariablesView::FunctionKey {
96b7e72db3SRene Gollent	FunctionID*			function;
97b7e72db3SRene Gollent
98b7e72db3SRene Gollent	FunctionKey(FunctionID* function)
99b7e72db3SRene Gollent		:
100b7e72db3SRene Gollent		function(function)
101b7e72db3SRene Gollent	{
102b7e72db3SRene Gollent	}
103b7e72db3SRene Gollent
104b7e72db3SRene Gollent	uint32 HashValue() const
105b7e72db3SRene Gollent	{
106b7e72db3SRene Gollent		return function->HashValue();
107b7e72db3SRene Gollent	}
108b7e72db3SRene Gollent
109b7e72db3SRene Gollent	bool operator==(const FunctionKey& other) const
110b7e72db3SRene Gollent	{
111b7e72db3SRene Gollent		return *function == *other.function;
112b7e72db3SRene Gollent	}
113b7e72db3SRene Gollent};
114b7e72db3SRene Gollent
115b7e72db3SRene Gollent
116b7e72db3SRene Gollent// #pragma mark - ExpressionInfoEntry
117b7e72db3SRene Gollent
118b7e72db3SRene Gollent
119b7e72db3SRene Gollentstruct VariablesView::ExpressionInfoEntry : FunctionKey, ExpressionInfoList {
120b7e72db3SRene Gollent	ExpressionInfoEntry* next;
121b7e72db3SRene Gollent
122b7e72db3SRene Gollent	ExpressionInfoEntry(FunctionID* function)
123b7e72db3SRene Gollent		:
124b7e72db3SRene Gollent		FunctionKey(function),
125b7e72db3SRene Gollent		ExpressionInfoList(10, false)
126b7e72db3SRene Gollent	{
127b7e72db3SRene Gollent		function->AcquireReference();
128b7e72db3SRene Gollent	}
129b7e72db3SRene Gollent
130b7e72db3SRene Gollent	~ExpressionInfoEntry()
131b7e72db3SRene Gollent	{
132b7e72db3SRene Gollent		_Cleanup();
133b7e72db3SRene Gollent	}
134b7e72db3SRene Gollent
135b7e72db3SRene Gollent	void SetInfo(const ExpressionInfoList& infoList)
136b7e72db3SRene Gollent	{
137b7e72db3SRene Gollent		_Cleanup();
138b7e72db3SRene Gollent
139b7e72db3SRene Gollent		for (int32 i = 0; i < infoList.CountItems(); i++) {
140b7e72db3SRene Gollent			ExpressionInfo* info = infoList.ItemAt(i);
141b7e72db3SRene Gollent			if (!AddItem(info))
142b7e72db3SRene Gollent				break;
143b7e72db3SRene Gollent
144b7e72db3SRene Gollent			info->AcquireReference();
145b7e72db3SRene Gollent		}
146b7e72db3SRene Gollent	}
147b7e72db3SRene Gollent
148b7e72db3SRene Gollentprivate:
149b7e72db3SRene Gollent	void _Cleanup()
150b7e72db3SRene Gollent	{
151b7e72db3SRene Gollent		for (int32 i = 0; i < CountItems(); i++)
152b7e72db3SRene Gollent			ItemAt(i)->ReleaseReference();
153b7e72db3SRene Gollent
154b7e72db3SRene Gollent		MakeEmpty();
155b7e72db3SRene Gollent	}
156b7e72db3SRene Gollent};
157b7e72db3SRene Gollent
158b7e72db3SRene Gollent
159b7e72db3SRene Gollent// #pragma mark - ExpressionInfoEntryHashDefinition
160b7e72db3SRene Gollent
161b7e72db3SRene Gollent
162b7e72db3SRene Gollentstruct VariablesView::ExpressionInfoEntryHashDefinition {
163b7e72db3SRene Gollent	typedef FunctionKey		KeyType;
164b7e72db3SRene Gollent	typedef	ExpressionInfoEntry	ValueType;
165b7e72db3SRene Gollent
166b7e72db3SRene Gollent	size_t HashKey(const FunctionKey& key) const
167b7e72db3SRene Gollent	{
168b7e72db3SRene Gollent		return key.HashValue();
169b7e72db3SRene Gollent	}
170b7e72db3SRene Gollent
171b7e72db3SRene Gollent	size_t Hash(const ExpressionInfoEntry* value) const
172b7e72db3SRene Gollent	{
173b7e72db3SRene Gollent		return value->HashValue();
174b7e72db3SRene Gollent	}
175b7e72db3SRene Gollent
176b7e72db3SRene Gollent	bool Compare(const FunctionKey& key,
177b7e72db3SRene Gollent		const ExpressionInfoEntry* value) const
178b7e72db3SRene Gollent	{
179b7e72db3SRene Gollent		return key == *value;
180b7e72db3SRene Gollent	}
181b7e72db3SRene Gollent
182b7e72db3SRene Gollent	ExpressionInfoEntry*& GetLink(ExpressionInfoEntry* value) const
183b7e72db3SRene Gollent	{
184b7e72db3SRene Gollent		return value->next;
185b7e72db3SRene Gollent	}
186b7e72db3SRene Gollent};
187b7e72db3SRene Gollent
188b7e72db3SRene Gollent
189b7e72db3SRene Gollent// #pragma mark - ContainerListener
190b7e72db3SRene Gollent
191b7e72db3SRene Gollent
19259ea286fSIngo Weinholdclass VariablesView::ContainerListener : public ValueNodeContainer::Listener {
193c31af1b0SIngo Weinholdpublic:
19459ea286fSIngo Weinhold								ContainerListener(BHandler* indirectTarget);
19559ea286fSIngo Weinhold
19659ea286fSIngo Weinhold			void				SetModel(VariableTableModel* model);
19759ea286fSIngo Weinhold
19859ea286fSIngo Weinhold	virtual	void				ValueNodeChanged(ValueNodeChild* nodeChild,
19959ea286fSIngo Weinhold									ValueNode* oldNode, ValueNode* newNode);
20059ea286fSIngo Weinhold	virtual	void				ValueNodeChildrenCreated(ValueNode* node);
20159ea286fSIngo Weinhold	virtual	void				ValueNodeChildrenDeleted(ValueNode* node);
20259ea286fSIngo Weinhold	virtual	void				ValueNodeValueChanged(ValueNode* node);
20359ea286fSIngo Weinhold
204aa069e23SRene Gollent	virtual void				ModelNodeHidden(ModelNode* node);
205aa069e23SRene Gollent
20655715512SRene Gollent	virtual void				ModelNodeValueRequested(ModelNode* node);
20755715512SRene Gollent
208efc5edfaSRene Gollent	virtual void				ModelNodeRestoreViewStateRequested(ModelNode* node);
209efc5edfaSRene Gollent
21059ea286fSIngo Weinholdprivate:
21159ea286fSIngo Weinhold			BHandler*			fIndirectTarget;
21259ea286fSIngo Weinhold			VariableTableModel*	fModel;
21359ea286fSIngo Weinhold};
21459ea286fSIngo Weinhold
21559ea286fSIngo Weinhold
216b4a86113SRene Gollent// #pragma mark - ExpressionVariableID
217b4a86113SRene Gollent
218b4a86113SRene Gollent
219b4a86113SRene Gollentclass VariablesView::ExpressionVariableID : public ObjectID {
220b4a86113SRene Gollentpublic:
221b4a86113SRene Gollent	ExpressionVariableID(ExpressionInfo* info)
222b4a86113SRene Gollent		:
223b4a86113SRene Gollent		fInfo(info)
224b4a86113SRene Gollent	{
225b4a86113SRene Gollent		fInfo->AcquireReference();
226b4a86113SRene Gollent	}
227b4a86113SRene Gollent
228b4a86113SRene Gollent	virtual ~ExpressionVariableID()
229b4a86113SRene Gollent	{
230b4a86113SRene Gollent		fInfo->ReleaseReference();
231b4a86113SRene Gollent	}
232b4a86113SRene Gollent
233b4a86113SRene Gollent	virtual	bool operator==(const ObjectID& other) const
234b4a86113SRene Gollent	{
235b4a86113SRene Gollent		const ExpressionVariableID* otherID
236b4a86113SRene Gollent			= dynamic_cast<const ExpressionVariableID*>(&other);
237b4a86113SRene Gollent		if (otherID == NULL)
238b4a86113SRene Gollent			return false;
239b4a86113SRene Gollent
240b4a86113SRene Gollent		return fInfo == otherID->fInfo;
241b4a86113SRene Gollent	}
242b4a86113SRene Gollent
243b4a86113SRene Gollentprotected:
244b4a86113SRene Gollent	virtual	uint32 ComputeHashValue() const
245b4a86113SRene Gollent	{
2469832d1f8SFredrik Holmqvist		uint32 hash = reinterpret_cast<addr_t>(fInfo);
247b4a86113SRene Gollent		hash = hash * 19 + StringUtils::HashValue(fInfo->Expression());
248b4a86113SRene Gollent
249b4a86113SRene Gollent		return hash;
250b4a86113SRene Gollent	}
251b4a86113SRene Gollent
252b4a86113SRene Gollentprivate:
253b4a86113SRene Gollent	ExpressionInfo*	fInfo;
254b4a86113SRene Gollent};
255b4a86113SRene Gollent
256b4a86113SRene Gollent
257b7e72db3SRene Gollent// #pragma mark - ModelNode
258b7e72db3SRene Gollent
259b7e72db3SRene Gollent
260c3e066cfSIngo Weinholdclass VariablesView::ModelNode : public BReferenceable {
26159ea286fSIngo Weinholdpublic:
2625d70f1aeSRene Gollent	ModelNode(ModelNode* parent, Variable* variable, ValueNodeChild* nodeChild,
26359ea286fSIngo Weinhold		bool isPresentationNode)
264c31af1b0SIngo Weinhold		:
265c31af1b0SIngo Weinhold		fParent(parent),
26659ea286fSIngo Weinhold		fNodeChild(nodeChild),
2675d70f1aeSRene Gollent		fVariable(variable),
26859ea286fSIngo Weinhold		fValue(NULL),
269b6c4fc96SRene Gollent		fPreviousValue(),
27059ea286fSIngo Weinhold		fValueHandler(NULL),
27159ea286fSIngo Weinhold		fTableCellRenderer(NULL),
2721b74b08fSRene Gollent		fLastRendererSettings(),
2731b74b08fSRene Gollent		fCastedType(NULL),
27477007502SRene Gollent		fTypeHandler(NULL),
2755d70f1aeSRene Gollent		fComponentPath(NULL),
27659ea286fSIngo Weinhold		fIsPresentationNode(isPresentationNode),
277b6c4fc96SRene Gollent		fHidden(false),
2786136e430SRene Gollent		fValueChanged(false),
2796136e430SRene Gollent		fPresentationName()
280c31af1b0SIngo Weinhold	{
28106901787SRene Gollent		fVariable->AcquireReference();
28259ea286fSIngo Weinhold		fNodeChild->AcquireReference();
283c31af1b0SIngo Weinhold	}
284c31af1b0SIngo Weinhold
28559ea286fSIngo Weinhold	~ModelNode()
286c31af1b0SIngo Weinhold	{
28759ea286fSIngo Weinhold		SetTableCellRenderer(NULL);
28859ea286fSIngo Weinhold		SetValueHandler(NULL);
28959ea286fSIngo Weinhold		SetValue(NULL);
29059ea286fSIngo Weinhold
29159ea286fSIngo Weinhold		for (int32 i = 0; ModelNode* child = fChildren.ItemAt(i); i++)
292c31af1b0SIngo Weinhold			child->ReleaseReference();
293c31af1b0SIngo Weinhold
29459ea286fSIngo Weinhold		fNodeChild->ReleaseReference();
29506901787SRene Gollent		fVariable->ReleaseReference();
2965d70f1aeSRene Gollent
2975d70f1aeSRene Gollent		if (fComponentPath != NULL)
2985d70f1aeSRene Gollent			fComponentPath->ReleaseReference();
29941cec3e6SRene Gollent
30041cec3e6SRene Gollent		if (fCastedType != NULL)
30141cec3e6SRene Gollent			fCastedType->ReleaseReference();
30277007502SRene Gollent
30377007502SRene Gollent		if (fTypeHandler != NULL)
30477007502SRene Gollent			fTypeHandler->ReleaseReference();
3055d70f1aeSRene Gollent	}
3065d70f1aeSRene Gollent
3075d70f1aeSRene Gollent	status_t Init()
3085d70f1aeSRene Gollent	{
3095d70f1aeSRene Gollent		fComponentPath = new(std::nothrow) TypeComponentPath();
3105d70f1aeSRene Gollent		if (fComponentPath == NULL)
3115d70f1aeSRene Gollent			return B_NO_MEMORY;
3125d70f1aeSRene Gollent
3135d70f1aeSRene Gollent		if (fParent != NULL)
3145d70f1aeSRene Gollent			*fComponentPath = *fParent->GetPath();
3155d70f1aeSRene Gollent
3165d70f1aeSRene Gollent		TypeComponent component;
3175d70f1aeSRene Gollent		// TODO: this should actually discriminate between different
3185d70f1aeSRene Gollent		// classes of type component kinds
3195d70f1aeSRene Gollent		component.SetToBaseType(fNodeChild->GetType()->Kind(),
3205d70f1aeSRene Gollent			0, fNodeChild->Name());
3215d70f1aeSRene Gollent
3225d70f1aeSRene Gollent		fComponentPath->AddComponent(component);
3235d70f1aeSRene Gollent
3245d70f1aeSRene Gollent		return B_OK;
325c31af1b0SIngo Weinhold	}
326c31af1b0SIngo Weinhold
32759ea286fSIngo Weinhold	ModelNode* Parent() const
328c31af1b0SIngo Weinhold	{
329c31af1b0SIngo Weinhold		return fParent;
330c31af1b0SIngo Weinhold	}
331c31af1b0SIngo Weinhold
33259ea286fSIngo Weinhold	ValueNodeChild* NodeChild() const
333c31af1b0SIngo Weinhold	{
33459ea286fSIngo Weinhold		return fNodeChild;
335c31af1b0SIngo Weinhold	}
336c31af1b0SIngo Weinhold
33759ea286fSIngo Weinhold	const BString& Name() const
338c31af1b0SIngo Weinhold	{
3396136e430SRene Gollent		return fPresentationName.IsEmpty()
3406136e430SRene Gollent			? fNodeChild->Name() : fPresentationName;
3416136e430SRene Gollent	}
3426136e430SRene Gollent
3436136e430SRene Gollent	void SetPresentationName(const BString& name)
3446136e430SRene Gollent	{
3456136e430SRene Gollent		fPresentationName = name;
346c31af1b0SIngo Weinhold	}
347c31af1b0SIngo Weinhold
34859ea286fSIngo Weinhold	Type* GetType() const
349c31af1b0SIngo Weinhold	{
350325f7bb4SRene Gollent		if (fCastedType != NULL)
351325f7bb4SRene Gollent			return fCastedType;
352325f7bb4SRene Gollent
35359ea286fSIngo Weinhold		return fNodeChild->GetType();
354c31af1b0SIngo Weinhold	}
355c31af1b0SIngo Weinhold
3565d70f1aeSRene Gollent	Variable* GetVariable() const
3575d70f1aeSRene Gollent	{
3585d70f1aeSRene Gollent		return fVariable;
3595d70f1aeSRene Gollent	}
3605d70f1aeSRene Gollent
36159ea286fSIngo Weinhold	Value* GetValue() const
36259ea286fSIngo Weinhold	{
36359ea286fSIngo Weinhold		return fValue;
36459ea286fSIngo Weinhold	}
36559ea286fSIngo Weinhold
36659ea286fSIngo Weinhold	void SetValue(Value* value)
367c31af1b0SIngo Weinhold	{
36859ea286fSIngo Weinhold		if (value == fValue)
36959ea286fSIngo Weinhold			return;
37059ea286fSIngo Weinhold
37159ea286fSIngo Weinhold		if (fValue != NULL)
37259ea286fSIngo Weinhold			fValue->ReleaseReference();
37359ea286fSIngo Weinhold
37459ea286fSIngo Weinhold		fValue = value;
37559ea286fSIngo Weinhold
37659ea286fSIngo Weinhold		if (fValue != NULL)
37759ea286fSIngo Weinhold			fValue->AcquireReference();
378b6c4fc96SRene Gollent
379b6c4fc96SRene Gollent		_CompareValues();
380b6c4fc96SRene Gollent	}
381b6c4fc96SRene Gollent
382b6c4fc96SRene Gollent	const BVariant& PreviousValue() const
383b6c4fc96SRene Gollent	{
384b6c4fc96SRene Gollent		return fPreviousValue;
385b6c4fc96SRene Gollent	}
386b6c4fc96SRene Gollent
387b6c4fc96SRene Gollent	void SetPreviousValue(const BVariant& value)
388b6c4fc96SRene Gollent	{
389b6c4fc96SRene Gollent		fPreviousValue = value;
390c31af1b0SIngo Weinhold	}
391c31af1b0SIngo Weinhold
39241cec3e6SRene Gollent	Type* GetCastedType() const
39341cec3e6SRene Gollent	{
39441cec3e6SRene Gollent		return fCastedType;
39541cec3e6SRene Gollent	}
39641cec3e6SRene Gollent
39741cec3e6SRene Gollent	void SetCastedType(Type* type)
39841cec3e6SRene Gollent	{
39941cec3e6SRene Gollent		if (fCastedType != NULL)
40041cec3e6SRene Gollent			fCastedType->ReleaseReference();
40141cec3e6SRene Gollent
40241cec3e6SRene Gollent		fCastedType = type;
40341cec3e6SRene Gollent		if (type != NULL)
40441cec3e6SRene Gollent			fCastedType->AcquireReference();
40541cec3e6SRene Gollent	}
40641cec3e6SRene Gollent
40777007502SRene Gollent	TypeHandler* GetTypeHandler() const
40877007502SRene Gollent	{
40977007502SRene Gollent		return fTypeHandler;
41077007502SRene Gollent	}
41177007502SRene Gollent
41277007502SRene Gollent	void SetTypeHandler(TypeHandler* handler)
41377007502SRene Gollent	{
41477007502SRene Gollent		if (fTypeHandler != NULL)
41577007502SRene Gollent			fTypeHandler->ReleaseReference();
41677007502SRene Gollent
41777007502SRene Gollent		fTypeHandler = handler;
41877007502SRene Gollent		if (fTypeHandler != NULL)
41977007502SRene Gollent			fTypeHandler->AcquireReference();
42077007502SRene Gollent	}
42177007502SRene Gollent
42277007502SRene Gollent
4231b74b08fSRene Gollent	const BMessage& GetLastRendererSettings() const
4241b74b08fSRene Gollent	{
4251b74b08fSRene Gollent		return fLastRendererSettings;
4261b74b08fSRene Gollent	}
4271b74b08fSRene Gollent
4281b74b08fSRene Gollent	void SetLastRendererSettings(const BMessage& settings)
4291b74b08fSRene Gollent	{
4301b74b08fSRene Gollent		fLastRendererSettings = settings;
4311b74b08fSRene Gollent	}
4321b74b08fSRene Gollent
4335d70f1aeSRene Gollent	TypeComponentPath* GetPath() const
4345d70f1aeSRene Gollent	{
4355d70f1aeSRene Gollent		return fComponentPath;
4365d70f1aeSRene Gollent	}
4375d70f1aeSRene Gollent
43859ea286fSIngo Weinhold	ValueHandler* GetValueHandler() const
439e82b4941SIngo Weinhold	{
44059ea286fSIngo Weinhold		return fValueHandler;
441e82b4941SIngo Weinhold	}
442e82b4941SIngo Weinhold
44359ea286fSIngo Weinhold	void SetValueHandler(ValueHandler* handler)
444c31af1b0SIngo Weinhold	{
44559ea286fSIngo Weinhold		if (handler == fValueHandler)
44659ea286fSIngo Weinhold			return;
44759ea286fSIngo Weinhold
44859ea286fSIngo Weinhold		if (fValueHandler != NULL)
44959ea286fSIngo Weinhold			fValueHandler->ReleaseReference();
45059ea286fSIngo Weinhold
45159ea286fSIngo Weinhold		fValueHandler = handler;
45259ea286fSIngo Weinhold
45359ea286fSIngo Weinhold		if (fValueHandler != NULL)
45459ea286fSIngo Weinhold			fValueHandler->AcquireReference();
455c31af1b0SIngo Weinhold	}
456c31af1b0SIngo Weinhold
45759ea286fSIngo Weinhold
45859ea286fSIngo Weinhold	TableCellValueRenderer* TableCellRenderer() const
459c31af1b0SIngo Weinhold	{
46059ea286fSIngo Weinhold		return fTableCellRenderer;
46159ea286fSIngo Weinhold	}
46259ea286fSIngo Weinhold
46359ea286fSIngo Weinhold	void SetTableCellRenderer(TableCellValueRenderer*