[−][src]Struct gdnative_bindings::WindowDialog
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<Self, 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 const NOTIFICATION_POPUP_HIDE: i64
[src]
pub const NOTIFICATION_POST_POPUP: i64
[src]
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: Rect2)
[src]
pub fn popup_centered(&self, size: Vector2)
[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: Vector2, 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: Vector2)
[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]
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
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 Instanciable for WindowDialog
[src]
impl QueueFree for WindowDialog
[src]
unsafe fn godot_queue_free(obj: *mut godot_object)
[src]
impl Sealed 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 FileDialog
[src]
impl SubClass<WindowDialog> for ConfirmationDialog
[src]
impl SubClass<WindowDialog> for AcceptDialog
[src]
impl SubClass<WindowDialog> for EditorFileDialog
[src]
Auto Trait Implementations
impl RefUnwindSafe for WindowDialog
impl !Send for WindowDialog
impl !Sync for WindowDialog
impl Unpin for WindowDialog
impl UnwindSafe for WindowDialog
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>,