1 /* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef ENUMERATION_VALUE_HANDLER_H 6 #define ENUMERATION_VALUE_HANDLER_H 7 8 9 #include "IntegerValueHandler.h" 10 11 12 class EnumerationValueHandler : public IntegerValueHandler { 13 public: 14 EnumerationValueHandler(); 15 ~EnumerationValueHandler(); 16 17 status_t Init(); 18 19 virtual float SupportsValue(Value* value); 20 virtual status_t GetValueFormatter(Value* value, 21 ValueFormatter*& _formatter); 22 virtual status_t GetTableCellValueEditor(Value* value, 23 Settings* settings, 24 TableCellValueEditor*& _editor); 25 26 protected: 27 virtual integer_format DefaultIntegerFormat(IntegerValue* value); 28 virtual status_t CreateValueFormatter( 29 IntegerValueFormatter::Config* config, 30 ValueFormatter*& _formatter); 31 virtual status_t AddIntegerFormatSettingOptions( 32 IntegerValue* value, 33 OptionsSettingImpl* setting); 34 virtual status_t CreateTableCellValueRenderer( 35 IntegerValue* value, 36 IntegerValueFormatter::Config* config, 37 TableCellValueRenderer*& _renderer); 38 }; 39 40 41 #endif // ENUMERATION_VALUE_HANDLER_H 42