[][src]Struct gdnative::api::EditorProperty

pub struct EditorProperty { /* fields omitted */ }

tools class EditorProperty inherits Container (unsafe).

Official documentation

See the documentation of this class in the Godot engine's official documentation.

Class hierarchy

EditorProperty inherits methods from:

Tool

This class is used to interact with Godot's editor.

Safety

All types in the Godot API have "interior mutability" in Rust parlance. To enforce that the official thread-safety guidelines are followed, the typestate pattern is used in the Ref and TRef smart pointers, and the Instance API. The typestate Access in these types tracks whether the access is unique, shared, or exclusive to the current thread. For more information, see the type-level documentation on Ref.

Implementations

impl EditorProperty[src]

pub fn add_focusable(&self, control: impl AsArg<Control>)[src]

If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed.

pub fn emit_changed(
    &self,
    property: impl Into<GodotString>,
    value: impl OwnedToVariant,
    field: impl Into<GodotString>,
    changing: bool
)
[src]

If one or several properties have changed, this must be called. [code]field[/code] is used in case your editor can modify fields separately (as an example, Vector3.x). The [code]changing[/code] argument avoids the editor requesting this property to be refreshed (leave as [code]false[/code] if unsure).

Default Arguments

  • field - ""
  • changing - false

pub fn get_edited_object(&self) -> Option<Ref<Object, Shared>>[src]

Gets the edited object.

pub fn get_edited_property(&self) -> GodotString[src]

Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin.parse_property]), then this will return the property.

pub fn label(&self) -> GodotString[src]

Set this property to change the label (if you want to show one).

pub fn get_tooltip_text(&self) -> GodotString[src]

Override if you want to allow a custom tooltip over your property.

pub fn is_checkable(&self) -> bool[src]

Used by the inspector, set to [code]true[/code] when the property is checkable.

pub fn is_checked(&self) -> bool[src]

Used by the inspector, set to [code]true[/code] when the property is checked.

pub fn is_draw_red(&self) -> bool[src]

Used by the inspector, set to [code]true[/code] when the property must draw with error color. This is used for editable children's properties.

pub fn is_keying(&self) -> bool[src]

Used by the inspector, set to [code]true[/code] when the property can add keys for animation.

pub fn is_read_only(&self) -> bool[src]

Used by the inspector, set to [code]true[/code] when the property is read-only.

pub fn set_bottom_editor(&self, editor: impl AsArg<Control>)[src]

Adds controls with this function if you want them on the bottom (below the label).

pub fn set_checkable(&self, checkable: bool)[src]

Used by the inspector, set to [code]true[/code] when the property is checkable.

pub fn set_checked(&self, checked: bool)[src]

Used by the inspector, set to [code]true[/code] when the property is checked.

pub fn set_draw_red(&self, draw_red: bool)[src]

Used by the inspector, set to [code]true[/code] when the property must draw with error color. This is used for editable children's properties.

pub fn set_keying(&self, keying: bool)[src]

Used by the inspector, set to [code]true[/code] when the property can add keys for animation.

pub fn set_label(&self, text: impl Into<GodotString>)[src]

Set this property to change the label (if you want to show one).

pub fn set_read_only(&self, read_only: bool)[src]

Used by the inspector, set to [code]true[/code] when the property is read-only.

Methods from Deref<Target = Container>

pub fn fit_child_in_rect(
    &self,
    child: impl AsArg<Control>,
    rect: Rect<f32, UnknownUnit>
)
[src]

Fit a child control in a given rect. This is mainly a helper for creating custom container classes.

pub fn queue_sort(&self)[src]

Queue resort of the contained children. This is called automatically anyway, but can be called upon request.

Trait Implementations

impl Debug for EditorProperty[src]

impl Deref for EditorProperty[src]

type Target = Container

The resulting type after dereferencing.

impl DerefMut for EditorProperty[src]

impl GodotObject for EditorProperty[src]

type RefKind = ManuallyManaged

The memory management kind of this type. This modifies the behavior of the Ref smart pointer. See its type-level documentation for more information. Read more

impl QueueFree for EditorProperty[src]

impl SubClass<CanvasItem> for EditorProperty[src]

impl SubClass<Container> for EditorProperty[src]

impl SubClass<Control> for EditorProperty[src]

impl SubClass<Node> for EditorProperty[src]

impl SubClass<Object> for EditorProperty[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SubClass<T> for T where
    T: GodotObject
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.