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