28 TuiAction(
const String &text, ObjectBase *parent =
nullptr) : ObjectBase(parent), _text(text) {}
30 const String &text()
const {
return _text; }
31 void setText(
const String &text) { _text = text; }
33 bool isEnabled()
const {
return _enabled; }
34 void setEnabled(
bool enabled) { _enabled = enabled; }
36 PROMEKI_SIGNAL(triggered)
52 TuiMenu(
const String &title = String(), ObjectBase *parent =
nullptr);
55 const String &title()
const {
return _title; }
56 void setTitle(
const String &title) {
64 const List<TuiAction *> &actions()
const {
return _actions; }
66 int currentIndex()
const {
return _currentIndex; }
67 void setCurrentIndex(
int index);
69 bool isOpen()
const {
return _open; }
73 Size2Di32 sizeHint()
const override;
76 void paintEvent(PaintEvent *e)
override;
77 void keyPressEvent(KeyEvent *e)
override;
81 List<TuiAction *> _actions;
82 List<int> _separators;
83 int _currentIndex = 0;