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.
6 #ifndef VALUE_HANDLER_H
7 #define VALUE_HANDLER_H
10 #include <Referenceable.h>
15 class TableCellValueEditor
;
16 class TableCellValueRenderer
;
21 class ValueHandler
: public BReferenceable
{
23 virtual ~ValueHandler();
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
,
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
44 #endif // VALUE_HANDLER_H