class_range.rst 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_Range:
  4. Range
  5. =====
  6. **Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Inherited By:** :ref:`SpinBox<class_spinbox>`, :ref:`ScrollBar<class_scrollbar>`, :ref:`ProgressBar<class_progressbar>`, :ref:`TextureProgress<class_textureprogress>`, :ref:`Slider<class_slider>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Abstract base class for range-based controls.
  12. Member Functions
  13. ----------------
  14. +----------------------------+---------------------------------------------------------------------------------------------------------+
  15. | :ref:`float<class_float>` | :ref:`get_max<class_Range_get_max>` **(** **)** const |
  16. +----------------------------+---------------------------------------------------------------------------------------------------------+
  17. | :ref:`float<class_float>` | :ref:`get_min<class_Range_get_min>` **(** **)** const |
  18. +----------------------------+---------------------------------------------------------------------------------------------------------+
  19. | :ref:`float<class_float>` | :ref:`get_page<class_Range_get_page>` **(** **)** const |
  20. +----------------------------+---------------------------------------------------------------------------------------------------------+
  21. | :ref:`float<class_float>` | :ref:`get_step<class_Range_get_step>` **(** **)** const |
  22. +----------------------------+---------------------------------------------------------------------------------------------------------+
  23. | :ref:`float<class_float>` | :ref:`get_unit_value<class_Range_get_unit_value>` **(** **)** const |
  24. +----------------------------+---------------------------------------------------------------------------------------------------------+
  25. | :ref:`float<class_float>` | :ref:`get_val<class_Range_get_val>` **(** **)** const |
  26. +----------------------------+---------------------------------------------------------------------------------------------------------+
  27. | :ref:`float<class_float>` | :ref:`get_value<class_Range_get_value>` **(** **)** const |
  28. +----------------------------+---------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`is_rounded_values<class_Range_is_rounded_values>` **(** **)** const |
  30. +----------------------------+---------------------------------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`is_unit_value_exp<class_Range_is_unit_value_exp>` **(** **)** const |
  32. +----------------------------+---------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`set_exp_unit_value<class_Range_set_exp_unit_value>` **(** :ref:`bool<class_bool>` enabled **)** |
  34. +----------------------------+---------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_max<class_Range_set_max>` **(** :ref:`float<class_float>` maximum **)** |
  36. +----------------------------+---------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`set_min<class_Range_set_min>` **(** :ref:`float<class_float>` minimum **)** |
  38. +----------------------------+---------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`set_page<class_Range_set_page>` **(** :ref:`float<class_float>` pagesize **)** |
  40. +----------------------------+---------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`set_rounded_values<class_Range_set_rounded_values>` **(** :ref:`bool<class_bool>` enabled **)** |
  42. +----------------------------+---------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`set_step<class_Range_set_step>` **(** :ref:`float<class_float>` step **)** |
  44. +----------------------------+---------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`set_unit_value<class_Range_set_unit_value>` **(** :ref:`float<class_float>` value **)** |
  46. +----------------------------+---------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`set_val<class_Range_set_val>` **(** :ref:`float<class_float>` value **)** |
  48. +----------------------------+---------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`set_value<class_Range_set_value>` **(** :ref:`float<class_float>` value **)** |
  50. +----------------------------+---------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`share<class_Range_share>` **(** :ref:`Object<class_object>` with **)** |
  52. +----------------------------+---------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`unshare<class_Range_unshare>` **(** **)** |
  54. +----------------------------+---------------------------------------------------------------------------------------------------------+
  55. Signals
  56. -------
  57. - **changed** **(** **)**
  58. This signal is emitted when min, max, range or step change.
  59. - **value_changed** **(** :ref:`float<class_float>` value **)**
  60. This signal is emitted when value changes.
  61. Description
  62. -----------
  63. Range is a base class for :ref:`Control<class_control>` nodes that change a floating point *value* between a *minimum* and a *maximum*, using *step* and *page*, for example a :ref:`ScrollBar<class_scrollbar>`.
  64. Member Function Description
  65. ---------------------------
  66. .. _class_Range_get_max:
  67. - :ref:`float<class_float>` **get_max** **(** **)** const
  68. Return the maximum value.
  69. .. _class_Range_get_min:
  70. - :ref:`float<class_float>` **get_min** **(** **)** const
  71. Return the minimum value.
  72. .. _class_Range_get_page:
  73. - :ref:`float<class_float>` **get_page** **(** **)** const
  74. Return the page size, if page is 0, paging is disabled.
  75. .. _class_Range_get_step:
  76. - :ref:`float<class_float>` **get_step** **(** **)** const
  77. Return the stepping, if step is 0, stepping is disabled.
  78. .. _class_Range_get_unit_value:
  79. - :ref:`float<class_float>` **get_unit_value** **(** **)** const
  80. Return value mapped to 0 to 1 (unit) range.
  81. .. _class_Range_get_val:
  82. - :ref:`float<class_float>` **get_val** **(** **)** const
  83. Return the current value.
  84. .. _class_Range_get_value:
  85. - :ref:`float<class_float>` **get_value** **(** **)** const
  86. .. _class_Range_is_rounded_values:
  87. - :ref:`bool<class_bool>` **is_rounded_values** **(** **)** const
  88. .. _class_Range_is_unit_value_exp:
  89. - :ref:`bool<class_bool>` **is_unit_value_exp** **(** **)** const
  90. .. _class_Range_set_exp_unit_value:
  91. - void **set_exp_unit_value** **(** :ref:`bool<class_bool>` enabled **)**
  92. .. _class_Range_set_max:
  93. - void **set_max** **(** :ref:`float<class_float>` maximum **)**
  94. .. _class_Range_set_min:
  95. - void **set_min** **(** :ref:`float<class_float>` minimum **)**
  96. Set minimum value, clamped range value to it if it's less.
  97. .. _class_Range_set_page:
  98. - void **set_page** **(** :ref:`float<class_float>` pagesize **)**
  99. Set page size. Page is mainly used for scrollbars or anything that controls text scrolling.
  100. .. _class_Range_set_rounded_values:
  101. - void **set_rounded_values** **(** :ref:`bool<class_bool>` enabled **)**
  102. .. _class_Range_set_step:
  103. - void **set_step** **(** :ref:`float<class_float>` step **)**
  104. Set step value. If step is 0, stepping will be disabled.
  105. .. _class_Range_set_unit_value:
  106. - void **set_unit_value** **(** :ref:`float<class_float>` value **)**
  107. Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max.
  108. .. _class_Range_set_val:
  109. - void **set_val** **(** :ref:`float<class_float>` value **)**
  110. .. _class_Range_set_value:
  111. - void **set_value** **(** :ref:`float<class_float>` value **)**
  112. .. _class_Range_share:
  113. - void **share** **(** :ref:`Object<class_object>` with **)**
  114. .. _class_Range_unshare:
  115. - void **unshare** **(** **)**