| 1 | /**************************************************** | 
|---|
| 2 |         EventArgs casting helper functions. | 
|---|
| 3 |         These are not part of the core CEGUI API, merely here for | 
|---|
| 4 |         convenience | 
|---|
| 5 | *****************************************************/ | 
|---|
| 6 | $[ | 
|---|
| 7 |  | 
|---|
| 8 | function CEGUI.toMouseCursorEventArgs(e) | 
|---|
| 9 |     return tolua.cast(e,"const CEGUI::MouseCursorEventArgs") | 
|---|
| 10 | end | 
|---|
| 11 |  | 
|---|
| 12 | function CEGUI.toWindowEventArgs(e) | 
|---|
| 13 |     return tolua.cast(e,"const CEGUI::WindowEventArgs") | 
|---|
| 14 | end | 
|---|
| 15 |  | 
|---|
| 16 | function CEGUI.toActivationEventArgs(e) | 
|---|
| 17 |     return tolua.cast(e,"const CEGUI::ActivationEventArgs") | 
|---|
| 18 | end | 
|---|
| 19 |  | 
|---|
| 20 | function CEGUI.toHeaderSequenceEventArgs(e) | 
|---|
| 21 |     return tolua.cast(e,"const CEGUI::HeaderSequenceEventArgs") | 
|---|
| 22 | end | 
|---|
| 23 |  | 
|---|
| 24 | function CEGUI.toMouseEventArgs(e) | 
|---|
| 25 |     return tolua.cast(e,"const CEGUI::MouseEventArgs") | 
|---|
| 26 | end | 
|---|
| 27 |  | 
|---|
| 28 | function CEGUI.toKeyEventArgs(e) | 
|---|
| 29 |     return tolua.cast(e,"const CEGUI::KeyEventArgs") | 
|---|
| 30 | end | 
|---|
| 31 |  | 
|---|
| 32 | function CEGUI.toDragDropEventArgs(e) | 
|---|
| 33 |     return tolua.cast(e,"const CEGUI::DragDropEventArgs") | 
|---|
| 34 | end | 
|---|
| 35 |  | 
|---|
| 36 | function CEGUI.toTreeEventArgs(e) | 
|---|
| 37 |     return tolua.cast(e,"const CEGUI::TreeEventArgs") | 
|---|
| 38 | end | 
|---|
| 39 |  | 
|---|
| 40 | CEGUI.EventArgs.toMouseCursorEventArgs      = CEGUI.toMouseCursorEventArgs | 
|---|
| 41 | CEGUI.EventArgs.toWindowEventArgs           = CEGUI.toWindowEventArgs | 
|---|
| 42 | CEGUI.EventArgs.toActivationEventArgs       = CEGUI.toActivationEventArgs | 
|---|
| 43 | CEGUI.EventArgs.toHeaderSequenceEventArgs   = CEGUI.toHeaderSequenceEventArgs | 
|---|
| 44 | CEGUI.EventArgs.toMouseEventArgs            = CEGUI.toMouseEventArgs | 
|---|
| 45 | CEGUI.EventArgs.toKeyEventArgs              = CEGUI.toKeyEventArgs | 
|---|
| 46 | CEGUI.EventArgs.toDragDropEventArgs         = CEGUI.toDragDropEventArgs | 
|---|
| 47 | CEGUI.EventArgs.toTreeEventArgs             = CEGUI.toTreeEventArgs | 
|---|
| 48 |  | 
|---|
| 49 | $] | 
|---|
| 50 |  | 
|---|
| 51 |  | 
|---|
| 52 | /**************************************************** | 
|---|
| 53 |         Functions for easy casting CEGUI::Window class | 
|---|
| 54 |         to the widget classes derived from it. | 
|---|
| 55 |          | 
|---|
| 56 |         all widget types gets these and they are made available as: | 
|---|
| 57 |         CEGUI.toButtonBase and CEGUI.Window:toButtonBase | 
|---|
| 58 |         etc... | 
|---|
| 59 | *****************************************************/ | 
|---|
| 60 | $[ | 
|---|
| 61 |  | 
|---|
| 62 | function CEGUI.toButtonBase(w) | 
|---|
| 63 |     return tolua.cast(w,"CEGUI::ButtonBase") | 
|---|
| 64 | end | 
|---|
| 65 |  | 
|---|
| 66 | function CEGUI.toCheckbox(w) | 
|---|
| 67 |     return tolua.cast(w,"CEGUI::Checkbox") | 
|---|
| 68 | end | 
|---|
| 69 |  | 
|---|
| 70 | function CEGUI.toCombobox(w) | 
|---|
| 71 |     return tolua.cast(w,"CEGUI::Combobox") | 
|---|
| 72 | end | 
|---|
| 73 |  | 
|---|
| 74 | function CEGUI.toComboDropList(w) | 
|---|
| 75 |     return tolua.cast(w,"CEGUI::ComboDropList") | 
|---|
| 76 | end | 
|---|
| 77 |  | 
|---|
| 78 | function CEGUI.toDragContainer(w) | 
|---|
| 79 |     return tolua.cast(w,"CEGUI::DragContainer") | 
|---|
| 80 | end | 
|---|
| 81 |  | 
|---|
| 82 | function CEGUI.toEditbox(w) | 
|---|
| 83 |     return tolua.cast(w,"CEGUI::Editbox") | 
|---|
| 84 | end | 
|---|
| 85 |  | 
|---|
| 86 | function CEGUI.toFrameWindow(w) | 
|---|
| 87 |     return tolua.cast(w,"CEGUI::FrameWindow") | 
|---|
| 88 | end | 
|---|
| 89 |  | 
|---|
| 90 | function CEGUI.toGUISheet(w) | 
|---|
| 91 |     return tolua.cast(w,"CEGUI::GUISheet") | 
|---|
| 92 | end | 
|---|
| 93 |  | 
|---|
| 94 | function CEGUI.toItemEntry(w) | 
|---|
| 95 |     return tolua.cast(w,"CEGUI::ItemEntry") | 
|---|
| 96 | end | 
|---|
| 97 |  | 
|---|
| 98 | function CEGUI.toItemListBase(w) | 
|---|
| 99 |     return tolua.cast(w,"CEGUI::ItemListBase") | 
|---|
| 100 | end | 
|---|
| 101 |  | 
|---|
| 102 | function CEGUI.toItemListbox(w) | 
|---|
| 103 |     return tolua.cast(w,"CEGUI::ItemListbox") | 
|---|
| 104 | end | 
|---|
| 105 |  | 
|---|
| 106 | function CEGUI.toListbox(w) | 
|---|
| 107 |     return tolua.cast(w,"CEGUI::Listbox") | 
|---|
| 108 | end | 
|---|
| 109 |  | 
|---|
| 110 | function CEGUI.toListHeader(w) | 
|---|
| 111 |     return tolua.cast(w,"CEGUI::ListHeader") | 
|---|
| 112 | end | 
|---|
| 113 |  | 
|---|
| 114 | function CEGUI.toListHeaderSegment(w) | 
|---|
| 115 |     return tolua.cast(w,"CEGUI::ListHeaderSegment") | 
|---|
| 116 | end | 
|---|
| 117 |  | 
|---|
| 118 | function CEGUI.toMenubar(w) | 
|---|
| 119 |     return tolua.cast(w,"CEGUI::Menubar") | 
|---|
| 120 | end | 
|---|
| 121 |  | 
|---|
| 122 | function CEGUI.toMenuBase(w) | 
|---|
| 123 |     return tolua.cast(w,"CEGUI::MenuBase") | 
|---|
| 124 | end | 
|---|
| 125 |  | 
|---|
| 126 | function CEGUI.toMenuItem(w) | 
|---|
| 127 |     return tolua.cast(w,"CEGUI::MenuItem") | 
|---|
| 128 | end | 
|---|
| 129 |  | 
|---|
| 130 | function CEGUI.toMultiColumnList(w) | 
|---|
| 131 |     return tolua.cast(w,"CEGUI::MultiColumnList") | 
|---|
| 132 | end | 
|---|
| 133 |  | 
|---|
| 134 | function CEGUI.toMultiLineEditbox(w) | 
|---|
| 135 |     return tolua.cast(w,"CEGUI::MultiLineEditbox") | 
|---|
| 136 | end | 
|---|
| 137 |  | 
|---|
| 138 | function CEGUI.toPopupMenu(w) | 
|---|
| 139 |     return tolua.cast(w,"CEGUI::PopupMenu") | 
|---|
| 140 | end | 
|---|
| 141 |  | 
|---|
| 142 | function CEGUI.toProgressBar(w) | 
|---|
| 143 |     return tolua.cast(w,"CEGUI::ProgressBar") | 
|---|
| 144 | end | 
|---|
| 145 |  | 
|---|
| 146 | function CEGUI.toPushButton(w) | 
|---|
| 147 |     return tolua.cast(w,"CEGUI::PushButton") | 
|---|
| 148 | end | 
|---|
| 149 |  | 
|---|
| 150 | function CEGUI.toRadioButton(w) | 
|---|
| 151 |     return tolua.cast(w,"CEGUI::RadioButton") | 
|---|
| 152 | end | 
|---|
| 153 |  | 
|---|
| 154 | function CEGUI.toScrollablePane(w) | 
|---|
| 155 |     return tolua.cast(w,"CEGUI::ScrollablePane") | 
|---|
| 156 | end | 
|---|
| 157 |  | 
|---|
| 158 | function CEGUI.toScrollbar(w) | 
|---|
| 159 |     return tolua.cast(w,"CEGUI::Scrollbar") | 
|---|
| 160 | end | 
|---|
| 161 |  | 
|---|
| 162 | function CEGUI.toScrolledContainer(w) | 
|---|
| 163 |     return tolua.cast(w,"CEGUI::ScrolledContainer") | 
|---|
| 164 | end | 
|---|
| 165 |  | 
|---|
| 166 | function CEGUI.toScrolledItemListBase(w) | 
|---|
| 167 |     return tolua.cast(w,"CEGUI::ScrolledItemListBase") | 
|---|
| 168 | end | 
|---|
| 169 |  | 
|---|
| 170 | function CEGUI.toSlider(w) | 
|---|
| 171 |     return tolua.cast(w,"CEGUI::Slider") | 
|---|
| 172 | end | 
|---|
| 173 |  | 
|---|
| 174 | function CEGUI.toSpinner(w) | 
|---|
| 175 |     return tolua.cast(w,"CEGUI::Spinner") | 
|---|
| 176 | end | 
|---|
| 177 |  | 
|---|
| 178 | function CEGUI.toTabButton(w) | 
|---|
| 179 |     return tolua.cast(w,"CEGUI::TabButton") | 
|---|
| 180 | end | 
|---|
| 181 |  | 
|---|
| 182 | function CEGUI.toTabControl(w) | 
|---|
| 183 |     return tolua.cast(w,"CEGUI::TabControl") | 
|---|
| 184 | end | 
|---|
| 185 |  | 
|---|
| 186 | function CEGUI.toTabPane(w) | 
|---|
| 187 |     return tolua.cast(w,"CEGUI::TabPane") | 
|---|
| 188 | end | 
|---|
| 189 |  | 
|---|
| 190 | function CEGUI.toThumb(w) | 
|---|
| 191 |     return tolua.cast(w,"CEGUI::Thumb") | 
|---|
| 192 | end | 
|---|
| 193 |  | 
|---|
| 194 | function CEGUI.toTooltip(w) | 
|---|
| 195 |     return tolua.cast(w,"CEGUI::Tooltip") | 
|---|
| 196 | end | 
|---|
| 197 |  | 
|---|
| 198 | CEGUI.Window.toButtonBase = CEGUI.toButtonBase | 
|---|
| 199 | CEGUI.Window.toCheckbox = CEGUI.toCheckbox | 
|---|
| 200 | CEGUI.Window.toCombobox = CEGUI.toCombobox | 
|---|
| 201 | CEGUI.Window.toComboDropList = CEGUI.toComboDropList | 
|---|
| 202 | CEGUI.Window.toDragContainer = CEGUI.toDragContainer | 
|---|
| 203 | CEGUI.Window.toEditbox = CEGUI.toEditbox | 
|---|
| 204 | CEGUI.Window.toFrameWindow = CEGUI.toFrameWindow | 
|---|
| 205 | CEGUI.Window.toGUISheet = CEGUI.toGUISheet | 
|---|
| 206 | CEGUI.Window.toItemEntry = CEGUI.toItemEntry | 
|---|
| 207 | CEGUI.Window.toItemListBase = CEGUI.toItemListBase | 
|---|
| 208 | CEGUI.Window.toItemListbox = CEGUI.toItemListBase | 
|---|
| 209 | CEGUI.Window.toListbox = CEGUI.toListbox | 
|---|
| 210 | CEGUI.Window.toListHeader = CEGUI.toListHeader | 
|---|
| 211 | CEGUI.Window.toListHeaderSegment = CEGUI.toListHeaderSegment | 
|---|
| 212 | CEGUI.Window.toMenubar = CEGUI.toMenubar | 
|---|
| 213 | CEGUI.Window.toMenuBase = CEGUI.toMenuBase | 
|---|
| 214 | CEGUI.Window.toMenuItem = CEGUI.toMenuItem | 
|---|
| 215 | CEGUI.Window.toMultiColumnList = CEGUI.toMultiColumnList | 
|---|
| 216 | CEGUI.Window.toMultiLineEditbox = CEGUI.toMultiLineEditbox | 
|---|
| 217 | CEGUI.Window.toPopupMenu = CEGUI.toPopupMenu | 
|---|
| 218 | CEGUI.Window.toProgressBar = CEGUI.toProgressBar | 
|---|
| 219 | CEGUI.Window.toPushButton = CEGUI.toPushButton | 
|---|
| 220 | CEGUI.Window.toRadioButton = CEGUI.toRadioButton | 
|---|
| 221 | CEGUI.Window.toScrollablePane = CEGUI.toScrollablePane | 
|---|
| 222 | CEGUI.Window.toScrollbar = CEGUI.toScrollbar | 
|---|
| 223 | CEGUI.Window.toScrolledContainer = CEGUI.toScrolledContainer | 
|---|
| 224 | CEGUI.Window.toScrolledItemListBase = CEGUI.toScrolledItemListBase | 
|---|
| 225 | CEGUI.Window.toSlider = CEGUI.toSlider | 
|---|
| 226 | CEGUI.Window.toSpinner = CEGUI.toSpinner | 
|---|
| 227 | CEGUI.Window.toTabButton = CEGUI.toTabButton | 
|---|
| 228 | CEGUI.Window.toTabControl = CEGUI.toTabControl | 
|---|
| 229 | CEGUI.Window.toTabPane = CEGUI.toTabPane | 
|---|
| 230 | CEGUI.Window.toThumb = CEGUI.toThumb | 
|---|
| 231 | CEGUI.Window.toTooltip = CEGUI.toTooltip | 
|---|
| 232 |  | 
|---|
| 233 | $] | 
|---|
| 234 |  | 
|---|
| 235 |  | 
|---|
| 236 | /**************************************************** | 
|---|
| 237 |         Helper to create a ListboxTextItem. | 
|---|
| 238 |         Mimics the constructor | 
|---|
| 239 | *****************************************************/ | 
|---|
| 240 | ListboxTextItem* ceguiLua_createListboxTextItem @ createListboxTextItem(string text, unsigned int item_id=0, void* item_data=0, bool disabled=false, bool auto_delete=true); | 
|---|