BsScriptGUIElementStyle.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEnginePrerequisites.h"
  5. #include "BsScriptObject.h"
  6. #include "Wrappers/GUI/BsScriptGUIElementStateStyle.h"
  7. namespace bs
  8. {
  9. /** @addtogroup ScriptInteropEngine
  10. * @{
  11. */
  12. /** Interop class between C++ & CLR for GUIElementStyle. */
  13. class BS_SCR_BE_EXPORT ScriptGUIElementStyle : public ScriptObject<ScriptGUIElementStyle>
  14. {
  15. public:
  16. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "GUIElementStyle")
  17. ~ScriptGUIElementStyle();
  18. /** Returns the wrapped GUIElementStyle instance. */
  19. GUIElementStyle& getInternalValue() { return mElementStyle; }
  20. /** Creates a new managed object containing a copy of the provided style. */
  21. static MonoObject* create(const GUIElementStyle& style);
  22. private:
  23. /** Creates the interop object with a default style. */
  24. ScriptGUIElementStyle(MonoObject* instance);
  25. /** Creates the interop object referencing an existing style. */
  26. ScriptGUIElementStyle(MonoObject* instance, const GUIElementStyle& externalStyle);
  27. GUIElementStyle mElementStyle;
  28. /************************************************************************/
  29. /* CLR HOOKS */
  30. /************************************************************************/
  31. static void internal_createInstance(MonoObject* instance);
  32. static void internal_addSubStyle(ScriptGUIElementStyle* nativeInstance, MonoString* guiType, MonoString* styleName);
  33. static void internal_GetFont(ScriptGUIElementStyle* nativeInstance, MonoObject** value);
  34. static void internal_SetFont(ScriptGUIElementStyle* nativeInstance, MonoObject* value);
  35. static void internal_GetFontSize(ScriptGUIElementStyle* nativeInstance, UINT32* value);
  36. static void internal_SetFontSize(ScriptGUIElementStyle* nativeInstance, UINT32 value);
  37. static void internal_GetTextHorzAlign(ScriptGUIElementStyle* nativeInstance, TextHorzAlign*value);
  38. static void internal_SetTextHorzAlign(ScriptGUIElementStyle* nativeInstance, TextHorzAlign value);
  39. static void internal_GetTextVertAlign(ScriptGUIElementStyle* nativeInstance, TextVertAlign* value);
  40. static void internal_SetTextVertAlign(ScriptGUIElementStyle* nativeInstance, TextVertAlign value);
  41. static void internal_GetImagePosition(ScriptGUIElementStyle* nativeInstance, GUIImagePosition* value);
  42. static void internal_SetImagePosition(ScriptGUIElementStyle* nativeInstance, GUIImagePosition value);
  43. static void internal_GetWordWrap(ScriptGUIElementStyle* nativeInstance, bool* value);
  44. static void internal_SetWordWrap(ScriptGUIElementStyle* nativeInstance, bool value);
  45. static void internal_GetNormal(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  46. static void internal_SetNormal(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  47. static void internal_GetHover(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  48. static void internal_SetHover(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  49. static void internal_GetActive(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  50. static void internal_SetActive(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  51. static void internal_GetFocused(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  52. static void internal_SetFocused(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  53. static void internal_GetNormalOn(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  54. static void internal_SetNormalOn(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  55. static void internal_GetHoverOn(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  56. static void internal_SetHoverOn(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  57. static void internal_GetActiveOn(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  58. static void internal_SetActiveOn(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  59. static void internal_GetFocusedOn(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  60. static void internal_SetFocusedOn(ScriptGUIElementStyle* nativeInstance, ScriptGUIElementStateStyleStruct* value);
  61. static void internal_GetBorder(ScriptGUIElementStyle* nativeInstance, RectOffset* value);
  62. static void internal_SetBorder(ScriptGUIElementStyle* nativeInstance, RectOffset* value);
  63. static void internal_GetMargins(ScriptGUIElementStyle* nativeInstance, RectOffset* value);
  64. static void internal_SetMargins(ScriptGUIElementStyle* nativeInstance, RectOffset* value);
  65. static void internal_GetContentOffset(ScriptGUIElementStyle* nativeInstance, RectOffset* value);
  66. static void internal_SetContentOffset(ScriptGUIElementStyle* nativeInstance, RectOffset* value);
  67. static void internal_GetWidth(ScriptGUIElementStyle* nativeInstance, UINT32* value);
  68. static void internal_SetWidth(ScriptGUIElementStyle* nativeInstance, UINT32 value);
  69. static void internal_GetHeight(ScriptGUIElementStyle* nativeInstance, UINT32* value);
  70. static void internal_SetHeight(ScriptGUIElementStyle* nativeInstance, UINT32 value);
  71. static void internal_GetMinWidth(ScriptGUIElementStyle* nativeInstance, UINT32* value);
  72. static void internal_SetMinWidth(ScriptGUIElementStyle* nativeInstance, UINT32 value);
  73. static void internal_GetMaxWidth(ScriptGUIElementStyle* nativeInstance, UINT32* value);
  74. static void internal_SetMaxWidth(ScriptGUIElementStyle* nativeInstance, UINT32 value);
  75. static void internal_GetMinHeight(ScriptGUIElementStyle* nativeInstance, UINT32* value);
  76. static void internal_SetMinHeight(ScriptGUIElementStyle* nativeInstance, UINT32 value);
  77. static void internal_GetMaxHeight(ScriptGUIElementStyle* nativeInstance, UINT32* value);
  78. static void internal_SetMaxHeight(ScriptGUIElementStyle* nativeInstance, UINT32 value);
  79. static void internal_GetFixedWidth(ScriptGUIElementStyle* nativeInstance, bool* value);
  80. static void internal_SetFixedWidth(ScriptGUIElementStyle* nativeInstance, bool value);
  81. static void internal_GetFixedHeight(ScriptGUIElementStyle* nativeInstance, bool* value);
  82. static void internal_SetFixedHeight(ScriptGUIElementStyle* nativeInstance, bool value);
  83. };
  84. /** @} */
  85. }