9#include "structure/design_pattern/spk_contract_provider.hpp"
10#include "structure/widget/spk_frame.hpp"
11#include "structure/widget/spk_linear_layout.hpp"
12#include "structure/widget/spk_push_button.hpp"
13#include "structure/widget/spk_spacer_widget.hpp"
14#include "structure/widget/spk_widget.hpp"
52 spk::VerticalLayout _layout;
55 spk::Vector2UInt _backgroundPadding()
const;
58 Popup(
const std::wstring &p_name,
spk::Widget *p_parent);
61 spk::Vector2UInt backgroundPadding()
const;
62 spk::Vector2UInt layoutPadding()
const;
89 void setText(
const std::wstring &p_text);
106 uint32_t _height = 6;
128 std::vector<std::unique_ptr<spk::Widget>> _items;
129 std::vector<Menu *> _subMenus;
133 Menu *_parentMenu =
nullptr;
134 bool _isTopLevel =
false;
135 spk::Vector2Int _mainMenuOffset = {0, 2};
136 spk::Vector2Int _subMenuOffset = {2, 0};
137 bool _isPopupOpen =
false;
138 size_t _actionIndex = 0;
139 size_t _separatorIndex = 0;
140 size_t _submenuIndex = 0;
142 std::vector<spk::TContractProvider<>::Contract> _itemContracts;
144 void _refreshPopupGeometry();
145 void _setPopupOpen(
bool p_open);
180 void setTitle(
const std::wstring &p_title);
265 spk::HorizontalLayout _menuLayout;
266 std::vector<std::unique_ptr<Menu>> _menus;
269 Menu *_openedMenu =
nullptr;
273 spk::Vector2UInt _expandedMinimalSize()
const;
274 void _closeMenusExcept(
Menu *p_menu);
275 void _updateMenuLayout();
301 const size_t &
height()
const;
Widget frame rendered using a nine-slice background.
Definition spk_frame.hpp:19
Publishes callbacks (contracts) and allows blocking, delaying, or triggering them with arguments.
Definition spk_contract_provider.hpp:29