A single tab entry for TabbedPanel.
More...
#include <Malena/Graphics/Controls/Tab.h>
Public Member Functions | |
| template<typename T> | |
| Tab (const std::string &label, std::unique_ptr< T > content, const sf::Texture *icon=nullptr, bool closeable=false) | |
| Construct a tab with owned content. | |
| void | setCloseable (bool c) |
| void | setIcon (const sf::Texture *icon_) |
| void | setLabel (const std::string &l) |
Public Attributes | |
| bool | closeable = false |
| std::unique_ptr< ml::Core > | content |
| const sf::Texture * | icon = nullptr |
| std::string | label |
| std::function< void(sf::Vector2f)> | resizeFn |
| float | width = 0.f |
| computed by TabbedPanel | |
| float | x = 0.f |
| computed by TabbedPanel | |
A single tab entry for TabbedPanel.
Can be built ahead of time and passed to TabbedPanel::addTab(Tab):
Or created inline via the TabbedPanel::addTab convenience overload:
|
inline |
|
inline |
| const sf::Texture* ml::Tab::icon = nullptr |
| std::function<void(sf::Vector2f)> ml::Tab::resizeFn |
| float ml::Tab::width = 0.f |
computed by TabbedPanel
| float ml::Tab::x = 0.f |
computed by TabbedPanel