39 void addItem(
const std::string& label, std::function<
void()> action);
54 [[nodiscard]]
bool isOpen()
const {
return _open; }
66 struct Item { std::string label; std::function<void()> action; };
70 [[nodiscard]]
float itemsTop()
const;
71 [[nodiscard]]
int visibleCount()
const;
72 [[nodiscard]]
bool searchShown()
const;
73 void recomputeFiltered();
77 std::vector<Item> _items;
79 bool _prevMouseDown =
false;
84 unsigned int _charSize = 14;
85 mutable int _hover = -1;
87 bool _searchable =
false;
89 float _searchH = 30.f;
92 float _fixedWidth = 0.f;
93 std::vector<std::size_t> _filtered;
94 std::function<void()> _onClose;
97 Core* _prevOwner =
nullptr;
98 Core* _prevPopup =
nullptr;