class_itemlist.rst 79 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ItemList.xml.
  6. .. _class_ItemList:
  7. ItemList
  8. ========
  9. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A vertical list of selectable items with one or multiple columns.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This control provides a vertical list of selectable items that may be in a single or in multiple columns, with each item having options for text and an icon. Tooltips are supported and may be different for every item in the list.
  15. Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing :kbd:`Enter`.
  16. Item text only supports single-line strings. Newline characters (e.g. ``\n``) in the string won't produce a newline. Text wrapping is enabled in :ref:`ICON_MODE_TOP<class_ItemList_constant_ICON_MODE_TOP>` mode, but the column's width is adjusted to fully fit its content by default. You need to set :ref:`fixed_column_width<class_ItemList_property_fixed_column_width>` greater than zero to wrap the text.
  17. All ``set_*`` methods allow negative item indices, i.e. ``-1`` to access the last item, ``-2`` to select the second-to-last item, and so on.
  18. \ **Incremental search:** Like :ref:`PopupMenu<class_PopupMenu>` and :ref:`Tree<class_Tree>`, **ItemList** supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec<class_ProjectSettings_property_gui/timers/incremental_search_max_interval_msec>`.
  19. .. rst-class:: classref-reftable-group
  20. Properties
  21. ----------
  22. .. table::
  23. :widths: auto
  24. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`allow_reselect<class_ItemList_property_allow_reselect>` | ``false`` |
  26. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`allow_rmb_select<class_ItemList_property_allow_rmb_select>` | ``false`` |
  28. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`allow_search<class_ItemList_property_allow_search>` | ``true`` |
  30. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`auto_height<class_ItemList_property_auto_height>` | ``false`` |
  32. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`auto_width<class_ItemList_property_auto_width>` | ``false`` |
  34. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | clip_contents | ``true`` (overrides :ref:`Control<class_Control_property_clip_contents>`) |
  36. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  37. | :ref:`int<class_int>` | :ref:`fixed_column_width<class_ItemList_property_fixed_column_width>` | ``0`` |
  38. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  39. | :ref:`Vector2i<class_Vector2i>` | :ref:`fixed_icon_size<class_ItemList_property_fixed_icon_size>` | ``Vector2i(0, 0)`` |
  40. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  41. | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
  42. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  43. | :ref:`IconMode<enum_ItemList_IconMode>` | :ref:`icon_mode<class_ItemList_property_icon_mode>` | ``1`` |
  44. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  45. | :ref:`float<class_float>` | :ref:`icon_scale<class_ItemList_property_icon_scale>` | ``1.0`` |
  46. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  47. | :ref:`int<class_int>` | :ref:`item_count<class_ItemList_property_item_count>` | ``0`` |
  48. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  49. | :ref:`int<class_int>` | :ref:`max_columns<class_ItemList_property_max_columns>` | ``1`` |
  50. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  51. | :ref:`int<class_int>` | :ref:`max_text_lines<class_ItemList_property_max_text_lines>` | ``1`` |
  52. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`same_column_width<class_ItemList_property_same_column_width>` | ``false`` |
  54. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  55. | :ref:`SelectMode<enum_ItemList_SelectMode>` | :ref:`select_mode<class_ItemList_property_select_mode>` | ``0`` |
  56. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  57. | :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` | :ref:`text_overrun_behavior<class_ItemList_property_text_overrun_behavior>` | ``3`` |
  58. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  59. | :ref:`bool<class_bool>` | :ref:`wraparound_items<class_ItemList_property_wraparound_items>` | ``true`` |
  60. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  61. .. rst-class:: classref-reftable-group
  62. Methods
  63. -------
  64. .. table::
  65. :widths: auto
  66. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`int<class_int>` | :ref:`add_icon_item<class_ItemList_method_add_icon_item>`\ (\ icon\: :ref:`Texture2D<class_Texture2D>`, selectable\: :ref:`bool<class_bool>` = true\ ) |
  68. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`int<class_int>` | :ref:`add_item<class_ItemList_method_add_item>`\ (\ text\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>` = null, selectable\: :ref:`bool<class_bool>` = true\ ) |
  70. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | |void| | :ref:`clear<class_ItemList_method_clear>`\ (\ ) |
  72. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | |void| | :ref:`deselect<class_ItemList_method_deselect>`\ (\ idx\: :ref:`int<class_int>`\ ) |
  74. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | |void| | :ref:`deselect_all<class_ItemList_method_deselect_all>`\ (\ ) |
  76. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | |void| | :ref:`ensure_current_is_visible<class_ItemList_method_ensure_current_is_visible>`\ (\ ) |
  78. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | |void| | :ref:`force_update_list_size<class_ItemList_method_force_update_list_size>`\ (\ ) |
  80. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`HScrollBar<class_HScrollBar>` | :ref:`get_h_scroll_bar<class_ItemList_method_get_h_scroll_bar>`\ (\ ) |
  82. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`int<class_int>` | :ref:`get_item_at_position<class_ItemList_method_get_item_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`, exact\: :ref:`bool<class_bool>` = false\ ) |const| |
  84. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` | :ref:`get_item_auto_translate_mode<class_ItemList_method_get_item_auto_translate_mode>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  86. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`Color<class_Color>` | :ref:`get_item_custom_bg_color<class_ItemList_method_get_item_custom_bg_color>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  88. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | :ref:`Color<class_Color>` | :ref:`get_item_custom_fg_color<class_ItemList_method_get_item_custom_fg_color>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  90. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_icon<class_ItemList_method_get_item_icon>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  92. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`Color<class_Color>` | :ref:`get_item_icon_modulate<class_ItemList_method_get_item_icon_modulate>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  94. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`Rect2<class_Rect2>` | :ref:`get_item_icon_region<class_ItemList_method_get_item_icon_region>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  96. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`String<class_String>` | :ref:`get_item_language<class_ItemList_method_get_item_language>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  98. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`Variant<class_Variant>` | :ref:`get_item_metadata<class_ItemList_method_get_item_metadata>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  100. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`Rect2<class_Rect2>` | :ref:`get_item_rect<class_ItemList_method_get_item_rect>`\ (\ idx\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>` = true\ ) |const| |
  102. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`String<class_String>` | :ref:`get_item_text<class_ItemList_method_get_item_text>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  104. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_item_text_direction<class_ItemList_method_get_item_text_direction>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  106. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | :ref:`String<class_String>` | :ref:`get_item_tooltip<class_ItemList_method_get_item_tooltip>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  108. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_selected_items<class_ItemList_method_get_selected_items>`\ (\ ) |
  110. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_ItemList_method_get_v_scroll_bar>`\ (\ ) |
  112. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | :ref:`bool<class_bool>` | :ref:`is_anything_selected<class_ItemList_method_is_anything_selected>`\ (\ ) |
  114. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | :ref:`bool<class_bool>` | :ref:`is_item_disabled<class_ItemList_method_is_item_disabled>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  116. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | :ref:`bool<class_bool>` | :ref:`is_item_icon_transposed<class_ItemList_method_is_item_icon_transposed>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  118. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | :ref:`bool<class_bool>` | :ref:`is_item_selectable<class_ItemList_method_is_item_selectable>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  120. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | :ref:`bool<class_bool>` | :ref:`is_item_tooltip_enabled<class_ItemList_method_is_item_tooltip_enabled>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  122. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | :ref:`bool<class_bool>` | :ref:`is_selected<class_ItemList_method_is_selected>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  124. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | |void| | :ref:`move_item<class_ItemList_method_move_item>`\ (\ from_idx\: :ref:`int<class_int>`, to_idx\: :ref:`int<class_int>`\ ) |
  126. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | |void| | :ref:`remove_item<class_ItemList_method_remove_item>`\ (\ idx\: :ref:`int<class_int>`\ ) |
  128. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | |void| | :ref:`select<class_ItemList_method_select>`\ (\ idx\: :ref:`int<class_int>`, single\: :ref:`bool<class_bool>` = true\ ) |
  130. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | |void| | :ref:`set_item_auto_translate_mode<class_ItemList_method_set_item_auto_translate_mode>`\ (\ idx\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) |
  132. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | |void| | :ref:`set_item_custom_bg_color<class_ItemList_method_set_item_custom_bg_color>`\ (\ idx\: :ref:`int<class_int>`, custom_bg_color\: :ref:`Color<class_Color>`\ ) |
  134. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | |void| | :ref:`set_item_custom_fg_color<class_ItemList_method_set_item_custom_fg_color>`\ (\ idx\: :ref:`int<class_int>`, custom_fg_color\: :ref:`Color<class_Color>`\ ) |
  136. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | |void| | :ref:`set_item_disabled<class_ItemList_method_set_item_disabled>`\ (\ idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |
  138. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | |void| | :ref:`set_item_icon<class_ItemList_method_set_item_icon>`\ (\ idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  140. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | |void| | :ref:`set_item_icon_modulate<class_ItemList_method_set_item_icon_modulate>`\ (\ idx\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) |
  142. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | |void| | :ref:`set_item_icon_region<class_ItemList_method_set_item_icon_region>`\ (\ idx\: :ref:`int<class_int>`, rect\: :ref:`Rect2<class_Rect2>`\ ) |
  144. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | |void| | :ref:`set_item_icon_transposed<class_ItemList_method_set_item_icon_transposed>`\ (\ idx\: :ref:`int<class_int>`, transposed\: :ref:`bool<class_bool>`\ ) |
  146. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | |void| | :ref:`set_item_language<class_ItemList_method_set_item_language>`\ (\ idx\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) |
  148. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | |void| | :ref:`set_item_metadata<class_ItemList_method_set_item_metadata>`\ (\ idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) |
  150. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | |void| | :ref:`set_item_selectable<class_ItemList_method_set_item_selectable>`\ (\ idx\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) |
  152. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | |void| | :ref:`set_item_text<class_ItemList_method_set_item_text>`\ (\ idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) |
  154. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | |void| | :ref:`set_item_text_direction<class_ItemList_method_set_item_text_direction>`\ (\ idx\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) |
  156. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | |void| | :ref:`set_item_tooltip<class_ItemList_method_set_item_tooltip>`\ (\ idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
  158. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | |void| | :ref:`set_item_tooltip_enabled<class_ItemList_method_set_item_tooltip_enabled>`\ (\ idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
  160. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | |void| | :ref:`sort_items_by_text<class_ItemList_method_sort_items_by_text>`\ (\ ) |
  162. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. .. rst-class:: classref-reftable-group
  164. Theme Properties
  165. ----------------
  166. .. table::
  167. :widths: auto
  168. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  169. | :ref:`Color<class_Color>` | :ref:`font_color<class_ItemList_theme_color_font_color>` | ``Color(0.65, 0.65, 0.65, 1)`` |
  170. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  171. | :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_ItemList_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  172. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  173. | :ref:`Color<class_Color>` | :ref:`font_hovered_selected_color<class_ItemList_theme_color_font_hovered_selected_color>` | ``Color(1, 1, 1, 1)`` |
  174. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  175. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ItemList_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
  176. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  177. | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_ItemList_theme_color_font_selected_color>` | ``Color(1, 1, 1, 1)`` |
  178. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  179. | :ref:`Color<class_Color>` | :ref:`guide_color<class_ItemList_theme_color_guide_color>` | ``Color(0.7, 0.7, 0.7, 0.25)`` |
  180. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  181. | :ref:`int<class_int>` | :ref:`h_separation<class_ItemList_theme_constant_h_separation>` | ``4`` |
  182. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  183. | :ref:`int<class_int>` | :ref:`icon_margin<class_ItemList_theme_constant_icon_margin>` | ``4`` |
  184. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  185. | :ref:`int<class_int>` | :ref:`line_separation<class_ItemList_theme_constant_line_separation>` | ``2`` |
  186. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  187. | :ref:`int<class_int>` | :ref:`outline_size<class_ItemList_theme_constant_outline_size>` | ``0`` |
  188. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  189. | :ref:`int<class_int>` | :ref:`v_separation<class_ItemList_theme_constant_v_separation>` | ``4`` |
  190. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  191. | :ref:`Font<class_Font>` | :ref:`font<class_ItemList_theme_font_font>` | |
  192. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  193. | :ref:`int<class_int>` | :ref:`font_size<class_ItemList_theme_font_size_font_size>` | |
  194. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  195. | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor<class_ItemList_theme_style_cursor>` | |
  196. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  197. | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor_unfocused<class_ItemList_theme_style_cursor_unfocused>` | |
  198. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  199. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_ItemList_theme_style_focus>` | |
  200. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  201. | :ref:`StyleBox<class_StyleBox>` | :ref:`hovered<class_ItemList_theme_style_hovered>` | |
  202. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  203. | :ref:`StyleBox<class_StyleBox>` | :ref:`hovered_selected<class_ItemList_theme_style_hovered_selected>` | |
  204. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  205. | :ref:`StyleBox<class_StyleBox>` | :ref:`hovered_selected_focus<class_ItemList_theme_style_hovered_selected_focus>` | |
  206. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  207. | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_ItemList_theme_style_panel>` | |
  208. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  209. | :ref:`StyleBox<class_StyleBox>` | :ref:`selected<class_ItemList_theme_style_selected>` | |
  210. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  211. | :ref:`StyleBox<class_StyleBox>` | :ref:`selected_focus<class_ItemList_theme_style_selected_focus>` | |
  212. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  213. .. rst-class:: classref-section-separator
  214. ----
  215. .. rst-class:: classref-descriptions-group
  216. Signals
  217. -------
  218. .. _class_ItemList_signal_empty_clicked:
  219. .. rst-class:: classref-signal
  220. **empty_clicked**\ (\ at_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_empty_clicked>`
  221. Emitted when any mouse click is issued within the rect of the list but on empty space.
  222. \ ``at_position`` is the click position in this control's local coordinate system.
  223. .. rst-class:: classref-item-separator
  224. ----
  225. .. _class_ItemList_signal_item_activated:
  226. .. rst-class:: classref-signal
  227. **item_activated**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_item_activated>`
  228. Emitted when specified list item is activated via double-clicking or by pressing :kbd:`Enter`.
  229. .. rst-class:: classref-item-separator
  230. ----
  231. .. _class_ItemList_signal_item_clicked:
  232. .. rst-class:: classref-signal
  233. **item_clicked**\ (\ index\: :ref:`int<class_int>`, at_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_item_clicked>`
  234. Emitted when specified list item has been clicked with any mouse button.
  235. \ ``at_position`` is the click position in this control's local coordinate system.
  236. .. rst-class:: classref-item-separator
  237. ----
  238. .. _class_ItemList_signal_item_selected:
  239. .. rst-class:: classref-signal
  240. **item_selected**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_item_selected>`
  241. Emitted when specified item has been selected. Only applicable in single selection mode.
  242. \ :ref:`allow_reselect<class_ItemList_property_allow_reselect>` must be enabled to reselect an item.
  243. .. rst-class:: classref-item-separator
  244. ----
  245. .. _class_ItemList_signal_multi_selected:
  246. .. rst-class:: classref-signal
  247. **multi_selected**\ (\ index\: :ref:`int<class_int>`, selected\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_signal_multi_selected>`
  248. Emitted when a multiple selection is altered on a list allowing multiple selection.
  249. .. rst-class:: classref-section-separator
  250. ----
  251. .. rst-class:: classref-descriptions-group
  252. Enumerations
  253. ------------
  254. .. _enum_ItemList_IconMode:
  255. .. rst-class:: classref-enumeration
  256. enum **IconMode**: :ref:`🔗<enum_ItemList_IconMode>`
  257. .. _class_ItemList_constant_ICON_MODE_TOP:
  258. .. rst-class:: classref-enumeration-constant
  259. :ref:`IconMode<enum_ItemList_IconMode>` **ICON_MODE_TOP** = ``0``
  260. Icon is drawn above the text.
  261. .. _class_ItemList_constant_ICON_MODE_LEFT:
  262. .. rst-class:: classref-enumeration-constant
  263. :ref:`IconMode<enum_ItemList_IconMode>` **ICON_MODE_LEFT** = ``1``
  264. Icon is drawn to the left of the text.
  265. .. rst-class:: classref-item-separator
  266. ----
  267. .. _enum_ItemList_SelectMode:
  268. .. rst-class:: classref-enumeration
  269. enum **SelectMode**: :ref:`🔗<enum_ItemList_SelectMode>`
  270. .. _class_ItemList_constant_SELECT_SINGLE:
  271. .. rst-class:: classref-enumeration-constant
  272. :ref:`SelectMode<enum_ItemList_SelectMode>` **SELECT_SINGLE** = ``0``
  273. Only allow selecting a single item.
  274. .. _class_ItemList_constant_SELECT_MULTI:
  275. .. rst-class:: classref-enumeration-constant
  276. :ref:`SelectMode<enum_ItemList_SelectMode>` **SELECT_MULTI** = ``1``
  277. Allows selecting multiple items by holding :kbd:`Ctrl` or :kbd:`Shift`.
  278. .. _class_ItemList_constant_SELECT_TOGGLE:
  279. .. rst-class:: classref-enumeration-constant
  280. :ref:`SelectMode<enum_ItemList_SelectMode>` **SELECT_TOGGLE** = ``2``
  281. Allows selecting multiple items by toggling them on and off.
  282. .. rst-class:: classref-section-separator
  283. ----
  284. .. rst-class:: classref-descriptions-group
  285. Property Descriptions
  286. ---------------------
  287. .. _class_ItemList_property_allow_reselect:
  288. .. rst-class:: classref-property
  289. :ref:`bool<class_bool>` **allow_reselect** = ``false`` :ref:`🔗<class_ItemList_property_allow_reselect>`
  290. .. rst-class:: classref-property-setget
  291. - |void| **set_allow_reselect**\ (\ value\: :ref:`bool<class_bool>`\ )
  292. - :ref:`bool<class_bool>` **get_allow_reselect**\ (\ )
  293. If ``true``, the currently selected item can be selected again.
  294. .. rst-class:: classref-item-separator
  295. ----
  296. .. _class_ItemList_property_allow_rmb_select:
  297. .. rst-class:: classref-property
  298. :ref:`bool<class_bool>` **allow_rmb_select** = ``false`` :ref:`🔗<class_ItemList_property_allow_rmb_select>`
  299. .. rst-class:: classref-property-setget
  300. - |void| **set_allow_rmb_select**\ (\ value\: :ref:`bool<class_bool>`\ )
  301. - :ref:`bool<class_bool>` **get_allow_rmb_select**\ (\ )
  302. If ``true``, right mouse button click can select items.
  303. .. rst-class:: classref-item-separator
  304. ----
  305. .. _class_ItemList_property_allow_search:
  306. .. rst-class:: classref-property
  307. :ref:`bool<class_bool>` **allow_search** = ``true`` :ref:`🔗<class_ItemList_property_allow_search>`
  308. .. rst-class:: classref-property-setget
  309. - |void| **set_allow_search**\ (\ value\: :ref:`bool<class_bool>`\ )
  310. - :ref:`bool<class_bool>` **get_allow_search**\ (\ )
  311. If ``true``, allows navigating the **ItemList** with letter keys through incremental search.
  312. .. rst-class:: classref-item-separator
  313. ----
  314. .. _class_ItemList_property_auto_height:
  315. .. rst-class:: classref-property
  316. :ref:`bool<class_bool>` **auto_height** = ``false`` :ref:`🔗<class_ItemList_property_auto_height>`
  317. .. rst-class:: classref-property-setget
  318. - |void| **set_auto_height**\ (\ value\: :ref:`bool<class_bool>`\ )
  319. - :ref:`bool<class_bool>` **has_auto_height**\ (\ )
  320. If ``true``, the control will automatically resize the height to fit its content.
  321. .. rst-class:: classref-item-separator
  322. ----
  323. .. _class_ItemList_property_auto_width:
  324. .. rst-class:: classref-property
  325. :ref:`bool<class_bool>` **auto_width** = ``false`` :ref:`🔗<class_ItemList_property_auto_width>`
  326. .. rst-class:: classref-property-setget
  327. - |void| **set_auto_width**\ (\ value\: :ref:`bool<class_bool>`\ )
  328. - :ref:`bool<class_bool>` **has_auto_width**\ (\ )
  329. If ``true``, the control will automatically resize the width to fit its content.
  330. .. rst-class:: classref-item-separator
  331. ----
  332. .. _class_ItemList_property_fixed_column_width:
  333. .. rst-class:: classref-property
  334. :ref:`int<class_int>` **fixed_column_width** = ``0`` :ref:`🔗<class_ItemList_property_fixed_column_width>`
  335. .. rst-class:: classref-property-setget
  336. - |void| **set_fixed_column_width**\ (\ value\: :ref:`int<class_int>`\ )
  337. - :ref:`int<class_int>` **get_fixed_column_width**\ (\ )
  338. The width all columns will be adjusted to.
  339. A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width.
  340. .. rst-class:: classref-item-separator
  341. ----
  342. .. _class_ItemList_property_fixed_icon_size:
  343. .. rst-class:: classref-property
  344. :ref:`Vector2i<class_Vector2i>` **fixed_icon_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_ItemList_property_fixed_icon_size>`
  345. .. rst-class:: classref-property-setget
  346. - |void| **set_fixed_icon_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
  347. - :ref:`Vector2i<class_Vector2i>` **get_fixed_icon_size**\ (\ )
  348. The size all icons will be adjusted to.
  349. If either X or Y component is not greater than zero, icon size won't be affected.
  350. .. rst-class:: classref-item-separator
  351. ----
  352. .. _class_ItemList_property_icon_mode:
  353. .. rst-class:: classref-property
  354. :ref:`IconMode<enum_ItemList_IconMode>` **icon_mode** = ``1`` :ref:`🔗<class_ItemList_property_icon_mode>`
  355. .. rst-class:: classref-property-setget
  356. - |void| **set_icon_mode**\ (\ value\: :ref:`IconMode<enum_ItemList_IconMode>`\ )
  357. - :ref:`IconMode<enum_ItemList_IconMode>` **get_icon_mode**\ (\ )
  358. The icon position, whether above or to the left of the text. See the :ref:`IconMode<enum_ItemList_IconMode>` constants.
  359. .. rst-class:: classref-item-separator
  360. ----
  361. .. _class_ItemList_property_icon_scale:
  362. .. rst-class:: classref-property
  363. :ref:`float<class_float>` **icon_scale** = ``1.0`` :ref:`🔗<class_ItemList_property_icon_scale>`
  364. .. rst-class:: classref-property-setget
  365. - |void| **set_icon_scale**\ (\ value\: :ref:`float<class_float>`\ )
  366. - :ref:`float<class_float>` **get_icon_scale**\ (\ )
  367. The scale of icon applied after :ref:`fixed_icon_size<class_ItemList_property_fixed_icon_size>` and transposing takes effect.
  368. .. rst-class:: classref-item-separator
  369. ----
  370. .. _class_ItemList_property_item_count:
  371. .. rst-class:: classref-property
  372. :ref:`int<class_int>` **item_count** = ``0`` :ref:`🔗<class_ItemList_property_item_count>`
  373. .. rst-class:: classref-property-setget
  374. - |void| **set_item_count**\ (\ value\: :ref:`int<class_int>`\ )
  375. - :ref:`int<class_int>` **get_item_count**\ (\ )
  376. The number of items currently in the list.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_ItemList_property_max_columns:
  380. .. rst-class:: classref-property
  381. :ref:`int<class_int>` **max_columns** = ``1`` :ref:`🔗<class_ItemList_property_max_columns>`
  382. .. rst-class:: classref-property-setget
  383. - |void| **set_max_columns**\ (\ value\: :ref:`int<class_int>`\ )
  384. - :ref:`int<class_int>` **get_max_columns**\ (\ )
  385. Maximum columns the list will have.
  386. If greater than zero, the content will be split among the specified columns.
  387. A value of zero means unlimited columns, i.e. all items will be put in the same row.
  388. .. rst-class:: classref-item-separator
  389. ----
  390. .. _class_ItemList_property_max_text_lines:
  391. .. rst-class:: classref-property
  392. :ref:`int<class_int>` **max_text_lines** = ``1`` :ref:`🔗<class_ItemList_property_max_text_lines>`
  393. .. rst-class:: classref-property-setget
  394. - |void| **set_max_text_lines**\ (\ value\: :ref:`int<class_int>`\ )
  395. - :ref:`int<class_int>` **get_max_text_lines**\ (\ )
  396. Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display.
  397. \ **Note:** This property takes effect only when :ref:`icon_mode<class_ItemList_property_icon_mode>` is :ref:`ICON_MODE_TOP<class_ItemList_constant_ICON_MODE_TOP>`. To make the text wrap, :ref:`fixed_column_width<class_ItemList_property_fixed_column_width>` should be greater than zero.
  398. .. rst-class:: classref-item-separator
  399. ----
  400. .. _class_ItemList_property_same_column_width:
  401. .. rst-class:: classref-property
  402. :ref:`bool<class_bool>` **same_column_width** = ``false`` :ref:`🔗<class_ItemList_property_same_column_width>`
  403. .. rst-class:: classref-property-setget
  404. - |void| **set_same_column_width**\ (\ value\: :ref:`bool<class_bool>`\ )
  405. - :ref:`bool<class_bool>` **is_same_column_width**\ (\ )
  406. Whether all columns will have the same width.
  407. If ``true``, the width is equal to the largest column width of all columns.
  408. .. rst-class:: classref-item-separator
  409. ----
  410. .. _class_ItemList_property_select_mode:
  411. .. rst-class:: classref-property
  412. :ref:`SelectMode<enum_ItemList_SelectMode>` **select_mode** = ``0`` :ref:`🔗<class_ItemList_property_select_mode>`
  413. .. rst-class:: classref-property-setget
  414. - |void| **set_select_mode**\ (\ value\: :ref:`SelectMode<enum_ItemList_SelectMode>`\ )
  415. - :ref:`SelectMode<enum_ItemList_SelectMode>` **get_select_mode**\ (\ )
  416. Allows single or multiple item selection. See the :ref:`SelectMode<enum_ItemList_SelectMode>` constants.
  417. .. rst-class:: classref-item-separator
  418. ----
  419. .. _class_ItemList_property_text_overrun_behavior:
  420. .. rst-class:: classref-property
  421. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``3`` :ref:`🔗<class_ItemList_property_text_overrun_behavior>`
  422. .. rst-class:: classref-property-setget
  423. - |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ )
  424. - :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ )
  425. Sets the clipping behavior when the text exceeds an item's bounding rectangle. See :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` for a description of all modes.
  426. .. rst-class:: classref-item-separator
  427. ----
  428. .. _class_ItemList_property_wraparound_items:
  429. .. rst-class:: classref-property
  430. :ref:`bool<class_bool>` **wraparound_items** = ``true`` :ref:`🔗<class_ItemList_property_wraparound_items>`
  431. .. rst-class:: classref-property-setget
  432. - |void| **set_wraparound_items**\ (\ value\: :ref:`bool<class_bool>`\ )
  433. - :ref:`bool<class_bool>` **has_wraparound_items**\ (\ )
  434. If ``true``, the control will automatically move items into a new row to fit its content. See also :ref:`HFlowContainer<class_HFlowContainer>` for this behavior.
  435. If ``false``, the control will add a horizontal scrollbar to make all items visible.
  436. .. rst-class:: classref-section-separator
  437. ----
  438. .. rst-class:: classref-descriptions-group
  439. Method Descriptions
  440. -------------------
  441. .. _class_ItemList_method_add_icon_item:
  442. .. rst-class:: classref-method
  443. :ref:`int<class_int>` **add_icon_item**\ (\ icon\: :ref:`Texture2D<class_Texture2D>`, selectable\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_ItemList_method_add_icon_item>`
  444. Adds an item to the item list with no text, only an icon. Returns the index of an added item.
  445. .. rst-class:: classref-item-separator
  446. ----
  447. .. _class_ItemList_method_add_item:
  448. .. rst-class:: classref-method
  449. :ref:`int<class_int>` **add_item**\ (\ text\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>` = null, selectable\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_ItemList_method_add_item>`
  450. Adds an item to the item list with specified text. Returns the index of an added item.
  451. Specify an ``icon``, or use ``null`` as the ``icon`` for a list item with no icon.
  452. If ``selectable`` is ``true``, the list item will be selectable.
  453. .. rst-class:: classref-item-separator
  454. ----
  455. .. _class_ItemList_method_clear:
  456. .. rst-class:: classref-method
  457. |void| **clear**\ (\ ) :ref:`🔗<class_ItemList_method_clear>`
  458. Removes all items from the list.
  459. .. rst-class:: classref-item-separator
  460. ----
  461. .. _class_ItemList_method_deselect:
  462. .. rst-class:: classref-method
  463. |void| **deselect**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_deselect>`
  464. Ensures the item associated with the specified index is not selected.
  465. .. rst-class:: classref-item-separator
  466. ----
  467. .. _class_ItemList_method_deselect_all:
  468. .. rst-class:: classref-method
  469. |void| **deselect_all**\ (\ ) :ref:`🔗<class_ItemList_method_deselect_all>`
  470. Ensures there are no items selected.
  471. .. rst-class:: classref-item-separator
  472. ----
  473. .. _class_ItemList_method_ensure_current_is_visible:
  474. .. rst-class:: classref-method
  475. |void| **ensure_current_is_visible**\ (\ ) :ref:`🔗<class_ItemList_method_ensure_current_is_visible>`
  476. Ensure current selection is visible, adjusting the scroll position as necessary.
  477. .. rst-class:: classref-item-separator
  478. ----
  479. .. _class_ItemList_method_force_update_list_size:
  480. .. rst-class:: classref-method
  481. |void| **force_update_list_size**\ (\ ) :ref:`🔗<class_ItemList_method_force_update_list_size>`
  482. Forces an update to the list size based on its items. This happens automatically whenever size of the items, or other relevant settings like :ref:`auto_height<class_ItemList_property_auto_height>`, change. The method can be used to trigger the update ahead of next drawing pass.
  483. .. rst-class:: classref-item-separator
  484. ----
  485. .. _class_ItemList_method_get_h_scroll_bar:
  486. .. rst-class:: classref-method
  487. :ref:`HScrollBar<class_HScrollBar>` **get_h_scroll_bar**\ (\ ) :ref:`🔗<class_ItemList_method_get_h_scroll_bar>`
  488. Returns the horizontal scrollbar.
  489. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property.
  490. .. rst-class:: classref-item-separator
  491. ----
  492. .. _class_ItemList_method_get_item_at_position:
  493. .. rst-class:: classref-method
  494. :ref:`int<class_int>` **get_item_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`, exact\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_ItemList_method_get_item_at_position>`
  495. Returns the item index at the given ``position``.
  496. When there is no item at that point, -1 will be returned if ``exact`` is ``true``, and the closest item index will be returned otherwise.
  497. \ **Note:** The returned value is unreliable if called right after modifying the **ItemList**, before it redraws in the next frame.
  498. .. rst-class:: classref-item-separator
  499. ----
  500. .. _class_ItemList_method_get_item_auto_translate_mode:
  501. .. rst-class:: classref-method
  502. :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **get_item_auto_translate_mode**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_auto_translate_mode>`
  503. Returns item's auto translate mode.
  504. .. rst-class:: classref-item-separator
  505. ----
  506. .. _class_ItemList_method_get_item_custom_bg_color:
  507. .. rst-class:: classref-method
  508. :ref:`Color<class_Color>` **get_item_custom_bg_color**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_custom_bg_color>`
  509. Returns the custom background color of the item specified by ``idx`` index.
  510. .. rst-class:: classref-item-separator
  511. ----
  512. .. _class_ItemList_method_get_item_custom_fg_color:
  513. .. rst-class:: classref-method
  514. :ref:`Color<class_Color>` **get_item_custom_fg_color**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_custom_fg_color>`
  515. Returns the custom foreground color of the item specified by ``idx`` index.
  516. .. rst-class:: classref-item-separator
  517. ----
  518. .. _class_ItemList_method_get_item_icon:
  519. .. rst-class:: classref-method
  520. :ref:`Texture2D<class_Texture2D>` **get_item_icon**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon>`
  521. Returns the icon associated with the specified index.
  522. .. rst-class:: classref-item-separator
  523. ----
  524. .. _class_ItemList_method_get_item_icon_modulate:
  525. .. rst-class:: classref-method
  526. :ref:`Color<class_Color>` **get_item_icon_modulate**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon_modulate>`
  527. Returns a :ref:`Color<class_Color>` modulating item's icon at the specified index.
  528. .. rst-class:: classref-item-separator
  529. ----
  530. .. _class_ItemList_method_get_item_icon_region:
  531. .. rst-class:: classref-method
  532. :ref:`Rect2<class_Rect2>` **get_item_icon_region**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon_region>`
  533. Returns the region of item's icon used. The whole icon will be used if the region has no area.
  534. .. rst-class:: classref-item-separator
  535. ----
  536. .. _class_ItemList_method_get_item_language:
  537. .. rst-class:: classref-method
  538. :ref:`String<class_String>` **get_item_language**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_language>`
  539. Returns item's text language code.
  540. .. rst-class:: classref-item-separator
  541. ----
  542. .. _class_ItemList_method_get_item_metadata:
  543. .. rst-class:: classref-method
  544. :ref:`Variant<class_Variant>` **get_item_metadata**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_metadata>`
  545. Returns the metadata value of the specified index.
  546. .. rst-class:: classref-item-separator
  547. ----
  548. .. _class_ItemList_method_get_item_rect:
  549. .. rst-class:: classref-method
  550. :ref:`Rect2<class_Rect2>` **get_item_rect**\ (\ idx\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_ItemList_method_get_item_rect>`
  551. Returns the position and size of the item with the specified index, in the coordinate system of the **ItemList** node. If ``expand`` is ``true`` the last column expands to fill the rest of the row.
  552. \ **Note:** The returned value is unreliable if called right after modifying the **ItemList**, before it redraws in the next frame.
  553. .. rst-class:: classref-item-separator
  554. ----
  555. .. _class_ItemList_method_get_item_text:
  556. .. rst-class:: classref-method
  557. :ref:`String<class_String>` **get_item_text**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_text>`
  558. Returns the text associated with the specified index.
  559. .. rst-class:: classref-item-separator
  560. ----
  561. .. _class_ItemList_method_get_item_text_direction:
  562. .. rst-class:: classref-method
  563. :ref:`TextDirection<enum_Control_TextDirection>` **get_item_text_direction**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_text_direction>`
  564. Returns item's text base writing direction.
  565. .. rst-class:: classref-item-separator
  566. ----
  567. .. _class_ItemList_method_get_item_tooltip:
  568. .. rst-class:: classref-method
  569. :ref:`String<class_String>` **get_item_tooltip**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_tooltip>`
  570. Returns the tooltip hint associated with the specified index.
  571. .. rst-class:: classref-item-separator
  572. ----
  573. .. _class_ItemList_method_get_selected_items:
  574. .. rst-class:: classref-method
  575. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_selected_items**\ (\ ) :ref:`🔗<class_ItemList_method_get_selected_items>`
  576. Returns an array with the indexes of the selected items.
  577. .. rst-class:: classref-item-separator
  578. ----
  579. .. _class_ItemList_method_get_v_scroll_bar:
  580. .. rst-class:: classref-method
  581. :ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar**\ (\ ) :ref:`🔗<class_ItemList_method_get_v_scroll_bar>`
  582. Returns the vertical scrollbar.
  583. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property.
  584. .. rst-class:: classref-item-separator
  585. ----
  586. .. _class_ItemList_method_is_anything_selected:
  587. .. rst-class:: classref-method
  588. :ref:`bool<class_bool>` **is_anything_selected**\ (\ ) :ref:`🔗<class_ItemList_method_is_anything_selected>`
  589. Returns ``true`` if one or more items are selected.
  590. .. rst-class:: classref-item-separator
  591. ----
  592. .. _class_ItemList_method_is_item_disabled:
  593. .. rst-class:: classref-method
  594. :ref:`bool<class_bool>` **is_item_disabled**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_disabled>`
  595. Returns ``true`` if the item at the specified index is disabled.
  596. .. rst-class:: classref-item-separator
  597. ----
  598. .. _class_ItemList_method_is_item_icon_transposed:
  599. .. rst-class:: classref-method
  600. :ref:`bool<class_bool>` **is_item_icon_transposed**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_icon_transposed>`
  601. Returns ``true`` if the item icon will be drawn transposed, i.e. the X and Y axes are swapped.
  602. .. rst-class:: classref-item-separator
  603. ----
  604. .. _class_ItemList_method_is_item_selectable:
  605. .. rst-class:: classref-method
  606. :ref:`bool<class_bool>` **is_item_selectable**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_selectable>`
  607. Returns ``true`` if the item at the specified index is selectable.
  608. .. rst-class:: classref-item-separator
  609. ----
  610. .. _class_ItemList_method_is_item_tooltip_enabled:
  611. .. rst-class:: classref-method
  612. :ref:`bool<class_bool>` **is_item_tooltip_enabled**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_tooltip_enabled>`
  613. Returns ``true`` if the tooltip is enabled for specified item index.
  614. .. rst-class:: classref-item-separator
  615. ----
  616. .. _class_ItemList_method_is_selected:
  617. .. rst-class:: classref-method
  618. :ref:`bool<class_bool>` **is_selected**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_selected>`
  619. Returns ``true`` if the item at the specified index is currently selected.
  620. .. rst-class:: classref-item-separator
  621. ----
  622. .. _class_ItemList_method_move_item:
  623. .. rst-class:: classref-method
  624. |void| **move_item**\ (\ from_idx\: :ref:`int<class_int>`, to_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_move_item>`
  625. Moves item from index ``from_idx`` to ``to_idx``.
  626. .. rst-class:: classref-item-separator
  627. ----
  628. .. _class_ItemList_method_remove_item:
  629. .. rst-class:: classref-method
  630. |void| **remove_item**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_remove_item>`
  631. Removes the item specified by ``idx`` index from the list.
  632. .. rst-class:: classref-item-separator
  633. ----
  634. .. _class_ItemList_method_select:
  635. .. rst-class:: classref-method
  636. |void| **select**\ (\ idx\: :ref:`int<class_int>`, single\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_ItemList_method_select>`
  637. Select the item at the specified index.
  638. \ **Note:** This method does not trigger the item selection signal.
  639. .. rst-class:: classref-item-separator
  640. ----
  641. .. _class_ItemList_method_set_item_auto_translate_mode:
  642. .. rst-class:: classref-method
  643. |void| **set_item_auto_translate_mode**\ (\ idx\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) :ref:`🔗<class_ItemList_method_set_item_auto_translate_mode>`
  644. Sets the auto translate mode of the item associated with the specified index.
  645. Items use :ref:`Node.AUTO_TRANSLATE_MODE_INHERIT<class_Node_constant_AUTO_TRANSLATE_MODE_INHERIT>` by default, which uses the same auto translate mode as the **ItemList** itself.
  646. .. rst-class:: classref-item-separator
  647. ----
  648. .. _class_ItemList_method_set_item_custom_bg_color:
  649. .. rst-class:: classref-method
  650. |void| **set_item_custom_bg_color**\ (\ idx\: :ref:`int<class_int>`, custom_bg_color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_ItemList_method_set_item_custom_bg_color>`
  651. Sets the background color of the item specified by ``idx`` index to the specified :ref:`Color<class_Color>`.
  652. .. rst-class:: classref-item-separator
  653. ----
  654. .. _class_ItemList_method_set_item_custom_fg_color:
  655. .. rst-class:: classref-method
  656. |void| **set_item_custom_fg_color**\ (\ idx\: :ref:`int<class_int>`, custom_fg_color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_ItemList_method_set_item_custom_fg_color>`
  657. Sets the foreground color of the item specified by ``idx`` index to the specified :ref:`Color<class_Color>`.
  658. .. rst-class:: classref-item-separator
  659. ----
  660. .. _class_ItemList_method_set_item_disabled:
  661. .. rst-class:: classref-method
  662. |void| **set_item_disabled**\ (\ idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_disabled>`
  663. Disables (or enables) the item at the specified index.
  664. Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing :kbd:`Enter`).
  665. .. rst-class:: classref-item-separator
  666. ----
  667. .. _class_ItemList_method_set_item_icon:
  668. .. rst-class:: classref-method
  669. |void| **set_item_icon**\ (\ idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon>`
  670. Sets (or replaces) the icon's :ref:`Texture2D<class_Texture2D>` associated with the specified index.
  671. .. rst-class:: classref-item-separator
  672. ----
  673. .. _class_ItemList_method_set_item_icon_modulate:
  674. .. rst-class:: classref-method
  675. |void| **set_item_icon_modulate**\ (\ idx\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_modulate>`
  676. Sets a modulating :ref:`Color<class_Color>` of the item associated with the specified index.
  677. .. rst-class:: classref-item-separator
  678. ----
  679. .. _class_ItemList_method_set_item_icon_region:
  680. .. rst-class:: classref-method
  681. |void| **set_item_icon_region**\ (\ idx\: :ref:`int<class_int>`, rect\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_region>`
  682. Sets the region of item's icon used. The whole icon will be used if the region has no area.
  683. .. rst-class:: classref-item-separator
  684. ----
  685. .. _class_ItemList_method_set_item_icon_transposed:
  686. .. rst-class:: classref-method
  687. |void| **set_item_icon_transposed**\ (\ idx\: :ref:`int<class_int>`, transposed\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_transposed>`
  688. Sets whether the item icon will be drawn transposed.
  689. .. rst-class:: classref-item-separator
  690. ----
  691. .. _class_ItemList_method_set_item_language:
  692. .. rst-class:: classref-method
  693. |void| **set_item_language**\ (\ idx\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_language>`
  694. Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  695. .. rst-class:: classref-item-separator
  696. ----
  697. .. _class_ItemList_method_set_item_metadata:
  698. .. rst-class:: classref-method
  699. |void| **set_item_metadata**\ (\ idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_ItemList_method_set_item_metadata>`
  700. Sets a value (of any type) to be stored with the item associated with the specified index.
  701. .. rst-class:: classref-item-separator
  702. ----
  703. .. _class_ItemList_method_set_item_selectable:
  704. .. rst-class:: classref-method
  705. |void| **set_item_selectable**\ (\ idx\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_selectable>`
  706. Allows or disallows selection of the item associated with the specified index.
  707. .. rst-class:: classref-item-separator
  708. ----
  709. .. _class_ItemList_method_set_item_text:
  710. .. rst-class:: classref-method
  711. |void| **set_item_text**\ (\ idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_text>`
  712. Sets text of the item associated with the specified index.
  713. .. rst-class:: classref-item-separator
  714. ----
  715. .. _class_ItemList_method_set_item_text_direction:
  716. .. rst-class:: classref-method
  717. |void| **set_item_text_direction**\ (\ idx\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_ItemList_method_set_item_text_direction>`
  718. Sets item's text base writing direction.
  719. .. rst-class:: classref-item-separator
  720. ----
  721. .. _class_ItemList_method_set_item_tooltip:
  722. .. rst-class:: classref-method
  723. |void| **set_item_tooltip**\ (\ idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_tooltip>`
  724. Sets the tooltip hint for the item associated with the specified index.
  725. .. rst-class:: classref-item-separator
  726. ----
  727. .. _class_ItemList_method_set_item_tooltip_enabled:
  728. .. rst-class:: classref-method
  729. |void| **set_item_tooltip_enabled**\ (\ idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_tooltip_enabled>`
  730. Sets whether the tooltip hint is enabled for specified item index.
  731. .. rst-class:: classref-item-separator
  732. ----
  733. .. _class_ItemList_method_sort_items_by_text:
  734. .. rst-class:: classref-method
  735. |void| **sort_items_by_text**\ (\ ) :ref:`🔗<class_ItemList_method_sort_items_by_text>`
  736. Sorts items in the list by their text.
  737. .. rst-class:: classref-section-separator
  738. ----
  739. .. rst-class:: classref-descriptions-group
  740. Theme Property Descriptions
  741. ---------------------------
  742. .. _class_ItemList_theme_color_font_color:
  743. .. rst-class:: classref-themeproperty
  744. :ref:`Color<class_Color>` **font_color** = ``Color(0.65, 0.65, 0.65, 1)`` :ref:`🔗<class_ItemList_theme_color_font_color>`
  745. Default text :ref:`Color<class_Color>` of the item.
  746. .. rst-class:: classref-item-separator
  747. ----
  748. .. _class_ItemList_theme_color_font_hovered_color:
  749. .. rst-class:: classref-themeproperty
  750. :ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_ItemList_theme_color_font_hovered_color>`
  751. Text :ref:`Color<class_Color>` used when the item is hovered and not selected yet.
  752. .. rst-class:: classref-item-separator
  753. ----
  754. .. _class_ItemList_theme_color_font_hovered_selected_color:
  755. .. rst-class:: classref-themeproperty
  756. :ref:`Color<class_Color>` **font_hovered_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_ItemList_theme_color_font_hovered_selected_color>`
  757. Text :ref:`Color<class_Color>` used when the item is hovered and selected.
  758. .. rst-class:: classref-item-separator
  759. ----
  760. .. _class_ItemList_theme_color_font_outline_color:
  761. .. rst-class:: classref-themeproperty
  762. :ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_ItemList_theme_color_font_outline_color>`
  763. The tint of text outline of the item.
  764. .. rst-class:: classref-item-separator
  765. ----
  766. .. _class_ItemList_theme_color_font_selected_color:
  767. .. rst-class:: classref-themeproperty
  768. :ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_ItemList_theme_color_font_selected_color>`
  769. Text :ref:`Color<class_Color>` used when the item is selected, but not hovered.
  770. .. rst-class:: classref-item-separator
  771. ----
  772. .. _class_ItemList_theme_color_guide_color:
  773. .. rst-class:: classref-themeproperty
  774. :ref:`Color<class_Color>` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` :ref:`🔗<class_ItemList_theme_color_guide_color>`
  775. :ref:`Color<class_Color>` of the guideline. The guideline is a line drawn between each row of items.
  776. .. rst-class:: classref-item-separator
  777. ----
  778. .. _class_ItemList_theme_constant_h_separation:
  779. .. rst-class:: classref-themeproperty
  780. :ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_ItemList_theme_constant_h_separation>`
  781. The horizontal spacing between items.
  782. .. rst-class:: classref-item-separator
  783. ----
  784. .. _class_ItemList_theme_constant_icon_margin:
  785. .. rst-class:: classref-themeproperty
  786. :ref:`int<class_int>` **icon_margin** = ``4`` :ref:`🔗<class_ItemList_theme_constant_icon_margin>`
  787. The spacing between item's icon and text.
  788. .. rst-class:: classref-item-separator
  789. ----
  790. .. _class_ItemList_theme_constant_line_separation:
  791. .. rst-class:: classref-themeproperty
  792. :ref:`int<class_int>` **line_separation** = ``2`` :ref:`🔗<class_ItemList_theme_constant_line_separation>`
  793. The vertical spacing between each line of text.
  794. .. rst-class:: classref-item-separator
  795. ----
  796. .. _class_ItemList_theme_constant_outline_size:
  797. .. rst-class:: classref-themeproperty
  798. :ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_ItemList_theme_constant_outline_size>`
  799. The size of the item text outline.
  800. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_ItemList_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
  801. .. rst-class:: classref-item-separator
  802. ----
  803. .. _class_ItemList_theme_constant_v_separation:
  804. .. rst-class:: classref-themeproperty
  805. :ref:`int<class_int>` **v_separation** = ``4`` :ref:`🔗<class_ItemList_theme_constant_v_separation>`
  806. The vertical spacing between items.
  807. .. rst-class:: classref-item-separator
  808. ----
  809. .. _class_ItemList_theme_font_font:
  810. .. rst-class:: classref-themeproperty
  811. :ref:`Font<class_Font>` **font** :ref:`🔗<class_ItemList_theme_font_font>`
  812. :ref:`Font<class_Font>` of the item's text.
  813. .. rst-class:: classref-item-separator
  814. ----
  815. .. _class_ItemList_theme_font_size_font_size:
  816. .. rst-class:: classref-themeproperty
  817. :ref:`int<class_int>` **font_size** :ref:`🔗<class_ItemList_theme_font_size_font_size>`
  818. Font size of the item's text.
  819. .. rst-class:: classref-item-separator
  820. ----
  821. .. _class_ItemList_theme_style_cursor:
  822. .. rst-class:: classref-themeproperty
  823. :ref:`StyleBox<class_StyleBox>` **cursor** :ref:`🔗<class_ItemList_theme_style_cursor>`
  824. :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **ItemList** is being focused.
  825. .. rst-class:: classref-item-separator
  826. ----
  827. .. _class_ItemList_theme_style_cursor_unfocused:
  828. .. rst-class:: classref-themeproperty
  829. :ref:`StyleBox<class_StyleBox>` **cursor_unfocused** :ref:`🔗<class_ItemList_theme_style_cursor_unfocused>`
  830. :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **ItemList** is not being focused.
  831. .. rst-class:: classref-item-separator
  832. ----
  833. .. _class_ItemList_theme_style_focus:
  834. .. rst-class:: classref-themeproperty
  835. :ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_ItemList_theme_style_focus>`
  836. The focused style for the **ItemList**, drawn on top of the background, but below everything else.
  837. .. rst-class:: classref-item-separator
  838. ----
  839. .. _class_ItemList_theme_style_hovered:
  840. .. rst-class:: classref-themeproperty
  841. :ref:`StyleBox<class_StyleBox>` **hovered** :ref:`🔗<class_ItemList_theme_style_hovered>`
  842. :ref:`StyleBox<class_StyleBox>` for the hovered, but not selected items.
  843. .. rst-class:: classref-item-separator
  844. ----
  845. .. _class_ItemList_theme_style_hovered_selected:
  846. .. rst-class:: classref-themeproperty
  847. :ref:`StyleBox<class_StyleBox>` **hovered_selected** :ref:`🔗<class_ItemList_theme_style_hovered_selected>`
  848. :ref:`StyleBox<class_StyleBox>` for the hovered and selected items, used when the **ItemList** is not being focused.
  849. .. rst-class:: classref-item-separator
  850. ----
  851. .. _class_ItemList_theme_style_hovered_selected_focus:
  852. .. rst-class:: classref-themeproperty
  853. :ref:`StyleBox<class_StyleBox>` **hovered_selected_focus** :ref:`🔗<class_ItemList_theme_style_hovered_selected_focus>`
  854. :ref:`StyleBox<class_StyleBox>` for the hovered and selected items, used when the **ItemList** is being focused.
  855. .. rst-class:: classref-item-separator
  856. ----
  857. .. _class_ItemList_theme_style_panel:
  858. .. rst-class:: classref-themeproperty
  859. :ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_ItemList_theme_style_panel>`
  860. The background style for the **ItemList**.
  861. .. rst-class:: classref-item-separator
  862. ----
  863. .. _class_ItemList_theme_style_selected:
  864. .. rst-class:: classref-themeproperty
  865. :ref:`StyleBox<class_StyleBox>` **selected** :ref:`🔗<class_ItemList_theme_style_selected>`
  866. :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **ItemList** is not being focused.
  867. .. rst-class:: classref-item-separator
  868. ----
  869. .. _class_ItemList_theme_style_selected_focus:
  870. .. rst-class:: classref-themeproperty
  871. :ref:`StyleBox<class_StyleBox>` **selected_focus** :ref:`🔗<class_ItemList_theme_style_selected_focus>`
  872. :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **ItemList** is being focused.
  873. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  874. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  875. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  876. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  877. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  878. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  879. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  880. .. |void| replace:: :abbr:`void (No return value.)`