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