BsScriptGUIToggleField.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEditorPrerequisites.h"
  5. #include "Wrappers/GUI/BsScriptGUIElement.h"
  6. namespace bs
  7. {
  8. /** @addtogroup ScriptInteropEditor
  9. * @{
  10. */
  11. /** Interop class between C++ & CLR for GUIToggleField. */
  12. class BS_SCR_BED_EXPORT ScriptGUIToggleField : public TScriptGUIElement<ScriptGUIToggleField>
  13. {
  14. public:
  15. SCRIPT_OBJ(EDITOR_ASSEMBLY, "BansheeEditor", "GUIToggleField")
  16. private:
  17. /**
  18. * Triggered when the value in the native toggle field changes.
  19. *
  20. * @param[in] newValue Is the toggle active.
  21. */
  22. void onChanged(bool newValue);
  23. ScriptGUIToggleField(MonoObject* instance, GUIToggleField* toggleField);
  24. /************************************************************************/
  25. /* CLR HOOKS */
  26. /************************************************************************/
  27. static void internal_createInstance(MonoObject* instance, MonoObject* title, UINT32 titleWidth,
  28. MonoString* style, MonoArray* guiOptions, bool withTitle);
  29. static void internal_getValue(ScriptGUIToggleField* nativeInstance, bool* output);
  30. static void internal_setValue(ScriptGUIToggleField* nativeInstance, bool value);
  31. static void internal_setTint(ScriptGUIToggleField* nativeInstance, Color* color);
  32. typedef void(BS_THUNKCALL *OnChangedThunkDef) (MonoObject*, bool, MonoException**);
  33. static OnChangedThunkDef onChangedThunk;
  34. };
  35. /** @} */
  36. }