Files
godot-docs-l10n/classes/fr/class_editorinspector.rst
2025-09-30 13:31:55 +02:00

244 lines
15 KiB
ReStructuredText
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_EditorInspector:
EditorInspector
===============
**Hérite de:** :ref:`ScrollContainer<class_ScrollContainer>` **<** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
Un contrôle pour modifier les propriétés d'un objet.
.. rst-class:: classref-introduction-group
Description
-----------
This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the **EditorInspector** used in the editor's Inspector dock, use :ref:`EditorInterface.get_inspector()<class_EditorInterface_method_get_inspector>`.
\ **EditorInspector** will show properties in the same order as the array returned by :ref:`Object.get_property_list()<class_Object_method_get_property_list>`.
If a property's name is path-like (i.e. if it contains forward slashes), **EditorInspector** will create nested sections for "directories" along the path. For example, if a property is named ``highlighting/gdscript/node_path_color``, it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section.
If a property has :ref:`@GlobalScope.PROPERTY_USAGE_GROUP<class_@GlobalScope_constant_PROPERTY_USAGE_GROUP>` usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. **EditorInspector** will create a top-level section for each group. For example, if a property with group usage is named ``Collide With`` and its hint string is ``collide_with_``, a subsequent ``collide_with_area`` property will be shown as "Area" inside the "Collide With" section. There is also a special case: when the hint string contains the name of a property, that property is grouped too. This is mainly to help grouping properties like ``font``, ``font_color`` and ``font_size`` (using the hint string ``font_``).
If a property has :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP<class_@GlobalScope_constant_PROPERTY_USAGE_SUBGROUP>` usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup.
\ **Note:** Unlike sections created from path-like property names, **EditorInspector** won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names.
.. rst-class:: classref-reftable-group
Propriétés
--------------------
.. table::
:widths: auto
+----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | draw_focus_border | ``true`` (overrides :ref:`ScrollContainer<class_ScrollContainer_property_draw_focus_border>`) |
+----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+
| :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
+----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | follow_focus | ``true`` (overrides :ref:`ScrollContainer<class_ScrollContainer_property_follow_focus>`) |
+----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+
| :ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` | horizontal_scroll_mode | ``0`` (overrides :ref:`ScrollContainer<class_ScrollContainer_property_horizontal_scroll_mode>`) |
+----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+
.. rst-class:: classref-reftable-group
Méthodes
----------------
.. table::
:widths: auto
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`edit<class_EditorInspector_method_edit>`\ (\ object\: :ref:`Object<class_Object>`\ ) |
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Object<class_Object>` | :ref:`get_edited_object<class_EditorInspector_method_get_edited_object>`\ (\ ) |
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_selected_path<class_EditorInspector_method_get_selected_path>`\ (\ ) |const| |
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorProperty<class_EditorProperty>` | :ref:`instantiate_property_editor<class_EditorInspector_method_instantiate_property_editor>`\ (\ object\: :ref:`Object<class_Object>`, type\: :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`, path\: :ref:`String<class_String>`, hint\: :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>`, hint_text\: :ref:`String<class_String>`, usage\: :ref:`int<class_int>`, wide\: :ref:`bool<class_bool>` = false\ ) |static| |
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Signaux
--------------
.. _class_EditorInspector_signal_edited_object_changed:
.. rst-class:: classref-signal
**edited_object_changed**\ (\ ) :ref:`🔗<class_EditorInspector_signal_edited_object_changed>`
Emitted when the object being edited by the inspector has changed.
.. rst-class:: classref-item-separator
----
.. _class_EditorInspector_signal_object_id_selected:
.. rst-class:: classref-signal
**object_id_selected**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorInspector_signal_object_id_selected>`
Emitted when the Edit button of an :ref:`Object<class_Object>` has been pressed in the inspector. This is mainly used in the remote scene tree Inspector.
.. rst-class:: classref-item-separator
----
.. _class_EditorInspector_signal_property_deleted:
.. rst-class:: classref-signal
**property_deleted**\ (\ property\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInspector_signal_property_deleted>`
Emitted when a property is removed from the inspector.
.. rst-class:: classref-item-separator
----
.. _class_EditorInspector_signal_property_edited:
.. rst-class:: classref-signal
**property_edited**\ (\ property\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInspector_signal_property_edited>`
Émis lorsqu'une propriété est modifiée dans l'inspecteur.
.. rst-class:: classref-item-separator
----
.. _class_EditorInspector_signal_property_keyed:
.. rst-class:: classref-signal
**property_keyed**\ (\ property\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`, advance\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorInspector_signal_property_keyed>`
Émis lorsqu'une propriété est utilisée comme clé dans l'inspecteur. Les propriétés peuvent être utilisées comme clé en cliquant sur l'icône "clé" à côté d'une propriété lorsque le panneau "Animation" est ouvert.
.. rst-class:: classref-item-separator
----
.. _class_EditorInspector_signal_property_selected:
.. rst-class:: classref-signal
**property_selected**\ (\ property\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInspector_signal_property_selected>`
Émis lorsqu'une propriété est sélectionnée dans l'inspecteur.
.. rst-class:: classref-item-separator
----
.. _class_EditorInspector_signal_property_toggled:
.. rst-class:: classref-signal
**property_toggled**\ (\ property\: :ref:`String<class_String>`, checked\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorInspector_signal_property_toggled>`
Émis lorsqu'une propriété booléenne est basculée dans l'inspecteur.
\ **Note :** Ce signal n'est jamais émis si la propriété interne ``autoclear`` est activée. Comme cette propriété est toujours activée dans l'inspecteur de l'éditeur, ce signal n'est jamais émis par l'éditeur lui-même.
.. rst-class:: classref-item-separator
----
.. _class_EditorInspector_signal_resource_selected:
.. rst-class:: classref-signal
**resource_selected**\ (\ resource\: :ref:`Resource<class_Resource>`, path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInspector_signal_resource_selected>`
Émis quand une ressource est sélectionnée dans l'inspecteur.
.. rst-class:: classref-item-separator
----
.. _class_EditorInspector_signal_restart_requested:
.. rst-class:: classref-signal
**restart_requested**\ (\ ) :ref:`🔗<class_EditorInspector_signal_restart_requested>`
Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Descriptions des méthodes
--------------------------------------------------
.. _class_EditorInspector_method_edit:
.. rst-class:: classref-method
|void| **edit**\ (\ object\: :ref:`Object<class_Object>`\ ) :ref:`🔗<class_EditorInspector_method_edit>`
Shows the properties of the given ``object`` in this inspector for editing. To clear the inspector, call this method with ``null``.
\ **Note:** If you want to edit an object in the editor's main inspector, use the ``edit_*`` methods in :ref:`EditorInterface<class_EditorInterface>` instead.
.. rst-class:: classref-item-separator
----
.. _class_EditorInspector_method_get_edited_object:
.. rst-class:: classref-method
:ref:`Object<class_Object>` **get_edited_object**\ (\ ) :ref:`🔗<class_EditorInspector_method_get_edited_object>`
Renvoie l'objet actuellement sélectionné dans cet inspecteur.
.. rst-class:: classref-item-separator
----
.. _class_EditorInspector_method_get_selected_path:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_selected_path**\ (\ ) |const| :ref:`🔗<class_EditorInspector_method_get_selected_path>`
Obtient le chemin de la propriété actuellement sélectionnée.
.. rst-class:: classref-item-separator
----
.. _class_EditorInspector_method_instantiate_property_editor:
.. rst-class:: classref-method
:ref:`EditorProperty<class_EditorProperty>` **instantiate_property_editor**\ (\ object\: :ref:`Object<class_Object>`, type\: :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`, path\: :ref:`String<class_String>`, hint\: :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>`, hint_text\: :ref:`String<class_String>`, usage\: :ref:`int<class_int>`, wide\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_EditorInspector_method_instantiate_property_editor>`
Creates a property editor that can be used by plugin UI to edit the specified property of an ``object``.
.. |virtual| replace:: :abbr:`virtual (Cette méthode doit typiquement être redéfinie par l'utilisateur pour avoir un effet.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (Cette méthode n'a pas d'effets de bord. Elle ne modifie aucune des variables membres de l'instance.)`
.. |vararg| replace:: :abbr:`vararg (Cette méthode accepte n'importe quel nombre d'arguments après ceux décris ici.)`
.. |constructor| replace:: :abbr:`constructor (Cette méthode est utilisée pour construire un type.)`
.. |static| replace:: :abbr:`static (Cette méthode n'a pas besoin d'instance pour être appelée, elle peut donc être directement appelée en utilisant le nom de la classe.)`
.. |operator| replace:: :abbr:`operator (Cette méthode décrit un opérateur valide à utiliser avec ce type en tant qu'opérande gauche.)`
.. |bitfield| replace:: :abbr:`BitField (Cette valeur est un nombre entier composé d'un masque de bits des options suivantes.)`
.. |void| replace:: :abbr:`void (Aucune valeur de retour.)`