26#ifndef TGUI_MENU_BAR_HPP
27#define TGUI_MENU_BAR_HPP
30#include <TGUI/Widgets/Label.hpp>
36 class MenuBarRenderer;
54 typedef std::shared_ptr<MenuBar>
Ptr;
55 typedef std::shared_ptr<const MenuBar>
ConstPtr;
92 return std::static_pointer_cast<MenuBarRenderer>(m_renderer);
255 return m_minimumSubMenuWidth;
280 virtual void setParent(
Container* parent)
override;
286 virtual bool mouseOnWidget(
float x,
float y)
const override;
291 virtual void leftMousePressed(
float x,
float y)
override;
296 virtual void leftMouseReleased(
float x,
float y)
override;
301 virtual void mouseMoved(
float x,
float y)
override;
306 virtual void mouseNoLongerDown()
override;
315 virtual void mouseLeftWidget()
override;
327 return std::make_shared<MenuBar>(*
this);
343 virtual void reload(
const std::string& primary =
"",
const std::string& secondary =
"",
bool force =
false)
override;
349 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const override;
358 std::vector<Label> menuItems;
359 int selectedMenuItem = -1;
362 std::vector<Menu> m_menus;
364 int m_visibleMenu = -1;
366 unsigned int m_textSize = 0;
368 float m_minimumSubMenuWidth = 125;
401 virtual void setProperty(std::string property,
const std::string& value)
override;
520 void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
529 virtual std::shared_ptr<WidgetRenderer> clone(
Widget* widget)
override;
537 float m_distanceToSide = 0;
539 sf::Color m_textColor;
540 sf::Color m_selectedTextColor;
542 sf::Color m_backgroundColor;
543 sf::Color m_selectedBackgroundColor;
546 Texture m_itemBackgroundTexture;
547 Texture m_selectedItemBackgroundTexture;
Implicit converter for colors.
Definition: Color.hpp:40
Container widget.
Definition: Container.hpp:48
Label widget.
Definition: Label.hpp:50
Class to store the position or size of a widget.
Definition: Layout.hpp:255
Implicit converter for settable properties.
Definition: ObjectConverter.hpp:43
Definition: Texture.hpp:45
Namespace that contains all TGUI functions and classes.
Definition: Animation.hpp:34