Loading...
Searching...
No Matches
IGUIComboBox.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_GUI_COMBO_BOX_H_INCLUDED__
#define __I_GUI_COMBO_BOX_H_INCLUDED__
#include "IGUIElement.h"
namespace irr
{
namespace gui
{
class IGUIComboBox : public IGUIElement
{
public:
IGUIComboBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
: IGUIElement(EGUIET_COMBO_BOX, environment, parent, id, rectangle) {}
virtual u32 getItemCount() const = 0;
virtual const wchar_t* getItem(u32 idx) const = 0;
virtual u32 getItemData(u32 idx) const = 0;
virtual s32 getIndexForItemData(u32 data ) const = 0;
virtual u32 addItem(const wchar_t* text, u32 data = 0) = 0;
virtual void removeItem(u32 idx) = 0;
virtual void clear() = 0;
virtual s32 getSelected() const = 0;
virtual void setSelected(s32 idx) = 0;
virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
virtual void setMaxSelectionRows(u32 max) = 0;
virtual u32 getMaxSelectionRows() const = 0;
};
} // end namespace gui
} // end namespace irr
#endif
IGUIElement.h
irr::core::rect
Rectangle template.
Definition rect.h:27
irr::gui::IGUIComboBox::getIndexForItemData
virtual s32 getIndexForItemData(u32 data) const =0
Returns index based on item data.
irr::gui::IGUIComboBox::addItem
virtual u32 addItem(const wchar_t *text, u32 data=0)=0
Adds an item and returns the index of it.
irr::gui::IGUIComboBox::setMaxSelectionRows
virtual void setMaxSelectionRows(u32 max)=0
Set the maximal number of rows for the selection listbox.
irr::gui::IGUIComboBox::getItemCount
virtual u32 getItemCount() const =0
Returns amount of items in box.
irr::gui::IGUIComboBox::getSelected
virtual s32 getSelected() const =0
Returns id of selected item. returns -1 if no item is selected.
irr::gui::IGUIComboBox::setSelected
virtual void setSelected(s32 idx)=0
Sets the selected item. Set this to -1 if no item should be selected.
irr::gui::IGUIComboBox::getItem
virtual const wchar_t * getItem(u32 idx) const =0
Returns string of an item. the idx may be a value from 0 to itemCount-1.
irr::gui::IGUIComboBox::IGUIComboBox
IGUIComboBox(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
constructor
Definition IGUIComboBox.h:24
irr::gui::IGUIComboBox::setTextAlignment
virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical)=0
Sets text justification of the text area.
irr::gui::IGUIComboBox::removeItem
virtual void removeItem(u32 idx)=0
Removes an item from the combo box.
irr::gui::IGUIComboBox::getItemData
virtual u32 getItemData(u32 idx) const =0
Returns item data of an item. the idx may be a value from 0 to itemCount-1.
irr::gui::IGUIComboBox::clear
virtual void clear()=0
Deletes all items in the combo box.
irr::gui::IGUIComboBox::getMaxSelectionRows
virtual u32 getMaxSelectionRows() const =0
Get the maximimal number of rows for the selection listbox.
irr::gui::IGUIElement::IGUIElement
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)
Constructor.
Definition IGUIElement.h:30
irr::gui::IGUIEnvironment
GUI Environment. Used as factory and manager of all other GUI elements.
Definition IGUIEnvironment.h:71
irr::gui
The gui namespace contains useful classes for easy creation of a graphical user interface.
Definition EGUIAlignment.h:11
irr::gui::EGUI_ALIGNMENT
EGUI_ALIGNMENT
Definition EGUIAlignment.h:13
irr::gui::EGUIET_COMBO_BOX
@ EGUIET_COMBO_BOX
A combo box (IGUIComboBox).
Definition EGUIElementTypes.h:26
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::u32
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
irr::s32
signed int s32
32 bit signed variable.
Definition irrTypes.h:66
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0