5#include "structure/widget/spk_menu_bar.hpp"
6#include "structure/widget/spk_widget.hpp"
21 template <
typename TContentType>
26 TContentType _content;
33 {0, _menuBar.height()},
36 _content.setGeometry(contentGeometry);
46 spk::
Widget(p_name, p_parent),
47 _menuBar(p_name + L
"/MenuBar", this),
48 _content(p_name + L
"/Content", this)
50 _menuBar.setLayer(10);
57 uint32_t width = std::max(_menuBar.sizeHint().minimal().x, _content.sizeHint().minimal().x);
58 uint32_t height = _menuBar.height() + _content.sizeHint().minimal().y;
60 return (spk::Vector2UInt(width, height));
void configureMinimalGenerator(Generator p_generator)
Configures the minimal size generator.
Definition spk_resizable_element.cpp:21
SizeHint & sizeHint()
Returns mutable size hint data.
Definition spk_resizable_element.cpp:86
TContentType & content()
Accesses the workspace content widget.
Definition spk_workspace.hpp:86
const TContentType & content() const
Accesses the workspace content widget.
Definition spk_workspace.hpp:95
spk::MenuBar & menuBar()
Accesses the workspace menu bar.
Definition spk_workspace.hpp:68
const spk::MenuBar & menuBar() const
Accesses the workspace menu bar.
Definition spk_workspace.hpp:77
Workspace(const std::wstring &p_name, spk::Widget *p_parent)
Builds a workspace with a menu bar and content widget.
Definition spk_workspace.hpp:45
Axis-aligned rectangle defined by an anchor point and size.
Definition spk_extend_2d.hpp:24
TType x
X component.
Definition spk_vector2.hpp:44
TType y
Y component.
Definition spk_vector2.hpp:48