2 * Copyright 2015, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
5 #ifndef TABLE_CELL_TEXT_CONTROL_EDITOR_H
6 #define TABLE_CELL_TEXT_CONTROL_EDITOR_H
8 #include <TextControl.h>
10 #include "TableCellFormattedValueEditor.h"
13 // common base class for editors that input a value via a text field
14 class TableCellTextControlEditor
: public TableCellFormattedValueEditor
,
17 TableCellTextControlEditor(
18 ::Value
* initialValue
,
19 ValueFormatter
* formatter
);
20 virtual ~TableCellTextControlEditor();
24 virtual BView
* GetView();
26 virtual bool ValidateInput() const = 0;
28 virtual status_t
GetValueForInput(::Value
*& _output
) const = 0;
31 virtual void AttachedToWindow();
32 virtual void MessageReceived(BMessage
* message
);
35 #endif // TABLE_CELL_TEXT_CONTROL_EDITOR_H