Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IGUIComboBox.hpp
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in duckcpp/duckcpp.hpp
4
5#ifndef DCPP_I_GUI_COMBO_BOX_HPP_INCLUDED
6#define DCPP_I_GUI_COMBO_BOX_HPP_INCLUDED
7
8#include <duckcpp/core/engine/IGUIElement.hpp>
9
10namespace dcpp
11{
12namespace gui
13{
14
16
20 {
21 public:
22
25 : IGUIElement(EGUIET_COMBO_BOX, environment, parent, id, rectangle) {}
26
28 virtual dcpp::uint32_kt getItemCount() const = 0;
29
31 virtual const wchar_t* getItem(dcpp::uint32_kt idx) const = 0;
32
35
38
40 virtual dcpp::uint32_kt addItem(const wchar_t* text, dcpp::uint32_kt data = 0) = 0;
41
43
44 virtual void removeItem(dcpp::uint32_kt idx) = 0;
45
47 virtual void clear() = 0;
48
50 virtual dcpp::int32_kt getSelected() const = 0;
51
53 virtual void setSelected(dcpp::int32_kt idx) = 0;
54
56
60 virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
61
63 virtual void setMaxSelectionRows(dcpp::uint32_kt max) = 0;
64
67 };
68
69
70} // end namespace gui
71} // end namespace dcpp
72
73#endif
Combobox widget.
Definition IGUIComboBox.hpp:20
virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical)=0
Sets text justification of the text area.
virtual dcpp::uint32_kt getItemCount() const =0
Returns amount of items in box.
virtual dcpp::int32_kt getSelected() const =0
Returns id of selected item. returns -1 if no item is selected.
virtual void removeItem(dcpp::uint32_kt idx)=0
Removes an item from the combo box.
IGUIComboBox(IGUIEnvironment *environment, IGUIElement *parent, dcpp::int32_kt id, dcpp::nub::recti rectangle)
constructor
Definition IGUIComboBox.hpp:24
virtual void setMaxSelectionRows(dcpp::uint32_kt max)=0
Set the maximal number of rows for the selection listbox.
virtual dcpp::uint32_kt getMaxSelectionRows() const =0
Get the maximal number of rows for the selection listbox.
virtual const wchar_t * getItem(dcpp::uint32_kt idx) const =0
Returns string of an item. the idx may be a value from 0 to itemCount-1.
virtual dcpp::uint32_kt addItem(const wchar_t *text, dcpp::uint32_kt data=0)=0
Adds an item and returns the index of it.
virtual void setSelected(dcpp::int32_kt idx)=0
Sets the selected item. Set this to -1 if no item should be selected.
virtual void clear()=0
Deletes all items in the combo box.
virtual dcpp::int32_kt getIndexForItemData(dcpp::uint32_kt data) const =0
Returns index based on item data.
virtual dcpp::uint32_kt getItemData(dcpp::uint32_kt idx) const =0
Returns item data of an item. the idx may be a value from 0 to itemCount-1.
Base class of all GUI elements.
Definition IGUIElement.hpp:24
GUI Environment. Used as factory and manager of all other GUI elements.
Definition IGUIEnvironment.hpp:73
Rectangle template.
Definition rect.hpp:27
EGUI_ALIGNMENT
Definition EGUIAlignment.hpp:15
@ EGUIET_COMBO_BOX
A combo box (IGUIComboBox)
Definition EGUIElementTypes.hpp:26
As of Duckcpp 1.6, position2d is a synonym for vector2d.
Definition shared_device.hpp:34
unsigned int uint32_kt
32 bit unsigned variable.
Definition irrTypes.hpp:64
signed int int32_kt
32 bit signed variable.
Definition irrTypes.hpp:72

Duckcpp    @cppfx.xyz