aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/include/IGUIComboBox.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/include/IGUIComboBox.h')
-rw-r--r--src/others/irrlicht-1.8.1/include/IGUIComboBox.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/include/IGUIComboBox.h b/src/others/irrlicht-1.8.1/include/IGUIComboBox.h
new file mode 100644
index 0000000..72c4187
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/include/IGUIComboBox.h
@@ -0,0 +1,74 @@
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 irrlicht.h
4
5#ifndef __I_GUI_COMBO_BOX_H_INCLUDED__
6#define __I_GUI_COMBO_BOX_H_INCLUDED__
7
8#include "IGUIElement.h"
9
10namespace irr
11{
12namespace gui
13{
14
15 //! Combobox widget
16 /** \par This element can create the following events of type EGUI_EVENT_TYPE:
17 \li EGET_COMBO_BOX_CHANGED
18 */
19 class IGUIComboBox : public IGUIElement
20 {
21 public:
22
23 //! constructor
24 IGUIComboBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
25 : IGUIElement(EGUIET_COMBO_BOX, environment, parent, id, rectangle) {}
26
27 //! Returns amount of items in box
28 virtual u32 getItemCount() const = 0;
29
30 //! Returns string of an item. the idx may be a value from 0 to itemCount-1
31 virtual const wchar_t* getItem(u32 idx) const = 0;
32
33 //! Returns item data of an item. the idx may be a value from 0 to itemCount-1
34 virtual u32 getItemData(u32 idx) const = 0;
35
36 //! Returns index based on item data
37 virtual s32 getIndexForItemData(u32 data ) const = 0;
38
39 //! Adds an item and returns the index of it
40 virtual u32 addItem(const wchar_t* text, u32 data = 0) = 0;
41
42 //! Removes an item from the combo box.
43 /** Warning. This will change the index of all following items */
44 virtual void removeItem(u32 idx) = 0;
45
46 //! Deletes all items in the combo box
47 virtual void clear() = 0;
48
49 //! Returns id of selected item. returns -1 if no item is selected.
50 virtual s32 getSelected() const = 0;
51
52 //! Sets the selected item. Set this to -1 if no item should be selected
53 virtual void setSelected(s32 idx) = 0;
54
55 //! Sets text justification of the text area
56 /** \param horizontal: EGUIA_UPPERLEFT for left justified (default),
57 EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text.
58 \param vertical: EGUIA_UPPERLEFT to align with top edge,
59 EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */
60 virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
61
62 //! Set the maximal number of rows for the selection listbox
63 virtual void setMaxSelectionRows(u32 max) = 0;
64
65 //! Get the maximimal number of rows for the selection listbox
66 virtual u32 getMaxSelectionRows() const = 0;
67 };
68
69
70} // end namespace gui
71} // end namespace irr
72
73#endif
74