GUIVector2DistributionField.generated.cs 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //************** Copyright (c) 2016-2019 Marko Pintera ([email protected]). All rights reserved. *******************//
  3. using System;
  4. using System.Runtime.CompilerServices;
  5. using System.Runtime.InteropServices;
  6. using BansheeEngine;
  7. namespace BansheeEditor
  8. {
  9. /** @addtogroup GUIEditor
  10. * @{
  11. */
  12. /// <summary>
  13. /// A composite GUI object representing an editor field. Editor fields are a combination of a label and an input field.
  14. /// Label is optional. This specific implementation displays an input field for a 2D vector distribution.
  15. /// </summary>
  16. [ShowInInspector]
  17. public partial class GUIVector2DistributionField : GUIElement
  18. {
  19. private GUIVector2DistributionField(bool __dummy0) { }
  20. protected GUIVector2DistributionField() { }
  21. /// <summary>Creates a new GUI editor field with a label.</summary>
  22. /// <param name="labelContent">Content to display in the editor field label.</param>
  23. /// <param name="labelWidth">Width of the label in pixels.</param>
  24. /// <param name="style">
  25. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  26. /// If not specified default style is used.
  27. /// </param>
  28. public GUIVector2DistributionField(GUIContent labelContent, uint labelWidth, string style = "")
  29. {
  30. Internal_create(this, ref labelContent, labelWidth, style);
  31. }
  32. /// <summary>Creates a new GUI editor field with a label.</summary>
  33. /// <param name="labelContent">Content to display in the editor field label.</param>
  34. /// <param name="style">
  35. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  36. /// If not specified default style is used.
  37. /// </param>
  38. public GUIVector2DistributionField(GUIContent labelContent, string style = "")
  39. {
  40. Internal_create0(this, ref labelContent, style);
  41. }
  42. /// <summary>Creates a new GUI editor field with a label.</summary>
  43. /// <param name="labelText">String to display in the editor field label.</param>
  44. /// <param name="labelWidth">Width of the label in pixels.</param>
  45. /// <param name="style">
  46. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  47. /// If not specified default style is used.
  48. /// </param>
  49. public GUIVector2DistributionField(LocString labelText, uint labelWidth, string style = "")
  50. {
  51. Internal_create1(this, labelText, labelWidth, style);
  52. }
  53. /// <summary>Creates a new GUI editor field with a label.</summary>
  54. /// <param name="labelText">String to display in the editor field label.</param>
  55. /// <param name="style">
  56. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  57. /// If not specified default style is used.
  58. /// </param>
  59. public GUIVector2DistributionField(LocString labelText, string style = "")
  60. {
  61. Internal_create2(this, labelText, style);
  62. }
  63. /// <summary>Creates a new GUI editor field without a label.</summary>
  64. /// <param name="style">
  65. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  66. /// If not specified default style is used.
  67. /// </param>
  68. public GUIVector2DistributionField(string style = "")
  69. {
  70. Internal_create3(this, style);
  71. }
  72. /// <summary>Changes the value of the field.</summary>
  73. [ShowInInspector]
  74. [NotNull]
  75. [PassByCopy]
  76. [NativeWrapper]
  77. public Vector2Distribution Value
  78. {
  79. get { return Internal_getValue(mCachedPtr); }
  80. set { Internal_setValue(mCachedPtr, value); }
  81. }
  82. /// <summary>Returns the type of the currently selected distribution.</summary>
  83. [ShowInInspector]
  84. [NativeWrapper]
  85. public PropertyDistributionType DistributionType
  86. {
  87. get { return Internal_getType(mCachedPtr); }
  88. }
  89. /// <summary>
  90. /// Checks if any of the float input fields currently have input focus. Only relevant for non-curve distributions.
  91. /// </summary>
  92. [ShowInInspector]
  93. [NativeWrapper]
  94. public bool HasInputFocus
  95. {
  96. get { return Internal_hasInputFocus(mCachedPtr); }
  97. }
  98. /// <summary>
  99. /// Triggered when the user clicks on the curve display. Only relevant if the distribution is a curve distribution.
  100. /// Provides the sequential index of the clicked curve (0 - x, 1 - y, 2 - z).
  101. /// </summary>
  102. partial void OnClicked(int p0);
  103. /// <summary>
  104. /// Triggered when the user modifies either of the non-curve (constant) values of the distribution. Only relevant if the
  105. /// distribution is not a curve distribution.
  106. /// </summary>
  107. partial void OnConstantModified();
  108. /// <summary>
  109. /// Triggered when the user confirms inputs in either of the non-curve (constant) values of the distribution. Only
  110. /// relevant if the distribution is not a curve distribution.
  111. /// </summary>
  112. partial void OnConstantConfirmed();
  113. [MethodImpl(MethodImplOptions.InternalCall)]
  114. private static extern Vector2Distribution Internal_getValue(IntPtr thisPtr);
  115. [MethodImpl(MethodImplOptions.InternalCall)]
  116. private static extern void Internal_setValue(IntPtr thisPtr, Vector2Distribution value);
  117. [MethodImpl(MethodImplOptions.InternalCall)]
  118. private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
  119. [MethodImpl(MethodImplOptions.InternalCall)]
  120. private static extern bool Internal_hasInputFocus(IntPtr thisPtr);
  121. [MethodImpl(MethodImplOptions.InternalCall)]
  122. private static extern void Internal_create(GUIVector2DistributionField managedInstance, ref GUIContent labelContent, uint labelWidth, string style);
  123. [MethodImpl(MethodImplOptions.InternalCall)]
  124. private static extern void Internal_create0(GUIVector2DistributionField managedInstance, ref GUIContent labelContent, string style);
  125. [MethodImpl(MethodImplOptions.InternalCall)]
  126. private static extern void Internal_create1(GUIVector2DistributionField managedInstance, LocString labelText, uint labelWidth, string style);
  127. [MethodImpl(MethodImplOptions.InternalCall)]
  128. private static extern void Internal_create2(GUIVector2DistributionField managedInstance, LocString labelText, string style);
  129. [MethodImpl(MethodImplOptions.InternalCall)]
  130. private static extern void Internal_create3(GUIVector2DistributionField managedInstance, string style);
  131. private void Internal_onClicked(int p0)
  132. {
  133. OnClicked(p0);
  134. }
  135. private void Internal_onConstantModified()
  136. {
  137. OnConstantModified();
  138. }
  139. private void Internal_onConstantConfirmed()
  140. {
  141. OnConstantConfirmed();
  142. }
  143. }
  144. /** @} */
  145. }