.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_ItemList: ItemList ======== **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Member Functions ---------------- +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_item` **(** :ref:`String` text, :ref:`Texture` icon=NULL, :ref:`bool` selectable=true **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_icon_item` **(** :ref:`Texture` icon, :ref:`bool` selectable=true **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture` icon **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_selectable` **(** :ref:`int` idx, :ref:`bool` selectable **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_item_selectable` **(** :ref:`int` idx **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_metadata` **(** :ref:`int` idx, var metadata **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_custom_bg_color` **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_item_custom_bg_color` **(** :ref:`int` idx **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`select` **(** :ref:`int` idx, :ref:`bool` single=true **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`unselect` **(** :ref:`int` idx **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_selected` **(** :ref:`int` idx **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_item_count` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_item` **(** :ref:`int` idx **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`sort_items_by_text` **(** **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_fixed_column_width` **(** :ref:`int` width **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_fixed_column_width` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_max_text_lines` **(** :ref:`int` lines **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_max_text_lines` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_max_columns` **(** :ref:`int` amount **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_max_columns` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_select_mode` **(** :ref:`int` mode **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_select_mode` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_icon_mode` **(** :ref:`int` mode **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_icon_mode` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_min_icon_size` **(** :ref:`Vector2` size **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_min_icon_size` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`ensure_current_is_visible` **(** **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- - **item_activated** **(** :ref:`int` index **)** - **multi_selected** **(** :ref:`int` index, :ref:`bool` selected **)** - **item_selected** **(** :ref:`int` index **)** Numeric Constants ----------------- - **ICON_MODE_TOP** = **0** - **ICON_MODE_LEFT** = **1** - **SELECT_SINGLE** = **0** - **SELECT_MULTI** = **1** Member Function Description --------------------------- .. _class_ItemList_add_item: - void **add_item** **(** :ref:`String` text, :ref:`Texture` icon=NULL, :ref:`bool` selectable=true **)** .. _class_ItemList_add_icon_item: - void **add_icon_item** **(** :ref:`Texture` icon, :ref:`bool` selectable=true **)** .. _class_ItemList_set_item_text: - void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** .. _class_ItemList_get_item_text: - :ref:`String` **get_item_text** **(** :ref:`int` idx **)** const .. _class_ItemList_set_item_icon: - void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture` icon **)** .. _class_ItemList_get_item_icon: - :ref:`Texture` **get_item_icon** **(** :ref:`int` idx **)** const .. _class_ItemList_set_item_selectable: - void **set_item_selectable** **(** :ref:`int` idx, :ref:`bool` selectable **)** .. _class_ItemList_is_item_selectable: - :ref:`bool` **is_item_selectable** **(** :ref:`int` idx **)** const .. _class_ItemList_set_item_disabled: - void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** .. _class_ItemList_is_item_disabled: - :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** const .. _class_ItemList_set_item_metadata: - void **set_item_metadata** **(** :ref:`int` idx, var metadata **)** .. _class_ItemList_get_item_metadata: - void **get_item_metadata** **(** :ref:`int` idx **)** const .. _class_ItemList_set_item_custom_bg_color: - void **set_item_custom_bg_color** **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** .. _class_ItemList_get_item_custom_bg_color: - :ref:`Color` **get_item_custom_bg_color** **(** :ref:`int` idx **)** const .. _class_ItemList_set_item_tooltip: - void **set_item_tooltip** **(** :ref:`int` idx, :ref:`String` tooltip **)** .. _class_ItemList_get_item_tooltip: - :ref:`String` **get_item_tooltip** **(** :ref:`int` idx **)** const .. _class_ItemList_select: - void **select** **(** :ref:`int` idx, :ref:`bool` single=true **)** .. _class_ItemList_unselect: - void **unselect** **(** :ref:`int` idx **)** .. _class_ItemList_is_selected: - :ref:`bool` **is_selected** **(** :ref:`int` idx **)** const .. _class_ItemList_get_item_count: - :ref:`int` **get_item_count** **(** **)** const .. _class_ItemList_remove_item: - void **remove_item** **(** :ref:`int` idx **)** .. _class_ItemList_clear: - void **clear** **(** **)** .. _class_ItemList_sort_items_by_text: - void **sort_items_by_text** **(** **)** .. _class_ItemList_set_fixed_column_width: - void **set_fixed_column_width** **(** :ref:`int` width **)** .. _class_ItemList_get_fixed_column_width: - :ref:`int` **get_fixed_column_width** **(** **)** const .. _class_ItemList_set_max_text_lines: - void **set_max_text_lines** **(** :ref:`int` lines **)** .. _class_ItemList_get_max_text_lines: - :ref:`int` **get_max_text_lines** **(** **)** const .. _class_ItemList_set_max_columns: - void **set_max_columns** **(** :ref:`int` amount **)** .. _class_ItemList_get_max_columns: - :ref:`int` **get_max_columns** **(** **)** const .. _class_ItemList_set_select_mode: - void **set_select_mode** **(** :ref:`int` mode **)** .. _class_ItemList_get_select_mode: - :ref:`int` **get_select_mode** **(** **)** const .. _class_ItemList_set_icon_mode: - void **set_icon_mode** **(** :ref:`int` mode **)** .. _class_ItemList_get_icon_mode: - :ref:`int` **get_icon_mode** **(** **)** const .. _class_ItemList_set_min_icon_size: - void **set_min_icon_size** **(** :ref:`Vector2` size **)** .. _class_ItemList_get_min_icon_size: - :ref:`Vector2` **get_min_icon_size** **(** **)** const .. _class_ItemList_ensure_current_is_visible: - void **ensure_current_is_visible** **(** **)**