[][src]Struct gdnative::api::WindowDialog

pub struct WindowDialog { /* fields omitted */ }

core class WindowDialog inherits Popup (unsafe).

Official documentation

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

Memory management

Non reference counted objects such as the ones of this type are usually owned by the engine.

WindowDialog is a reference-only type. Persistent references can only exist in the unsafe Ref<WindowDialog> form.

In the cases where Rust code owns an object of this type, for example if the object was just created on the Rust side and not passed to the engine yet, ownership should be either given to the engine or the object must be manually destroyed using Ref::free, or Ref::queue_free if it is a Node.

Class hierarchy

WindowDialog inherits methods from:

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 WindowDialog[src]

pub fn new() -> Ref<WindowDialog, Unique>[src]

Creates a new instance of this object.

Because this type is not reference counted, the lifetime of the returned object is not automatically managed.

Immediately after creation, the object is owned by the caller, and can be passed to the engine (in which case the engine will be responsible for destroying the object) or destroyed manually using Ref::free, or preferably Ref::queue_free if it is a Node.

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

Returns the close [TextureButton].

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

If [code]true[/code], the user can resize the window.

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

The text displayed in the window's title bar.

pub fn set_resizable(&self, resizable: bool)[src]

If [code]true[/code], the user can resize the window.

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

The text displayed in the window's title bar.

Methods from Deref<Target = Popup>

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

If [code]true[/code], the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event.
			[b]Note:[/b] Enabling this property doesn't affect the Close or Cancel buttons' behavior in dialogs that inherit from this class. As a workaround, you can use [method WindowDialog.get_close_button] or [method ConfirmationDialog.get_cancel] and hide the buttons in question by setting their [member CanvasItem.visible] property to [code]false[/code].

pub fn popup(&self, bounds: Rect<f32, UnknownUnit>)[src]

Popup (show the control in modal form).

Default Arguments

  • bounds - Rect2( 0, 0, 0, 0 )

pub fn popup_centered(&self, size: Vector2D<f32, UnknownUnit>)[src]

Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by [code]size[/code].

Default Arguments

  • size - Vector2( 0, 0 )

pub fn popup_centered_clamped(
    &self,
    size: Vector2D<f32, UnknownUnit>,
    fallback_ratio: f64
)
[src]

Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, clamping the size to [code]size[/code], then ensuring the popup is no larger than the viewport size multiplied by [code]fallback_ratio[/code].

Default Arguments

  • size - Vector2( 0, 0 )
  • fallback_ratio - 0.75

pub fn popup_centered_minsize(&self, minsize: Vector2D<f32, UnknownUnit>)[src]

Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, ensuring the size is never smaller than [code]minsize[/code].

Default Arguments

  • minsize - Vector2( 0, 0 )

pub fn popup_centered_ratio(&self, ratio: f64)[src]

Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, scaled at a ratio of size of the screen.

Default Arguments

  • ratio - 0.75

pub fn set_as_minsize(&self)[src]

Shrink popup to keep to the minimum size of content.

pub fn set_exclusive(&self, enable: bool)[src]

If [code]true[/code], the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event.
			[b]Note:[/b] Enabling this property doesn't affect the Close or Cancel buttons' behavior in dialogs that inherit from this class. As a workaround, you can use [method WindowDialog.get_close_button] or [method ConfirmationDialog.get_cancel] and hide the buttons in question by setting their [member CanvasItem.visible] property to [code]false[/code].

Trait Implementations

impl Debug for WindowDialog[src]

impl Deref for WindowDialog[src]

type Target = Popup

The resulting type after dereferencing.

impl DerefMut for WindowDialog[src]

impl GodotObject for WindowDialog[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 Instanciable for WindowDialog[src]

impl QueueFree for WindowDialog[src]

impl SubClass<CanvasItem> for WindowDialog[src]

impl SubClass<Control> for WindowDialog[src]

impl SubClass<Node> for WindowDialog[src]

impl SubClass<Object> for WindowDialog[src]

impl SubClass<Popup> for WindowDialog[src]

impl SubClass<WindowDialog> for ScriptCreateDialog[src]

impl SubClass<WindowDialog> for AcceptDialog[src]

impl SubClass<WindowDialog> for ConfirmationDialog[src]

impl SubClass<WindowDialog> for FileDialog[src]

impl SubClass<WindowDialog> for EditorFileDialog[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.