1a8249955SRene Gollent /* 2a8249955SRene Gollent * Copyright 2015, Rene Gollent, rene@gollent.com. 3a8249955SRene Gollent * Distributed under the terms of the MIT License. 4a8249955SRene Gollent */ 5a8249955SRene Gollent #ifndef TABLE_CELL_OPTION_POPUP_EDITOR_H 6a8249955SRene Gollent #define TABLE_CELL_OPTION_POPUP_EDITOR_H 7a8249955SRene Gollent 8a8249955SRene Gollent #include <OptionPopUp.h> 9a8249955SRene Gollent 10a8249955SRene Gollent #include "TableCellFormattedValueEditor.h" 11a8249955SRene Gollent 12a8249955SRene Gollent 13a8249955SRene Gollent // common base class for editors that have a fixed set of chooseable 14a8249955SRene Gollent // values known up front 15a8249955SRene Gollent class TableCellOptionPopUpEditor : public TableCellFormattedValueEditor, 16a8249955SRene Gollent protected BOptionPopUp { 17a8249955SRene Gollent public: 18a8249955SRene Gollent TableCellOptionPopUpEditor( 19a8249955SRene Gollent ::Value* initialValue, 20a8249955SRene Gollent ValueFormatter* formatter); 21a8249955SRene Gollent virtual ~TableCellOptionPopUpEditor(); 22a8249955SRene Gollent 23a8249955SRene Gollent status_t Init(); 24a8249955SRene Gollent 25a8249955SRene Gollent virtual BView* GetView(); 26a8249955SRene Gollent 27a8249955SRene Gollent virtual status_t ConfigureOptions() = 0; 28a8249955SRene Gollent 29a8249955SRene Gollent protected: 30*1f3db0d0SRene Gollent virtual status_t GetSelectedValue(::Value*& _value) const = 0; 31*1f3db0d0SRene Gollent 32a8249955SRene Gollent virtual void AttachedToWindow(); 33a8249955SRene Gollent virtual void MessageReceived(BMessage* message); 34a8249955SRene Gollent }; 35a8249955SRene Gollent 36a8249955SRene Gollent #endif // TABLE_CELL_TEXT_CONTROL_EDITOR_H 37