[−][src]Struct gdnative_bindings::EditorProperty
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]
&self,
property: impl Into<GodotString>,
value: impl OwnedToVariant,
field: impl Into<GodotString>,
changing: bool
)
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 const NOTIFICATION_SORT_CHILDREN: i64
[src]
pub fn fit_child_in_rect(&self, child: impl AsArg<Control>, rect: Rect2)
[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]
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
fn class_name() -> &'static str
[src]
fn null() -> Null<Self>
[src]
fn new() -> Ref<Self, Unique> where
Self: Instanciable,
[src]
Self: Instanciable,
fn cast<T>(&self) -> Option<&T> where
T: GodotObject + SubClass<Self>,
[src]
T: GodotObject + SubClass<Self>,
fn upcast<T>(&self) -> &T where
Self: SubClass<T>,
T: GodotObject,
[src]
Self: SubClass<T>,
T: GodotObject,
unsafe fn assume_shared(&self) -> Ref<Self, Shared>
[src]
unsafe fn assume_thread_local(&self) -> Ref<Self, ThreadLocal> where
Self: GodotObject<RefKind = RefCounted>,
[src]
Self: GodotObject<RefKind = RefCounted>,
unsafe fn assume_unique(&self) -> Ref<Self, Unique>
[src]
impl QueueFree for EditorProperty
[src]
unsafe fn godot_queue_free(obj: *mut godot_object)
[src]
impl Sealed 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
impl RefUnwindSafe for EditorProperty
impl !Send for EditorProperty
impl !Sync for EditorProperty
impl Unpin for EditorProperty
impl UnwindSafe for EditorProperty
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SubClass<T> for T where
T: GodotObject,
[src]
T: GodotObject,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,