BsScriptGUIElementStyle.h 6.4 KB

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