xref: /haiku/src/apps/debugger/user_interface/gui/value/ValueHandler.h (revision 20df96b029ae00b592e754ff66404b12e7e12414)
1 /*
2  * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Copyright 2015, Rene Gollent, rene@gollent.com.
4  * Distributed under the terms of the MIT License.
5  */
6 #ifndef VALUE_HANDLER_H
7 #define VALUE_HANDLER_H
8 
9 
10 #include <Referenceable.h>
11 
12 
13 class Settings;
14 class SettingsMenu;
15 class TableCellValueEditor;
16 class TableCellValueRenderer;
17 class Value;
18 class ValueFormatter;
19 
20 
21 class ValueHandler : public BReferenceable {
22 public:
23 	virtual						~ValueHandler();
24 
25 	virtual	float				SupportsValue(Value* value) = 0;
26 	virtual	status_t			GetValueFormatter(Value* value,
27 									ValueFormatter*& _formatter) = 0;
28 									// returns a reference
29 	virtual	status_t			GetTableCellValueRenderer(Value* value,
30 									TableCellValueRenderer*& _renderer) = 0;
31 									// returns a reference
32 	virtual	status_t			GetTableCellValueEditor(Value* value,
33 									Settings* settings,
34 										// may be NULL if preconfiguration with
35 										// particular settings isn't desired.
36 									TableCellValueEditor*& _editor);
37 									// may return NULL, otherwise a reference
38 	virtual	status_t			CreateTableCellValueSettingsMenu(Value* value,
39 									Settings* settings, SettingsMenu*& _menu);
40 									// may return NULL, otherwise a reference
41 };
42 
43 
44 #endif	// VALUE_HANDLER_H
45