25#ifndef TGUI_VERTICAL_TABS_HPP
26#define TGUI_VERTICAL_TABS_HPP
28#include <TGUI/Widgets/TabsBase.hpp>
29#include <TGUI/Text.hpp>
42 class TGUI_API VerticalTabs :
public TabsBase
46 using Ptr = std::shared_ptr<VerticalTabs>;
47 using ConstPtr = std::shared_ptr<const VerticalTabs>;
58 explicit VerticalTabs(
const char* typeName =
StaticWidgetType,
bool initRenderer =
true);
120 void mouseMoved(Vector2f pos)
override;
136 void recalculateTabsSize()
override;
141 TGUI_NODISCARD std::unique_ptr<DataIO::Node>
save(SavingRenderersMap& renderers)
const override;
146 void load(
const std::unique_ptr<DataIO::Node>& node,
const LoadingRenderersMap& renderers)
override;
156 float m_tabHeight = 0;
Base class for render targets.
Definition BackendRenderTarget.hpp:46
Class to store the position or size of a widget.
Definition Layout.hpp:321
void setTabHeight(float height)
Changes the height of the tabs.
void setTabWidth(float width)
Changes the width of the tabs.
bool leftMousePressed(Vector2f pos) override
Called by the parent when the left mouse button goes down on top of the widget.
std::shared_ptr< const VerticalTabs > ConstPtr
Shared constant widget pointer.
Definition VerticalTabs.hpp:47
Widget::Ptr clone() const override
Makes a copy of the widget if you don't know its exact type.
float getTabHeight() const
Returns the height of the tabs.
static VerticalTabs::Ptr copy(const VerticalTabs::ConstPtr &tab)
Makes a copy of another tab.
void draw(BackendRenderTarget &target, RenderStates states) const override
Draw the widget to a render target.
static constexpr const char StaticWidgetType[]
Type name of the widget.
Definition VerticalTabs.hpp:49
void load(const std::unique_ptr< DataIO::Node > &node, const LoadingRenderersMap &renderers) override
Loads the widget from a tree of nodes.
std::unique_ptr< DataIO::Node > save(SavingRenderersMap &renderers) const override
Saves the widget as a tree node in order to save it to a file.
static VerticalTabs::Ptr create()
Creates a new tabs widget.
std::shared_ptr< VerticalTabs > Ptr
Shared widget pointer.
Definition VerticalTabs.hpp:46
void setSize(const Layout2d &size) override
Changes the area used by the tabs.
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:36
States used for drawing.
Definition RenderStates.hpp:38