BsScriptGUIListBox.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "BsScriptEnginePrerequisites.h"
  3. #include "BsScriptGUIElement.h"
  4. #include "BsGUITexture.h"
  5. namespace BansheeEngine
  6. {
  7. /**
  8. * @brief Interop class between C++ & CLR for GUIListBox.
  9. */
  10. class BS_SCR_BE_EXPORT ScriptGUIListBox : public TScriptGUIElement<ScriptGUIListBox>
  11. {
  12. public:
  13. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "GUIListBox")
  14. private:
  15. ScriptGUIListBox(MonoObject* instance, GUIListBox* listBox);
  16. /**
  17. * @brief Triggered when the selected index in the native list box changes.
  18. */
  19. static void onSelectionChanged(MonoObject* instance, UINT32 index);
  20. /************************************************************************/
  21. /* CLR HOOKS */
  22. /************************************************************************/
  23. static void internal_createInstance(MonoObject* instance, MonoArray* elements, MonoString* style, MonoArray* guiOptions);
  24. static void internal_setElements(ScriptGUIListBox* nativeInstance, MonoArray* elements);
  25. static void internal_setTint(ScriptGUIListBox* nativeInstance, Color color);
  26. typedef void (__stdcall *OnSelectionChangedThunkDef) (MonoObject*, UINT32, MonoException**);
  27. static OnSelectionChangedThunkDef onSelectionChangedThunk;
  28. };
  29. }