BsScriptGUIElementStyle.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. #include "BsScriptGUIElementStyle.h"
  2. #include "BsScriptMeta.h"
  3. #include "BsMonoField.h"
  4. #include "BsMonoClass.h"
  5. #include "BsMonoManager.h"
  6. #include "BsScriptFont.h"
  7. #include "BsException.h"
  8. #include "BsGUIElementStyle.h"
  9. #include "BsScriptGUIElementStateStyle.h"
  10. #include "BsMonoUtil.h"
  11. namespace BansheeEngine
  12. {
  13. ScriptGUIElementStyle::ScriptGUIElementStyle(MonoObject* instance, const String& name)
  14. :ScriptObject(instance), mName(name), mElementStyle(bs_new<GUIElementStyle>()), mFont(nullptr), mOwnsStyle(true), mNormal(nullptr), mHover(nullptr),
  15. mActive(nullptr), mFocused(nullptr), mNormalOn(nullptr), mHoverOn(nullptr), mActiveOn(nullptr), mFocusedOn(nullptr)
  16. {
  17. }
  18. ScriptGUIElementStyle::ScriptGUIElementStyle(MonoObject* instance, const String& name, GUIElementStyle* externalStyle)
  19. :ScriptObject(instance), mName(name), mElementStyle(externalStyle), mFont(nullptr), mOwnsStyle(false), mNormal(nullptr), mHover(nullptr),
  20. mActive(nullptr), mFocused(nullptr), mNormalOn(nullptr), mHoverOn(nullptr), mActiveOn(nullptr), mFocusedOn(nullptr)
  21. {
  22. }
  23. ScriptGUIElementStyle::~ScriptGUIElementStyle()
  24. {
  25. if(mOwnsStyle)
  26. bs_delete(mElementStyle);
  27. }
  28. void ScriptGUIElementStyle::initRuntimeData()
  29. {
  30. metaData.scriptClass->addInternalCall("Internal_CreateInstance", &ScriptGUIElementStyle::internal_createInstance);
  31. metaData.scriptClass->addInternalCall("Internal_AddSubStyle", &ScriptGUIElementStyle::internal_addSubStyle);
  32. metaData.scriptClass->addInternalCall("Internal_GetFont", &ScriptGUIElementStyle::internal_GetFont);
  33. metaData.scriptClass->addInternalCall("Internal_SetFont", &ScriptGUIElementStyle::internal_SetFont);
  34. metaData.scriptClass->addInternalCall("Internal_GetFontSize", &ScriptGUIElementStyle::internal_GetFontSize);
  35. metaData.scriptClass->addInternalCall("Internal_SetFontSize", &ScriptGUIElementStyle::internal_SetFontSize);
  36. metaData.scriptClass->addInternalCall("Internal_GetTextHorzAlign", &ScriptGUIElementStyle::internal_GetTextHorzAlign);
  37. metaData.scriptClass->addInternalCall("Internal_SetTextHorzAlign", &ScriptGUIElementStyle::internal_SetTextHorzAlign);
  38. metaData.scriptClass->addInternalCall("Internal_GetTextVertAlign", &ScriptGUIElementStyle::internal_GetTextVertAlign);
  39. metaData.scriptClass->addInternalCall("Internal_SetTextVertAlign", &ScriptGUIElementStyle::internal_SetTextVertAlign);
  40. metaData.scriptClass->addInternalCall("Internal_GetImagePosition", &ScriptGUIElementStyle::internal_GetImagePosition);
  41. metaData.scriptClass->addInternalCall("Internal_SetImagePosition", &ScriptGUIElementStyle::internal_SetImagePosition);
  42. metaData.scriptClass->addInternalCall("Internal_GetWordWrap", &ScriptGUIElementStyle::internal_GetWordWrap);
  43. metaData.scriptClass->addInternalCall("Internal_SetWordWrap", &ScriptGUIElementStyle::internal_SetWordWrap);
  44. metaData.scriptClass->addInternalCall("Internal_GetNormal", &ScriptGUIElementStyle::internal_GetNormal);
  45. metaData.scriptClass->addInternalCall("Internal_SetNormal", &ScriptGUIElementStyle::internal_SetNormal);
  46. metaData.scriptClass->addInternalCall("Internal_GetHover", &ScriptGUIElementStyle::internal_GetHover);
  47. metaData.scriptClass->addInternalCall("Internal_SetHover", &ScriptGUIElementStyle::internal_SetHover);
  48. metaData.scriptClass->addInternalCall("Internal_GetActive", &ScriptGUIElementStyle::internal_GetActive);
  49. metaData.scriptClass->addInternalCall("Internal_SetActive", &ScriptGUIElementStyle::internal_SetActive);
  50. metaData.scriptClass->addInternalCall("Internal_GetFocused", &ScriptGUIElementStyle::internal_GetFocused);
  51. metaData.scriptClass->addInternalCall("Internal_SetFocused", &ScriptGUIElementStyle::internal_SetFocused);
  52. metaData.scriptClass->addInternalCall("Internal_GetNormalOn", &ScriptGUIElementStyle::internal_GetNormalOn);
  53. metaData.scriptClass->addInternalCall("Internal_SetNormalOn", &ScriptGUIElementStyle::internal_SetNormalOn);
  54. metaData.scriptClass->addInternalCall("Internal_GetHoverOn", &ScriptGUIElementStyle::internal_GetHoverOn);
  55. metaData.scriptClass->addInternalCall("Internal_SetHoverOn", &ScriptGUIElementStyle::internal_SetHoverOn);
  56. metaData.scriptClass->addInternalCall("Internal_GetActiveOn", &ScriptGUIElementStyle::internal_GetActiveOn);
  57. metaData.scriptClass->addInternalCall("Internal_SetActiveOn", &ScriptGUIElementStyle::internal_SetActiveOn);
  58. metaData.scriptClass->addInternalCall("Internal_GetFocusedOn", &ScriptGUIElementStyle::internal_GetFocusedOn);
  59. metaData.scriptClass->addInternalCall("Internal_SetFocusedOn", &ScriptGUIElementStyle::internal_SetFocusedOn);
  60. metaData.scriptClass->addInternalCall("Internal_GetBorder", &ScriptGUIElementStyle::internal_GetBorder);
  61. metaData.scriptClass->addInternalCall("Internal_SetBorder", &ScriptGUIElementStyle::internal_SetBorder);
  62. metaData.scriptClass->addInternalCall("Internal_GetMargins", &ScriptGUIElementStyle::internal_GetMargins);
  63. metaData.scriptClass->addInternalCall("Internal_SetMargins", &ScriptGUIElementStyle::internal_SetMargins);
  64. metaData.scriptClass->addInternalCall("Internal_GetContentOffset", &ScriptGUIElementStyle::internal_GetContentOffset);
  65. metaData.scriptClass->addInternalCall("Internal_SetContentOffset", &ScriptGUIElementStyle::internal_SetContentOffset);
  66. metaData.scriptClass->addInternalCall("Internal_GetWidth", &ScriptGUIElementStyle::internal_GetWidth);
  67. metaData.scriptClass->addInternalCall("Internal_SetWidth", &ScriptGUIElementStyle::internal_SetWidth);
  68. metaData.scriptClass->addInternalCall("Internal_GetHeight", &ScriptGUIElementStyle::internal_GetHeight);
  69. metaData.scriptClass->addInternalCall("Internal_SetHeight", &ScriptGUIElementStyle::internal_SetHeight);
  70. metaData.scriptClass->addInternalCall("Internal_GetMinWidth", &ScriptGUIElementStyle::internal_GetMinWidth);
  71. metaData.scriptClass->addInternalCall("Internal_SetMinWidth", &ScriptGUIElementStyle::internal_SetMinWidth);
  72. metaData.scriptClass->addInternalCall("Internal_GetMaxWidth", &ScriptGUIElementStyle::internal_GetMaxWidth);
  73. metaData.scriptClass->addInternalCall("Internal_SetMaxWidth", &ScriptGUIElementStyle::internal_SetMaxWidth);
  74. metaData.scriptClass->addInternalCall("Internal_GetMinHeight", &ScriptGUIElementStyle::internal_GetMinHeight);
  75. metaData.scriptClass->addInternalCall("Internal_SetMinHeight", &ScriptGUIElementStyle::internal_SetMinHeight);
  76. metaData.scriptClass->addInternalCall("Internal_GetMaxHeight", &ScriptGUIElementStyle::internal_GetMaxHeight);
  77. metaData.scriptClass->addInternalCall("Internal_SetMaxHeight", &ScriptGUIElementStyle::internal_SetMaxHeight);
  78. metaData.scriptClass->addInternalCall("Internal_GetFixedWidth", &ScriptGUIElementStyle::internal_GetFixedWidth);
  79. metaData.scriptClass->addInternalCall("Internal_SetFixedWidth", &ScriptGUIElementStyle::internal_SetFixedWidth);
  80. metaData.scriptClass->addInternalCall("Internal_GetFixedHeight", &ScriptGUIElementStyle::internal_GetFixedHeight);
  81. metaData.scriptClass->addInternalCall("Internal_SetFixedHeight", &ScriptGUIElementStyle::internal_SetFixedHeight);
  82. }
  83. void ScriptGUIElementStyle::internal_createInstance(MonoObject* instance, MonoString* name)
  84. {
  85. char* nativeName = mono_string_to_utf8(name);
  86. String styleName(nativeName);
  87. free(nativeName);
  88. ScriptGUIElementStyle* nativeInstance = new (bs_alloc<ScriptGUIElementStyle>()) ScriptGUIElementStyle(instance, styleName);
  89. }
  90. void ScriptGUIElementStyle::internal_createInstanceExternal(MonoObject* instance, MonoString* name, GUIElementStyle* externalStyle)
  91. {
  92. char* nativeName = mono_string_to_utf8(name);
  93. String styleName(nativeName);
  94. free(nativeName);
  95. ScriptGUIElementStyle* nativeInstance = new (bs_alloc<ScriptGUIElementStyle>()) ScriptGUIElementStyle(instance, styleName, externalStyle);
  96. }
  97. void ScriptGUIElementStyle::internal_addSubStyle(ScriptGUIElementStyle* nativeInstance, MonoString* guiType, MonoString* styleName)
  98. {
  99. String guiTypeStr = MonoUtil::monoToString(guiType);
  100. String styleNameStr = MonoUtil::monoToString(styleName);
  101. nativeInstance->getInternalValue()->subStyles[guiTypeStr] = styleNameStr;
  102. }
  103. void ScriptGUIElementStyle::internal_GetFont(ScriptGUIElementStyle* nativeInstance, MonoObject** value)
  104. {
  105. throwIfInstancesDontMatch(nativeInstance->mFont, nativeInstance->mElementStyle->font.get());
  106. if (nativeInstance->mFont != nullptr)
  107. {
  108. *value = nativeInstance->mFont->getManagedInstance();
  109. return;
  110. }
  111. *value = nullptr;
  112. }
  113. void ScriptGUIElementStyle::internal_SetFont(ScriptGUIElementStyle* nativeInstance, MonoObject* value)
  114. {
  115. ScriptFont* nativeValue = ScriptFont::toNative(value);
  116. nativeInstance->mElementStyle->font = static_resource_cast<Font>(nativeValue->getNativeHandle());
  117. nativeInstance->mFont = nativeValue;
  118. }
  119. void ScriptGUIElementStyle::internal_GetFontSize(ScriptGUIElementStyle* nativeInstance, UINT32* value)
  120. {
  121. *value = nativeInstance->mElementStyle->fontSize;
  122. }
  123. void ScriptGUIElementStyle::internal_SetFontSize(ScriptGUIElementStyle* nativeInstance, UINT32 value)
  124. {
  125. nativeInstance->mElementStyle->fontSize = value;
  126. }
  127. void ScriptGUIElementStyle::internal_GetTextHorzAlign(ScriptGUIElementStyle* nativeInstance, TextHorzAlign*value)
  128. {
  129. *value = nativeInstance->mElementStyle->textHorzAlign;
  130. }
  131. void ScriptGUIElementStyle::internal_SetTextHorzAlign(ScriptGUIElementStyle* nativeInstance, TextHorzAlign value)
  132. {
  133. nativeInstance->mElementStyle->textHorzAlign = value;
  134. }
  135. void ScriptGUIElementStyle::internal_GetTextVertAlign(ScriptGUIElementStyle* nativeInstance, TextVertAlign* value)
  136. {
  137. *value = nativeInstance->mElementStyle->textVertAlign;
  138. }
  139. void ScriptGUIElementStyle::internal_SetTextVertAlign(ScriptGUIElementStyle* nativeInstance, TextVertAlign value)
  140. {
  141. nativeInstance->mElementStyle->textVertAlign = value;
  142. }
  143. void ScriptGUIElementStyle::internal_GetImagePosition(ScriptGUIElementStyle* nativeInstance, GUIImagePosition* value)
  144. {
  145. *value = nativeInstance->mElementStyle->imagePosition;
  146. }
  147. void ScriptGUIElementStyle::internal_SetImagePosition(ScriptGUIElementStyle* nativeInstance, GUIImagePosition value)
  148. {
  149. nativeInstance->mElementStyle->imagePosition = value;
  150. }
  151. void ScriptGUIElementStyle::internal_GetWordWrap(ScriptGUIElementStyle* nativeInstance, bool* value)
  152. {
  153. *value = nativeInstance->mElementStyle->wordWrap;
  154. }
  155. void ScriptGUIElementStyle::internal_SetWordWrap(ScriptGUIElementStyle* nativeInstance, bool value)
  156. {
  157. nativeInstance->mElementStyle->wordWrap = value;
  158. }
  159. void ScriptGUIElementStyle::internal_GetNormal(ScriptGUIElementStyle* nativeInstance, MonoObject** value)
  160. {
  161. throwIfInstancesDontMatch(nativeInstance->mNormal, &nativeInstance->mElementStyle->normal);
  162. if (nativeInstance->mNormal != nullptr)
  163. {
  164. *value = nativeInstance->mNormal->getManagedInstance();
  165. return;
  166. }
  167. *value = nullptr;
  168. }
  169. void ScriptGUIElementStyle::internal_SetNormal(ScriptGUIElementStyle* nativeInstance, MonoObject* value)
  170. {
  171. ScriptGUIElementStateStyle* nativeValue = ScriptGUIElementStateStyle::toNative(value);
  172. nativeInstance->mElementStyle->normal = nativeValue->getInternalValue();
  173. nativeInstance->mNormal = nativeValue;
  174. }
  175. void ScriptGUIElementStyle::internal_GetHover(ScriptGUIElementStyle* nativeInstance, MonoObject** value)
  176. {
  177. throwIfInstancesDontMatch(nativeInstance->mHover, &nativeInstance->mElementStyle->hover);
  178. if (nativeInstance->mHover != nullptr)
  179. {
  180. *value = nativeInstance->mHover->getManagedInstance();
  181. return;
  182. }
  183. *value = nullptr;
  184. }
  185. void ScriptGUIElementStyle::internal_SetHover(ScriptGUIElementStyle* nativeInstance, MonoObject* value)
  186. {
  187. ScriptGUIElementStateStyle* nativeValue = ScriptGUIElementStateStyle::toNative(value);
  188. nativeInstance->mElementStyle->hover = nativeValue->getInternalValue();
  189. nativeInstance->mHover = nativeValue;
  190. }
  191. void ScriptGUIElementStyle::internal_GetActive(ScriptGUIElementStyle* nativeInstance, MonoObject** value)
  192. {
  193. throwIfInstancesDontMatch(nativeInstance->mActive, &nativeInstance->mElementStyle->active);
  194. if (nativeInstance->mActive != nullptr)
  195. {
  196. *value = nativeInstance->mActive->getManagedInstance();
  197. return;
  198. }
  199. *value = nullptr;
  200. }
  201. void ScriptGUIElementStyle::internal_SetActive(ScriptGUIElementStyle* nativeInstance, MonoObject* value)
  202. {
  203. ScriptGUIElementStateStyle* nativeValue = ScriptGUIElementStateStyle::toNative(value);
  204. nativeInstance->mElementStyle->active = nativeValue->getInternalValue();
  205. nativeInstance->mActive = nativeValue;
  206. }
  207. void ScriptGUIElementStyle::internal_GetFocused(ScriptGUIElementStyle* nativeInstance, MonoObject** value)
  208. {
  209. throwIfInstancesDontMatch(nativeInstance->mFocused, &nativeInstance->mElementStyle->focused);
  210. if (nativeInstance->mFocused != nullptr)
  211. {
  212. *value = nativeInstance->mFocused->getManagedInstance();
  213. return;
  214. }
  215. *value = nullptr;
  216. }
  217. void ScriptGUIElementStyle::internal_SetFocused(ScriptGUIElementStyle* nativeInstance, MonoObject* value)
  218. {
  219. ScriptGUIElementStateStyle* nativeValue = ScriptGUIElementStateStyle::toNative(value);
  220. nativeInstance->mElementStyle->focused = nativeValue->getInternalValue();
  221. nativeInstance->mFocused = nativeValue;
  222. }
  223. void ScriptGUIElementStyle::internal_GetNormalOn(ScriptGUIElementStyle* nativeInstance, MonoObject** value)
  224. {
  225. throwIfInstancesDontMatch(nativeInstance->mNormalOn, &nativeInstance->mElementStyle->normalOn);
  226. if (nativeInstance->mNormalOn != nullptr)
  227. {
  228. *value = nativeInstance->mNormalOn->getManagedInstance();
  229. return;
  230. }
  231. *value = nullptr;
  232. }
  233. void ScriptGUIElementStyle::internal_SetNormalOn(ScriptGUIElementStyle* nativeInstance, MonoObject* value)
  234. {
  235. ScriptGUIElementStateStyle* nativeValue = ScriptGUIElementStateStyle::toNative(value);
  236. nativeInstance->mElementStyle->normalOn = nativeValue->getInternalValue();
  237. nativeInstance->mNormalOn = nativeValue;
  238. }
  239. void ScriptGUIElementStyle::internal_GetHoverOn(ScriptGUIElementStyle* nativeInstance, MonoObject** value)
  240. {
  241. throwIfInstancesDontMatch(nativeInstance->mHoverOn, &nativeInstance->mElementStyle->hoverOn);
  242. if (nativeInstance->mHoverOn != nullptr)
  243. {
  244. *value = nativeInstance->mHoverOn->getManagedInstance();
  245. return;
  246. }
  247. *value = nullptr;
  248. }
  249. void ScriptGUIElementStyle::internal_SetHoverOn(ScriptGUIElementStyle* nativeInstance, MonoObject* value)
  250. {
  251. ScriptGUIElementStateStyle* nativeValue = ScriptGUIElementStateStyle::toNative(value);
  252. nativeInstance->mElementStyle->hoverOn = nativeValue->getInternalValue();
  253. nativeInstance->mHoverOn = nativeValue;
  254. }
  255. void ScriptGUIElementStyle::internal_GetActiveOn(ScriptGUIElementStyle* nativeInstance, MonoObject** value)
  256. {
  257. throwIfInstancesDontMatch(nativeInstance->mActiveOn, &nativeInstance->mElementStyle->activeOn);
  258. if (nativeInstance->mActiveOn != nullptr)
  259. {
  260. *value = nativeInstance->mActiveOn->getManagedInstance();
  261. return;
  262. }
  263. *value = nullptr;
  264. }
  265. void ScriptGUIElementStyle::internal_SetActiveOn(ScriptGUIElementStyle* nativeInstance, MonoObject* value)
  266. {
  267. ScriptGUIElementStateStyle* nativeValue = ScriptGUIElementStateStyle::toNative(value);
  268. nativeInstance->mElementStyle->activeOn = nativeValue->getInternalValue();
  269. nativeInstance->mActiveOn = nativeValue;
  270. }
  271. void ScriptGUIElementStyle::internal_GetFocusedOn(ScriptGUIElementStyle* nativeInstance, MonoObject** value)
  272. {
  273. throwIfInstancesDontMatch(nativeInstance->mFocusedOn, &nativeInstance->mElementStyle->focusedOn);
  274. if (nativeInstance->mFocusedOn != nullptr)
  275. {
  276. *value = nativeInstance->mFocusedOn->getManagedInstance();
  277. return;
  278. }
  279. *value = nullptr;
  280. }
  281. void ScriptGUIElementStyle::internal_SetFocusedOn(ScriptGUIElementStyle* nativeInstance, MonoObject* value)
  282. {
  283. ScriptGUIElementStateStyle* nativeValue = ScriptGUIElementStateStyle::toNative(value);
  284. nativeInstance->mElementStyle->focusedOn = nativeValue->getInternalValue();
  285. nativeInstance->mFocusedOn = nativeValue;
  286. }
  287. void ScriptGUIElementStyle::internal_GetBorder(ScriptGUIElementStyle* nativeInstance, RectOffset* value)
  288. {
  289. *value = nativeInstance->mElementStyle->border;
  290. }
  291. void ScriptGUIElementStyle::internal_SetBorder(ScriptGUIElementStyle* nativeInstance, RectOffset* value)
  292. {
  293. nativeInstance->mElementStyle->border = *value;
  294. }
  295. void ScriptGUIElementStyle::internal_GetMargins(ScriptGUIElementStyle* nativeInstance, RectOffset* value)
  296. {
  297. *value = nativeInstance->mElementStyle->margins;
  298. }
  299. void ScriptGUIElementStyle::internal_SetMargins(ScriptGUIElementStyle* nativeInstance, RectOffset* value)
  300. {
  301. nativeInstance->mElementStyle->margins = *value;
  302. }
  303. void ScriptGUIElementStyle::internal_GetContentOffset(ScriptGUIElementStyle* nativeInstance, RectOffset* value)
  304. {
  305. *value = nativeInstance->mElementStyle->contentOffset;
  306. }
  307. void ScriptGUIElementStyle::internal_SetContentOffset(ScriptGUIElementStyle* nativeInstance, RectOffset* value)
  308. {
  309. nativeInstance->mElementStyle->contentOffset = *value;
  310. }
  311. void ScriptGUIElementStyle::internal_GetWidth(ScriptGUIElementStyle* nativeInstance, UINT32* value)
  312. {
  313. *value = nativeInstance->mElementStyle->width;
  314. }
  315. void ScriptGUIElementStyle::internal_SetWidth(ScriptGUIElementStyle* nativeInstance, UINT32 value)
  316. {
  317. nativeInstance->mElementStyle->width = value;
  318. }
  319. void ScriptGUIElementStyle::internal_GetHeight(ScriptGUIElementStyle* nativeInstance, UINT32* value)
  320. {
  321. *value = nativeInstance->mElementStyle->height;
  322. }
  323. void ScriptGUIElementStyle::internal_SetHeight(ScriptGUIElementStyle* nativeInstance, UINT32 value)
  324. {
  325. nativeInstance->mElementStyle->height = value;
  326. }
  327. void ScriptGUIElementStyle::internal_GetMinWidth(ScriptGUIElementStyle* nativeInstance, UINT32* value)
  328. {
  329. *value = nativeInstance->mElementStyle->minWidth;
  330. }
  331. void ScriptGUIElementStyle::internal_SetMinWidth(ScriptGUIElementStyle* nativeInstance, UINT32 value)
  332. {
  333. nativeInstance->mElementStyle->minWidth = value;
  334. }
  335. void ScriptGUIElementStyle::internal_GetMaxWidth(ScriptGUIElementStyle* nativeInstance, UINT32* value)
  336. {
  337. *value = nativeInstance->mElementStyle->maxWidth;
  338. }
  339. void ScriptGUIElementStyle::internal_SetMaxWidth(ScriptGUIElementStyle* nativeInstance, UINT32 value)
  340. {
  341. nativeInstance->mElementStyle->maxWidth = value;
  342. }
  343. void ScriptGUIElementStyle::internal_GetMinHeight(ScriptGUIElementStyle* nativeInstance, UINT32* value)
  344. {
  345. *value = nativeInstance->mElementStyle->minHeight;
  346. }
  347. void ScriptGUIElementStyle::internal_SetMinHeight(ScriptGUIElementStyle* nativeInstance, UINT32 value)
  348. {
  349. nativeInstance->mElementStyle->minHeight = value;
  350. }
  351. void ScriptGUIElementStyle::internal_GetMaxHeight(ScriptGUIElementStyle* nativeInstance, UINT32* value)
  352. {
  353. *value = nativeInstance->mElementStyle->maxHeight;
  354. }
  355. void ScriptGUIElementStyle::internal_SetMaxHeight(ScriptGUIElementStyle* nativeInstance, UINT32 value)
  356. {
  357. nativeInstance->mElementStyle->maxHeight = value;
  358. }
  359. void ScriptGUIElementStyle::internal_GetFixedWidth(ScriptGUIElementStyle* nativeInstance, bool* value)
  360. {
  361. *value = nativeInstance->mElementStyle->fixedWidth;
  362. }
  363. void ScriptGUIElementStyle::internal_SetFixedWidth(ScriptGUIElementStyle* nativeInstance, bool value)
  364. {
  365. nativeInstance->mElementStyle->fixedWidth = value;
  366. }
  367. void ScriptGUIElementStyle::internal_GetFixedHeight(ScriptGUIElementStyle* nativeInstance, bool* value)
  368. {
  369. *value = nativeInstance->mElementStyle->fixedHeight;
  370. }
  371. void ScriptGUIElementStyle::internal_SetFixedHeight(ScriptGUIElementStyle* nativeInstance, bool value)
  372. {
  373. nativeInstance->mElementStyle->fixedHeight = value;
  374. }
  375. }