20#ifndef HEADER_RIBBON_HPP
21#define HEADER_RIBBON_HPP
25#include "guiengine/widget.hpp"
26#include "guiengine/widgets/icon_button_widget.hpp"
27#include "utils/cpp2011.hpp"
28#include "utils/leak_check.hpp"
29#include "utils/ptr_vector.hpp"
31#include <IGUIStaticText.h>
66 virtual void onRibbonWidgetScroll(
const int delta_x) = 0;
68 const int playerID) = 0;
69 virtual void onSelectionChange() = 0;
76 int m_selection[MAX_PLAYER_COUNT];
90 virtual EventPropagation
rightPressed(
const int playerID=0) OVERRIDE;
91 virtual EventPropagation
leftPressed (const
int playerID=0) OVERRIDE;
92 virtual EventPropagation
upPressed (const
int playerID=0) OVERRIDE;
93 virtual EventPropagation
downPressed (const
int playerID=0) OVERRIDE;
94 EventPropagation moveToNextItem(const
bool horizontally, const
bool reverse, const
int playerID);
95 EventPropagation propagationType(const
bool horizontally);
97 const
int playerID, const
int old_selection);
99 const
int playerID) OVERRIDE;
101 const std::
string& originator,
102 const
int playerID=0) OVERRIDE;
103 virtual EventPropagation
focused(const
int playerID) OVERRIDE;
104 virtual
void unfocused(const
int playerID,
Widget* new_focus) OVERRIDE;
106 virtual EventPropagation
onClick() OVERRIDE;
108 PtrVector<irr::gui::IGUIStaticText, REF> m_labels;
132 virtual
void add() OVERRIDE;
149 {
return m_active_children.size(); }
153 {
return m_selection[playerID]; }
161 const int selection = m_selection[playerID];
162 if (selection < 0 || selection >=
int(
m_children.size()))
return "";
172 void select(std::string item,
const int playerID);
181 void setLabel(
const unsigned int id, irr::core::stringw new_name);
183 void setItemVisible(
const unsigned int id,
bool visible);
199 void addTextChild(
const core::stringw& text,
const std::string &
id);
207 void addIconChild(
const core::stringw& text,
const std::string &
id,
208 const int w,
const int h,
const std::string &icon,
226 virtual EventPropagation onActivationInput(
const int playerID) OVERRIDE;
Class to handle irrLicht events (GUI and input as well)
Definition: event_handler.hpp:66
Definition: ptr_vector.hpp:44
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33
RibbonFlip
Filp directions of ribbons.
Definition: ribbon_widget.hpp:46
RibbonType
Types of ribbons.
Definition: ribbon_widget.hpp:37
@ RIBBON_VERTICAL_TABS
a vertical tab bar
Definition: ribbon_widget.hpp:41
@ RIBBON_TOOLBAR
a row of individual buttons
Definition: ribbon_widget.hpp:39
@ RIBBON_TABS
a tab bar
Definition: ribbon_widget.hpp:40
@ RIBBON_COMBO
select one item out of many, like in a combo box
Definition: ribbon_widget.hpp:38