20#ifndef HEADER_RIBBONGRID_HPP
21#define HEADER_RIBBONGRID_HPP
27#include "guiengine/widget.hpp"
28#include "guiengine/widgets/ribbon_widget.hpp"
29#include "utils/leak_check.hpp"
30#include "utils/ptr_vector.hpp"
34 class IconButtonWidget;
45 const std::string& selectionID,
46 const irr::core::stringw& selectionText,
47 const int playerID) = 0;
53 irr::core::stringw m_user_name;
54 std::string m_code_name;
55 std::string m_sshot_file;
62 float m_time_per_frame;
64 unsigned int m_badges;
70 void (*callback)(
void* data);
92 irr::gui::IGUIStaticText* m_label;
164 EventPropagation
focused(
const int playerID);
170 void scroll(
int x_delta,
bool evenIfDeactivated =
false);
178 virtual EventPropagation
transmitEvent(
Widget* w,
const std::string& originator,
const int playerID);
180 bool findItemInRows(
const char* name,
int* p_row,
int* p_id);
182 int m_item_count_hint;
184 float getFontScale(
int icon_width)
const;
185 void setLabelSize(
const irr::core::stringw& text);
186 irr::core::stringw getUserName(
const irr::core::stringw& user_name)
const;
225 void addItem( const irr::core::stringw& user_name, const std::
string& code_name,
226 const std::
string& image_file, const
unsigned int badge=0,
240 void addAnimatedItem( const irr::core::stringw& user_name, const std::
string& code_name,
241 const std::vector<std::
string>& image_files, const
float time_per_frame,
242 const
unsigned int badge=0,
248 void setBadge(const std::
string &name,
BadgeType badge);
251 template<typename Compare>
290 bool setSelection(
int item_id,
const int playerID,
const bool focusIt,
bool evenIfDeactivated=
false);
298 const int playerID,
const bool focusIt,
299 bool evenIfDeactivated=
false);
313 virtual void setText(
const irr::core::stringw& text);
315 virtual void update(
float delta);
324 void registerScrollCallback(
void (*callback)(
void* data),
void* data)
326 m_scroll_callback.callback = callback;
327 m_scroll_callback.data = data;
Even if you have a ribbon that only acts on click/enter, you may wish to know which item is currently...
Definition: dynamic_ribbon_widget.hpp:41
Definition: ptr_vector.hpp:44
Definition: scalable_font.hpp:35
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33
BadgeType
Definition: widget.hpp:63
The description of an item added to a DynamicRibbonWidget.
Definition: dynamic_ribbon_widget.hpp:52
std::vector< std::string > m_all_images
used instead of 'm_sshot_file' if m_animated is true
Definition: dynamic_ribbon_widget.hpp:60