aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/include/IGUIContextMenu.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/include/IGUIContextMenu.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/include/IGUIContextMenu.h')
-rw-r--r--libraries/irrlicht-1.8/include/IGUIContextMenu.h324
1 files changed, 162 insertions, 162 deletions
diff --git a/libraries/irrlicht-1.8/include/IGUIContextMenu.h b/libraries/irrlicht-1.8/include/IGUIContextMenu.h
index c9a0659..9f5ea25 100644
--- a/libraries/irrlicht-1.8/include/IGUIContextMenu.h
+++ b/libraries/irrlicht-1.8/include/IGUIContextMenu.h
@@ -1,162 +1,162 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __I_GUI_CONTEXT_MENU_H_INCLUDED__ 5#ifndef __I_GUI_CONTEXT_MENU_H_INCLUDED__
6#define __I_GUI_CONTEXT_MENU_H_INCLUDED__ 6#define __I_GUI_CONTEXT_MENU_H_INCLUDED__
7 7
8#include "IGUIElement.h" 8#include "IGUIElement.h"
9 9
10namespace irr 10namespace irr
11{ 11{
12namespace gui 12namespace gui
13{ 13{
14 //! Close behavior. 14 //! Close behavior.
15 //! Default is ECMC_REMOVE 15 //! Default is ECMC_REMOVE
16 enum ECONTEXT_MENU_CLOSE 16 enum ECONTEXT_MENU_CLOSE
17 { 17 {
18 //! do nothing - menu stays open 18 //! do nothing - menu stays open
19 ECMC_IGNORE = 0, 19 ECMC_IGNORE = 0,
20 20
21 //! remove the gui element 21 //! remove the gui element
22 ECMC_REMOVE = 1, 22 ECMC_REMOVE = 1,
23 23
24 //! call setVisible(false) 24 //! call setVisible(false)
25 ECMC_HIDE = 2 25 ECMC_HIDE = 2
26 26
27 // note to implementors - this is planned as bitset, so continue with 4 if you need to add further flags. 27 // note to implementors - this is planned as bitset, so continue with 4 if you need to add further flags.
28 }; 28 };
29 29
30 //! GUI Context menu interface. 30 //! GUI Context menu interface.
31 /** \par This element can create the following events of type EGUI_EVENT_TYPE: 31 /** \par This element can create the following events of type EGUI_EVENT_TYPE:
32 \li EGET_ELEMENT_CLOSED 32 \li EGET_ELEMENT_CLOSED
33 \li EGET_MENU_ITEM_SELECTED 33 \li EGET_MENU_ITEM_SELECTED
34 */ 34 */
35 class IGUIContextMenu : public IGUIElement 35 class IGUIContextMenu : public IGUIElement
36 { 36 {
37 public: 37 public:
38 38
39 //! constructor 39 //! constructor
40 IGUIContextMenu(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) 40 IGUIContextMenu(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
41 : IGUIElement(EGUIET_CONTEXT_MENU, environment, parent, id, rectangle) {} 41 : IGUIElement(EGUIET_CONTEXT_MENU, environment, parent, id, rectangle) {}
42 42
43 //! set behavior when menus are closed 43 //! set behavior when menus are closed
44 virtual void setCloseHandling(ECONTEXT_MENU_CLOSE onClose) = 0; 44 virtual void setCloseHandling(ECONTEXT_MENU_CLOSE onClose) = 0;
45 45
46 //! get current behavior when the menu will be closed 46 //! get current behavior when the menu will be closed
47 virtual ECONTEXT_MENU_CLOSE getCloseHandling() const = 0; 47 virtual ECONTEXT_MENU_CLOSE getCloseHandling() const = 0;
48 48
49 //! Get amount of menu items 49 //! Get amount of menu items
50 virtual u32 getItemCount() const = 0; 50 virtual u32 getItemCount() const = 0;
51 51
52 //! Adds a menu item. 52 //! Adds a menu item.
53 /** \param text: Text of menu item. Set this to 0 to create 53 /** \param text: Text of menu item. Set this to 0 to create
54 an separator instead of a real item, which is the same like 54 an separator instead of a real item, which is the same like
55 calling addSeparator(); 55 calling addSeparator();
56 \param commandId: Command id of menu item, a simple id you may 56 \param commandId: Command id of menu item, a simple id you may
57 set to whatever you want. 57 set to whatever you want.
58 \param enabled: Specifies if the menu item should be enabled. 58 \param enabled: Specifies if the menu item should be enabled.
59 \param hasSubMenu: Set this to true if there should be a submenu 59 \param hasSubMenu: Set this to true if there should be a submenu
60 at this item. You can access this submenu via getSubMenu(). 60 at this item. You can access this submenu via getSubMenu().
61 \param checked: Specifies if the menu item should be initially checked. 61 \param checked: Specifies if the menu item should be initially checked.
62 \param autoChecking: Specifies if the item should be checked by clicking 62 \param autoChecking: Specifies if the item should be checked by clicking
63 \return Returns the index of the new item */ 63 \return Returns the index of the new item */
64 virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true, 64 virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true,
65 bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0; 65 bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0;
66 66
67 //! Insert a menu item at specified position. 67 //! Insert a menu item at specified position.
68 /** \param idx: Position to insert the new element, 68 /** \param idx: Position to insert the new element,
69 should be smaller than itemcount otherwise the item is added to the end. 69 should be smaller than itemcount otherwise the item is added to the end.
70 \param text: Text of menu item. Set this to 0 to create 70 \param text: Text of menu item. Set this to 0 to create
71 an separator instead of a real item, which is the same like 71 an separator instead of a real item, which is the same like
72 calling addSeparator(); 72 calling addSeparator();
73 \param commandId: Command id of menu item, a simple id you may 73 \param commandId: Command id of menu item, a simple id you may
74 set to whatever you want. 74 set to whatever you want.
75 \param enabled: Specifies if the menu item should be enabled. 75 \param enabled: Specifies if the menu item should be enabled.
76 \param hasSubMenu: Set this to true if there should be a submenu 76 \param hasSubMenu: Set this to true if there should be a submenu
77 at this item. You can access this submenu via getSubMenu(). 77 at this item. You can access this submenu via getSubMenu().
78 \param checked: Specifies if the menu item should be initially checked. 78 \param checked: Specifies if the menu item should be initially checked.
79 \param autoChecking: Specifies if the item should be checked by clicking 79 \param autoChecking: Specifies if the item should be checked by clicking
80 \return Returns the index of the new item */ 80 \return Returns the index of the new item */
81 virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId=-1, bool enabled=true, 81 virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId=-1, bool enabled=true,
82 bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0; 82 bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0;
83 83
84 //! Find an item by it's CommandID 84 //! Find an item by it's CommandID
85 /** 85 /**
86 \param commandId: We are looking for the first item which has this commandID 86 \param commandId: We are looking for the first item which has this commandID
87 \param idxStartSearch: Start searching from this index. 87 \param idxStartSearch: Start searching from this index.
88 \return Returns the index of the item when found or otherwise -1. */ 88 \return Returns the index of the item when found or otherwise -1. */
89 virtual s32 findItemWithCommandId(s32 commandId, u32 idxStartSearch=0) const = 0; 89 virtual s32 findItemWithCommandId(s32 commandId, u32 idxStartSearch=0) const = 0;
90 90
91 //! Adds a separator item to the menu 91 //! Adds a separator item to the menu
92 virtual void addSeparator() = 0; 92 virtual void addSeparator() = 0;
93 93
94 //! Get text of the menu item. 94 //! Get text of the menu item.
95 /** \param idx: Zero based index of the menu item */ 95 /** \param idx: Zero based index of the menu item */
96 virtual const wchar_t* getItemText(u32 idx) const = 0; 96 virtual const wchar_t* getItemText(u32 idx) const = 0;
97 97
98 //! Sets text of the menu item. 98 //! Sets text of the menu item.
99 /** \param idx: Zero based index of the menu item 99 /** \param idx: Zero based index of the menu item
100 \param text: New text of the item. */ 100 \param text: New text of the item. */
101 virtual void setItemText(u32 idx, const wchar_t* text) = 0; 101 virtual void setItemText(u32 idx, const wchar_t* text) = 0;
102 102
103 //! Check if a menu item is enabled 103 //! Check if a menu item is enabled
104 /** \param idx: Zero based index of the menu item */ 104 /** \param idx: Zero based index of the menu item */
105 virtual bool isItemEnabled(u32 idx) const = 0; 105 virtual bool isItemEnabled(u32 idx) const = 0;
106 106
107 //! Sets if the menu item should be enabled. 107 //! Sets if the menu item should be enabled.
108 /** \param idx: Zero based index of the menu item 108 /** \param idx: Zero based index of the menu item
109 \param enabled: True if it is enabled, otherwise false. */ 109 \param enabled: True if it is enabled, otherwise false. */
110 virtual void setItemEnabled(u32 idx, bool enabled) = 0; 110 virtual void setItemEnabled(u32 idx, bool enabled) = 0;
111 111
112 //! Sets if the menu item should be checked. 112 //! Sets if the menu item should be checked.
113 /** \param idx: Zero based index of the menu item 113 /** \param idx: Zero based index of the menu item
114 \param enabled: True if it is enabled, otherwise false. */ 114 \param enabled: True if it is enabled, otherwise false. */
115 virtual void setItemChecked(u32 idx, bool enabled) = 0; 115 virtual void setItemChecked(u32 idx, bool enabled) = 0;
116 116
117 //! Check if a menu item is checked 117 //! Check if a menu item is checked
118 /** \param idx: Zero based index of the menu item */ 118 /** \param idx: Zero based index of the menu item */
119 virtual bool isItemChecked(u32 idx) const = 0; 119 virtual bool isItemChecked(u32 idx) const = 0;
120 120
121 //! Removes a menu item 121 //! Removes a menu item
122 /** \param idx: Zero based index of the menu item */ 122 /** \param idx: Zero based index of the menu item */
123 virtual void removeItem(u32 idx) = 0; 123 virtual void removeItem(u32 idx) = 0;
124 124
125 //! Removes all menu items 125 //! Removes all menu items
126 virtual void removeAllItems() = 0; 126 virtual void removeAllItems() = 0;
127 127
128 //! Get the selected item in the menu 128 //! Get the selected item in the menu
129 /** \return Index of the selected item, -1 if none selected. */ 129 /** \return Index of the selected item, -1 if none selected. */
130 virtual s32 getSelectedItem() const = 0; 130 virtual s32 getSelectedItem() const = 0;
131 131
132 //! Get the command id of a menu item 132 //! Get the command id of a menu item
133 /** \param idx: Zero based index of the menu item */ 133 /** \param idx: Zero based index of the menu item */
134 virtual s32 getItemCommandId(u32 idx) const = 0; 134 virtual s32 getItemCommandId(u32 idx) const = 0;
135 135
136 //! Sets the command id of a menu item 136 //! Sets the command id of a menu item
137 /** \param idx: Zero based index of the menu item 137 /** \param idx: Zero based index of the menu item
138 \param id: Command id of menu item, a simple id you may 138 \param id: Command id of menu item, a simple id you may
139 set to whatever you want. */ 139 set to whatever you want. */
140 virtual void setItemCommandId(u32 idx, s32 id) = 0; 140 virtual void setItemCommandId(u32 idx, s32 id) = 0;
141 141
142 //! Get a pointer to the submenu of an item. 142 //! Get a pointer to the submenu of an item.
143 /** 0 is returned if there is no submenu 143 /** 0 is returned if there is no submenu
144 \param idx: Zero based index of the menu item 144 \param idx: Zero based index of the menu item
145 \return Returns a pointer to the submenu of an item. */ 145 \return Returns a pointer to the submenu of an item. */
146 virtual IGUIContextMenu* getSubMenu(u32 idx) const = 0; 146 virtual IGUIContextMenu* getSubMenu(u32 idx) const = 0;
147 147
148 //! should the element change the checked status on clicking 148 //! should the element change the checked status on clicking
149 virtual void setItemAutoChecking(u32 idx, bool autoChecking) = 0; 149 virtual void setItemAutoChecking(u32 idx, bool autoChecking) = 0;
150 150
151 //! does the element change the checked status on clicking 151 //! does the element change the checked status on clicking
152 virtual bool getItemAutoChecking(u32 idx) const = 0; 152 virtual bool getItemAutoChecking(u32 idx) const = 0;
153 153
154 //! When an eventparent is set it receives events instead of the usual parent element 154 //! When an eventparent is set it receives events instead of the usual parent element
155 virtual void setEventParent(IGUIElement *parent) = 0; 155 virtual void setEventParent(IGUIElement *parent) = 0;
156 }; 156 };
157 157
158} // end namespace gui 158} // end namespace gui
159} // end namespace irr 159} // end namespace irr
160 160
161#endif 161#endif
162 162