20#ifndef HEADER_LISTWIDGET_HPP
21#define HEADER_LISTWIDGET_HPP
25#include "guiengine/widgets/CGUISTKListBox.hpp"
26#include "guiengine/widget.hpp"
27#include "utils/leak_check.hpp"
28#include "utils/ptr_vector.hpp"
29#include "IGUIElement.h"
32namespace irr {
namespace gui {
class STKModifiedSpriteBank; } }
41 virtual void onColumnClicked(
int column_id,
bool sort_desc,
bool sort_default) = 0;
72 bool m_choosing_header;
76 irr::core::stringw m_text;
78 irr::video::ITexture* m_texture;
79 Column(irr::core::stringw text,
int proportion)
82 m_proportion = proportion;
85 Column(irr::video::ITexture* texture,
int proportion)
87 m_proportion = proportion;
99 bool m_header_created;
104 int max_size = (int)m_header_elements.size() - 1;
113 typedef ListItem::ListCell ListCell;
139 void setIcons(irr::gui::STKModifiedSpriteBank* icons,
int size=-1);
150 void addItem( const std::
string& internal_name,
151 const irr::core::stringw &name,
153 bool center = false);
155 void addItem( const std::
string& internal_name,
156 const std::vector<ListCell>& contents);
194 irr::core::stringw getSelectionLabel(const
int cell = 0) const;
196 void selectItemWithLabel(const irr::core::stringw& name);
201 int getItemID(const std::
string &internalName) const;
214 void renameCell(const
int row_num, const
int col_num,
215 const irr::core::stringw &newName, const
int icon=-1);
221 const irr::core::stringw &newName, const
int icon=-1);
222 void renameItem(const std::
string & internal_name,
223 const irr::core::stringw &newName, const
int icon=-1);
229 void renameCell(const std::
string internalName, const
int col_num,
230 const irr::core::stringw &newName, const
int icon=-1)
242 void markItemBlue(
const int id,
bool blue=
true);
243 void emphasisItem(
const int id,
bool enable=
true);
256 void markItemBlue(
const std::string &internalName,
bool blue=
true)
260 markItemBlue(
id, blue );
263 void emphasisItem(
const std::string &internalName,
bool enable=
true)
267 emphasisItem(
id, enable);
272 const std::string& originator,
276 virtual EventPropagation
upPressed(
const int playerID);
279 virtual EventPropagation
downPressed(
const int playerID);
282 virtual EventPropagation
leftPressed(
const int playerID);
285 virtual EventPropagation
rightPressed(
const int playerID);
290 void setColumnListener(IListWidgetHeaderListener* listener)
292 if (m_listener)
delete m_listener;
293 m_listener = listener;
300 void addColumn(irr::video::ITexture* tex,
int proportion=1) {
m_header.push_back( Column(tex, proportion) ); }
302 void setSortable(
bool sortable) { m_sortable = sortable; }
303 void focusHeader(
const NavigationDirection nav);
304 virtual void setActive(
bool active=
true);
Object used to render the GUI widgets see Overview of GUI skin for more information about skinning in...
Definition: skin.hpp:269
Definition: ptr_vector.hpp:44
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33
Definition: CGUISTKListBox.hpp:31