GUICurvesField.generated.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. using BansheeEngine;
  5. namespace BansheeEditor
  6. {
  7. /** @addtogroup GUIEditor
  8. * @{
  9. */
  10. /// <summary>
  11. /// A composite GUI object representing an editor field. Editor fields are a combination of a label and an input field.
  12. /// Label is optional. This specific implementation displays an animation curve or a range between two animation curves.
  13. /// </summary>
  14. public partial class GUICurvesField : GUIElement
  15. {
  16. private GUICurvesField(bool __dummy0) { }
  17. protected GUICurvesField() { }
  18. /// <summary>Creates a new GUI editor field with a label.</summary>
  19. /// <param name="labelContent">Content to display in the editor field label.</param>
  20. /// <param name="labelWidth">Width of the label in pixels.</param>
  21. /// <param name="style">
  22. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  23. /// If not specified default style is used.
  24. /// </param>
  25. public GUICurvesField(GUIContent labelContent, uint labelWidth, string style = "")
  26. {
  27. Internal_create(this, ref labelContent, labelWidth, style);
  28. }
  29. /// <summary>Creates a new GUI editor field with a label.</summary>
  30. /// <param name="labelContent">Content to display in the editor field label.</param>
  31. /// <param name="style">
  32. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  33. /// If not specified default style is used.
  34. /// </param>
  35. public GUICurvesField(GUIContent labelContent, string style = "")
  36. {
  37. Internal_create0(this, ref labelContent, style);
  38. }
  39. /// <summary>Creates a new GUI editor field with a label.</summary>
  40. /// <param name="labelText">String to display in the editor field label.</param>
  41. /// <param name="labelWidth">Width of the label in pixels.</param>
  42. /// <param name="style">
  43. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  44. /// If not specified default style is used.
  45. /// </param>
  46. public GUICurvesField(LocString labelText, uint labelWidth, string style = "")
  47. {
  48. Internal_create1(this, labelText, labelWidth, style);
  49. }
  50. /// <summary>Creates a new GUI editor field with a label.</summary>
  51. /// <param name="labelText">String to display in the editor field label.</param>
  52. /// <param name="style">
  53. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  54. /// If not specified default style is used.
  55. /// </param>
  56. public GUICurvesField(LocString labelText, string style = "")
  57. {
  58. Internal_create2(this, labelText, style);
  59. }
  60. /// <summary>Creates a new GUI editor field without a label.</summary>
  61. /// <param name="style">
  62. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  63. /// If not specified default style is used.
  64. /// </param>
  65. public GUICurvesField(string style = "")
  66. {
  67. Internal_create3(this, style);
  68. }
  69. /// <summary>
  70. /// Returns the curve represented by the field. If the field represents a curve range this returns the minimal curve of
  71. /// that range.
  72. /// </summary>
  73. public AnimationCurve Curve
  74. {
  75. get { return Internal_getCurve(mCachedPtr); }
  76. }
  77. /// <summary>
  78. /// Returns the minimal curve represented by the field containing a curve range. Returns the only available curve if the
  79. /// field doesn't represent a range.
  80. /// </summary>
  81. public AnimationCurve MinCurve
  82. {
  83. get { return Internal_getMinCurve(mCachedPtr); }
  84. }
  85. /// <summary>
  86. /// Returns the maximal curve represented by the field containing a curve range. Returns the only available curve if the
  87. /// field doesn't represent a range.
  88. /// </summary>
  89. public AnimationCurve MaxCurve
  90. {
  91. get { return Internal_getMaxCurve(mCachedPtr); }
  92. }
  93. /// <summary>Triggered when the user clicks on the GUI element.</summary>
  94. partial void OnClicked();
  95. /// <summary>Sets an animation curve to display on the field.</summary>
  96. public void SetCurve(AnimationCurve curve)
  97. {
  98. Internal_setCurve(mCachedPtr, curve);
  99. }
  100. /// <summary>Sets a set of animation curves and displays the difference (range) between them.</summary>
  101. public void SetCurveRange(AnimationCurve curveA, AnimationCurve curveB)
  102. {
  103. Internal_setCurveRange(mCachedPtr, curveA, curveB);
  104. }
  105. [MethodImpl(MethodImplOptions.InternalCall)]
  106. private static extern void Internal_setCurve(IntPtr thisPtr, AnimationCurve curve);
  107. [MethodImpl(MethodImplOptions.InternalCall)]
  108. private static extern void Internal_setCurveRange(IntPtr thisPtr, AnimationCurve curveA, AnimationCurve curveB);
  109. [MethodImpl(MethodImplOptions.InternalCall)]
  110. private static extern AnimationCurve Internal_getCurve(IntPtr thisPtr);
  111. [MethodImpl(MethodImplOptions.InternalCall)]
  112. private static extern AnimationCurve Internal_getMinCurve(IntPtr thisPtr);
  113. [MethodImpl(MethodImplOptions.InternalCall)]
  114. private static extern AnimationCurve Internal_getMaxCurve(IntPtr thisPtr);
  115. [MethodImpl(MethodImplOptions.InternalCall)]
  116. private static extern void Internal_create(GUICurvesField managedInstance, ref GUIContent labelContent, uint labelWidth, string style);
  117. [MethodImpl(MethodImplOptions.InternalCall)]
  118. private static extern void Internal_create0(GUICurvesField managedInstance, ref GUIContent labelContent, string style);
  119. [MethodImpl(MethodImplOptions.InternalCall)]
  120. private static extern void Internal_create1(GUICurvesField managedInstance, LocString labelText, uint labelWidth, string style);
  121. [MethodImpl(MethodImplOptions.InternalCall)]
  122. private static extern void Internal_create2(GUICurvesField managedInstance, LocString labelText, string style);
  123. [MethodImpl(MethodImplOptions.InternalCall)]
  124. private static extern void Internal_create3(GUICurvesField managedInstance, string style);
  125. private void Internal_onClicked()
  126. {
  127. OnClicked();
  128. }
  129. }
  130. /** @} */
  131. }