[][src]Struct gdnative::api::Container

pub struct Container { /* fields omitted */ }

core class Container inherits Control (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.

Container is a reference-only type. Persistent references can only exist in the unsafe Ref<Container> 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 Ptr::free, or Ptr::queue_free if it is a Node.

Class hierarchy

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

Constants

impl Container[src]

pub fn new() -> Ref<Container, 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 Ptr::free, or preferably Ptr::queue_free if it is a Node.

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

pub fn queue_sort(&self)[src]

Methods from Deref<Target = Control>

pub const ANCHOR_BEGIN: i64[src]

pub const ANCHOR_END: i64[src]

pub const CURSOR_ARROW: i64[src]

pub const CURSOR_BDIAGSIZE: i64[src]

pub const CURSOR_BUSY: i64[src]

pub const CURSOR_CAN_DROP: i64[src]

pub const CURSOR_CROSS: i64[src]

pub const CURSOR_DRAG: i64[src]

pub const CURSOR_FDIAGSIZE: i64[src]

pub const CURSOR_FORBIDDEN: i64[src]

pub const CURSOR_HELP: i64[src]

pub const CURSOR_HSIZE: i64[src]

pub const CURSOR_HSPLIT: i64[src]

pub const CURSOR_IBEAM: i64[src]

pub const CURSOR_MOVE: i64[src]

pub const CURSOR_POINTING_HAND: i64[src]

pub const CURSOR_VSIZE: i64[src]

pub const CURSOR_VSPLIT: i64[src]

pub const CURSOR_WAIT: i64[src]

pub const FOCUS_ALL: i64[src]

pub const FOCUS_CLICK: i64[src]

pub const FOCUS_NONE: i64[src]

pub const GROW_DIRECTION_BEGIN: i64[src]

pub const GROW_DIRECTION_BOTH: i64[src]

pub const GROW_DIRECTION_END: i64[src]

pub const MOUSE_FILTER_IGNORE: i64[src]

pub const MOUSE_FILTER_PASS: i64[src]

pub const MOUSE_FILTER_STOP: i64[src]

pub const NOTIFICATION_FOCUS_ENTER: i64[src]

pub const NOTIFICATION_FOCUS_EXIT: i64[src]

pub const NOTIFICATION_MODAL_CLOSE: i64[src]

pub const NOTIFICATION_MOUSE_ENTER: i64[src]

pub const NOTIFICATION_MOUSE_EXIT: i64[src]

pub const NOTIFICATION_RESIZED: i64[src]

pub const NOTIFICATION_SCROLL_BEGIN: i64[src]

pub const NOTIFICATION_SCROLL_END: i64[src]

pub const NOTIFICATION_THEME_CHANGED: i64[src]

pub const PRESET_BOTTOM_LEFT: i64[src]

pub const PRESET_BOTTOM_RIGHT: i64[src]

pub const PRESET_BOTTOM_WIDE: i64[src]

pub const PRESET_CENTER: i64[src]

pub const PRESET_CENTER_BOTTOM: i64[src]

pub const PRESET_CENTER_LEFT: i64[src]

pub const PRESET_CENTER_RIGHT: i64[src]

pub const PRESET_CENTER_TOP: i64[src]

pub const PRESET_HCENTER_WIDE: i64[src]

pub const PRESET_LEFT_WIDE: i64[src]

pub const PRESET_MODE_KEEP_HEIGHT: i64[src]

pub const PRESET_MODE_KEEP_SIZE: i64[src]

pub const PRESET_MODE_KEEP_WIDTH: i64[src]

pub const PRESET_MODE_MINSIZE: i64[src]

pub const PRESET_RIGHT_WIDE: i64[src]

pub const PRESET_TOP_LEFT: i64[src]

pub const PRESET_TOP_RIGHT: i64[src]

pub const PRESET_TOP_WIDE: i64[src]

pub const PRESET_VCENTER_WIDE: i64[src]

pub const PRESET_WIDE: i64[src]

pub const SIZE_EXPAND: i64[src]

pub const SIZE_EXPAND_FILL: i64[src]

pub const SIZE_FILL: i64[src]

pub const SIZE_SHRINK_CENTER: i64[src]

pub const SIZE_SHRINK_END: i64[src]

pub fn accept_event(&self)[src]

pub fn add_color_override(&self, name: impl Into<GodotString>, color: Color)[src]

pub fn add_constant_override(&self, name: impl Into<GodotString>, constant: i64)[src]

pub fn add_font_override(
    &self,
    name: impl Into<GodotString>,
    font: impl AsArg<Font>
)
[src]

pub fn add_icon_override(
    &self,
    name: impl Into<GodotString>,
    texture: impl AsArg<Texture>
)
[src]

pub fn add_shader_override(
    &self,
    name: impl Into<GodotString>,
    shader: impl AsArg<Shader>
)
[src]

pub fn add_stylebox_override(
    &self,
    name: impl Into<GodotString>,
    stylebox: impl AsArg<StyleBox>
)
[src]

pub fn force_drag(
    &self,
    data: impl OwnedToVariant,
    preview: impl AsArg<Control>
)
[src]

pub fn anchor(&self, margin: i64) -> f64[src]

pub fn get_begin(&self) -> Vector2D<f32, UnknownUnit>[src]

pub fn get_color(
    &self,
    name: impl Into<GodotString>,
    _type: impl Into<GodotString>
) -> Color
[src]

pub fn get_combined_minimum_size(&self) -> Vector2D<f32, UnknownUnit>[src]

pub fn get_constant(
    &self,
    name: impl Into<GodotString>,
    _type: impl Into<GodotString>
) -> i64
[src]

pub fn get_cursor_shape(
    &self,
    position: Vector2D<f32, UnknownUnit>
) -> CursorShape
[src]

pub fn custom_minimum_size(&self) -> Vector2D<f32, UnknownUnit>[src]

pub fn default_cursor_shape(&self) -> CursorShape[src]

pub fn get_end(&self) -> Vector2D<f32, UnknownUnit>[src]

pub fn focus_mode(&self) -> FocusMode[src]

pub fn focus_neighbour(&self, margin: i64) -> NodePath[src]

pub fn focus_next(&self) -> NodePath[src]

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

pub fn focus_previous(&self) -> NodePath[src]

pub fn get_font(
    &self,
    name: impl Into<GodotString>,
    _type: impl Into<GodotString>
) -> Option<Ref<Font, Shared>>
[src]

pub fn global_position(&self) -> Vector2D<f32, UnknownUnit>[src]

pub fn get_global_rect(&self) -> Rect<f32, UnknownUnit>[src]

pub fn h_grow_direction(&self) -> GrowDirection[src]

pub fn h_size_flags(&self) -> i64[src]

pub fn get_icon(
    &self,
    name: impl Into<GodotString>,
    _type: impl Into<GodotString>
) -> Option<Ref<Texture, Shared>>
[src]

pub fn margin(&self, margin: i64) -> f64[src]

pub fn get_minimum_size(&self) -> Vector2D<f32, UnknownUnit>[src]

pub fn mouse_filter(&self) -> MouseFilter[src]

pub fn get_parent_area_size(&self) -> Vector2D<f32, UnknownUnit>[src]

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

pub fn pivot_offset(&self) -> Vector2D<f32, UnknownUnit>[src]

pub fn position(&self) -> Vector2D<f32, UnknownUnit>[src]

pub fn get_rect(&self) -> Rect<f32, UnknownUnit>[src]

pub fn get_rotation(&self) -> f64[src]

pub fn rotation_degrees(&self) -> f64[src]

pub fn scale(&self) -> Vector2D<f32, UnknownUnit>[src]

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

pub fn stretch_ratio(&self) -> f64[src]

pub fn get_stylebox(
    &self,
    name: impl Into<GodotString>,
    _type: impl Into<GodotString>
) -> Option<Ref<StyleBox, Shared>>
[src]

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

pub fn get_tooltip(
    &self,
    at_position: Vector2D<f32, UnknownUnit>
) -> GodotString
[src]

pub fn v_grow_direction(&self) -> GrowDirection[src]

pub fn v_size_flags(&self) -> i64[src]

pub fn grab_click_focus(&self)[src]

pub fn grab_focus(&self)[src]

pub fn has_color(
    &self,
    name: impl Into<GodotString>,
    _type: impl Into<GodotString>
) -> bool
[src]

pub fn has_color_override(&self, name: impl Into<GodotString>) -> bool[src]

pub fn has_constant(
    &self,
    name: impl Into<GodotString>,
    _type: impl Into<GodotString>
) -> bool
[src]

pub fn has_constant_override(&self, name: impl Into<GodotString>) -> bool[src]

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

pub fn has_font(
    &self,
    name: impl Into<GodotString>,
    _type: impl Into<GodotString>
) -> bool
[src]

pub fn has_font_override(&self, name: impl Into<GodotString>) -> bool[src]

pub fn has_icon(
    &self,
    name: impl Into<GodotString>,
    _type: impl Into<GodotString>
) -> bool
[src]

pub fn has_icon_override(&self, name: impl Into<GodotString>) -> bool[src]

pub fn has_shader_override(&self, name: impl Into<GodotString>) -> bool[src]

pub fn has_stylebox(
    &self,
    name: impl Into<GodotString>,
    _type: impl Into<GodotString>
) -> bool
[src]

pub fn has_stylebox_override(&self, name: impl Into<GodotString>) -> bool[src]

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

pub fn minimum_size_changed(&self)[src]

pub fn release_focus(&self)[src]

pub fn set_anchor(
    &self,
    margin: i64,
    anchor: f64,
    keep_margin: bool,
    push_opposite_anchor: bool
)
[src]

pub fn set_anchor_and_margin(
    &self,
    margin: i64,
    anchor: f64,
    offset: f64,
    push_opposite_anchor: bool
)
[src]

pub fn set_anchors_and_margins_preset(
    &self,
    preset: i64,
    resize_mode: i64,
    margin: i64
)
[src]

pub fn set_anchors_preset(&self, preset: i64, keep_margins: bool)[src]

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

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

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

pub fn set_default_cursor_shape(&self, shape: i64)[src]

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

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

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

pub fn set_focus_mode(&self, mode: i64)[src]

pub fn set_focus_neighbour(&self, margin: i64, neighbour: impl Into<NodePath>)[src]

pub fn set_focus_next(&self, next: impl Into<NodePath>)[src]

pub fn set_focus_previous(&self, previous: impl Into<NodePath>)[src]

pub fn set_global_position(
    &self,
    position: Vector2D<f32, UnknownUnit>,
    keep_margins: bool
)
[src]

pub fn set_h_grow_direction(&self, direction: i64)[src]

pub fn set_h_size_flags(&self, flags: i64)[src]

pub fn set_margin(&self, margin: i64, offset: f64)[src]

pub fn set_margins_preset(&self, preset: i64, resize_mode: i64, margin: i64)[src]

pub fn set_mouse_filter(&self, filter: i64)[src]

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

pub fn set_position(
    &self,
    position: Vector2D<f32, UnknownUnit>,
    keep_margins: bool
)
[src]

pub fn set_rotation(&self, radians: f64)[src]

pub fn set_rotation_degrees(&self, degrees: f64)[src]

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

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

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

pub fn set_theme(&self, theme: impl AsArg<Theme>)[src]

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

pub fn set_v_grow_direction(&self, direction: i64)[src]

pub fn set_v_size_flags(&self, flags: i64)[src]

pub fn show_modal(&self, exclusive: bool)[src]

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

Trait Implementations

impl Debug for Container[src]

impl Deref for Container[src]

type Target = Control

The resulting type after dereferencing.

impl DerefMut for Container[src]

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

impl QueueFree for Container[src]

impl SubClass<CanvasItem> for Container[src]

impl SubClass<Container> for EditorProperty[src]

impl SubClass<Container> for ColorPicker[src]

impl SubClass<Container> for ScriptEditor[src]

impl SubClass<Container> for CenterContainer[src]

impl SubClass<Container> for VBoxContainer[src]

impl SubClass<Container> for ViewportContainer[src]

impl SubClass<Container> for FileSystemDock[src]

impl SubClass<Container> for EditorInspector[src]

impl SubClass<Container> for HBoxContainer[src]

impl SubClass<Container> for PanelContainer[src]

impl SubClass<Container> for HSplitContainer[src]

impl SubClass<Container> for TabContainer[src]

impl SubClass<Container> for GridContainer[src]

impl SubClass<Container> for MarginContainer[src]

impl SubClass<Container> for BoxContainer[src]

impl SubClass<Container> for ScrollContainer[src]

impl SubClass<Container> for VSplitContainer[src]

impl SubClass<Container> for SplitContainer[src]

impl SubClass<Container> for GraphNode[src]

impl SubClass<Control> for Container[src]

impl SubClass<Node> for Container[src]

impl SubClass<Object> for Container[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.