[−][src]Struct gdnative::api::BaseButton
core class BaseButton
inherits Control
(unsafe).
Official documentation
See the documentation of this class in the Godot engine's official documentation.
Class hierarchy
BaseButton 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 BaseButton
[src]
Constants
pub const ACTION_MODE_BUTTON_PRESS: i64
[src]
pub const ACTION_MODE_BUTTON_RELEASE: i64
[src]
pub const DRAW_DISABLED: i64
[src]
pub const DRAW_HOVER: i64
[src]
pub const DRAW_HOVER_PRESSED: i64
[src]
pub const DRAW_NORMAL: i64
[src]
pub const DRAW_PRESSED: i64
[src]
impl BaseButton
[src]
pub fn action_mode(&self) -> ActionMode
[src]
pub fn button_group(&self) -> Option<Ref<ButtonGroup, Shared>>
[src]
pub fn button_mask(&self) -> i64
[src]
pub fn get_draw_mode(&self) -> DrawMode
[src]
pub fn enabled_focus_mode(&self) -> FocusMode
[src]
pub fn shortcut(&self) -> Option<Ref<ShortCut, Shared>>
[src]
pub fn is_disabled(&self) -> bool
[src]
pub fn is_hovered(&self) -> bool
[src]
pub fn is_keep_pressed_outside(&self) -> bool
[src]
pub fn is_pressed(&self) -> bool
[src]
pub fn is_shortcut_in_tooltip_enabled(&self) -> bool
[src]
pub fn is_toggle_mode(&self) -> bool
[src]
pub fn set_action_mode(&self, mode: i64)
[src]
pub fn set_button_group(&self, button_group: impl AsArg<ButtonGroup>)
[src]
pub fn set_button_mask(&self, mask: i64)
[src]
pub fn set_disabled(&self, disabled: bool)
[src]
pub fn set_enabled_focus_mode(&self, mode: i64)
[src]
pub fn set_keep_pressed_outside(&self, enabled: bool)
[src]
pub fn set_pressed(&self, pressed: bool)
[src]
pub fn set_shortcut(&self, shortcut: impl AsArg<ShortCut>)
[src]
pub fn set_shortcut_in_tooltip(&self, enabled: bool)
[src]
pub fn set_toggle_mode(&self, enabled: bool)
[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]
&self,
name: impl Into<GodotString>,
font: impl AsArg<Font>
)
pub fn add_icon_override(
&self,
name: impl Into<GodotString>,
texture: impl AsArg<Texture>
)
[src]
&self,
name: impl Into<GodotString>,
texture: impl AsArg<Texture>
)
pub fn add_shader_override(
&self,
name: impl Into<GodotString>,
shader: impl AsArg<Shader>
)
[src]
&self,
name: impl Into<GodotString>,
shader: impl AsArg<Shader>
)
pub fn add_stylebox_override(
&self,
name: impl Into<GodotString>,
stylebox: impl AsArg<StyleBox>
)
[src]
&self,
name: impl Into<GodotString>,
stylebox: impl AsArg<StyleBox>
)
pub fn force_drag(
&self,
data: impl OwnedToVariant,
preview: impl AsArg<Control>
)
[src]
&self,
data: impl OwnedToVariant,
preview: impl AsArg<Control>
)
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]
&self,
name: impl Into<GodotString>,
_type: impl Into<GodotString>
) -> Color
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]
&self,
name: impl Into<GodotString>,
_type: impl Into<GodotString>
) -> i64
pub fn get_cursor_shape(
&self,
position: Vector2D<f32, UnknownUnit>
) -> CursorShape
[src]
&self,
position: Vector2D<f32, UnknownUnit>
) -> CursorShape
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]
&self,
name: impl Into<GodotString>,
_type: impl Into<GodotString>
) -> Option<Ref<Font, Shared>>
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]
&self,
name: impl Into<GodotString>,
_type: impl Into<GodotString>
) -> Option<Ref<Texture, Shared>>
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]
&self,
name: impl Into<GodotString>,
_type: impl Into<GodotString>
) -> Option<Ref<StyleBox, Shared>>
pub fn theme(&self) -> Option<Ref<Theme, Shared>>
[src]
pub fn get_tooltip(
&self,
at_position: Vector2D<f32, UnknownUnit>
) -> GodotString
[src]
&self,
at_position: Vector2D<f32, UnknownUnit>
) -> GodotString
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]
&self,
name: impl Into<GodotString>,
_type: impl Into<GodotString>
) -> bool
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]
&self,
name: impl Into<GodotString>,
_type: impl Into<GodotString>
) -> bool
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]
&self,
name: impl Into<GodotString>,
_type: impl Into<GodotString>
) -> bool
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]
&self,
name: impl Into<GodotString>,
_type: impl Into<GodotString>
) -> bool
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]
&self,
name: impl Into<GodotString>,
_type: impl Into<GodotString>
) -> bool
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]
&self,
margin: i64,
anchor: f64,
keep_margin: bool,
push_opposite_anchor: bool
)
pub fn set_anchor_and_margin(
&self,
margin: i64,
anchor: f64,
offset: f64,
push_opposite_anchor: bool
)
[src]
&self,
margin: i64,
anchor: f64,
offset: f64,
push_opposite_anchor: bool
)
pub fn set_anchors_and_margins_preset(
&self,
preset: i64,
resize_mode: i64,
margin: i64
)
[src]
&self,
preset: i64,
resize_mode: i64,
margin: i64
)
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]
&self,
position: Vector2D<f32, UnknownUnit>,
keep_margins: bool
)
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]
&self,
position: Vector2D<f32, UnknownUnit>,
keep_margins: bool
)
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 BaseButton
[src]
impl Deref for BaseButton
[src]
impl DerefMut for BaseButton
[src]
impl GodotObject for BaseButton
[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 BaseButton
[src]
unsafe fn godot_queue_free(obj: *mut c_void)
[src]
impl SubClass<BaseButton> for CheckButton
[src]
impl SubClass<BaseButton> for CheckBox
[src]
impl SubClass<BaseButton> for TextureButton
[src]
impl SubClass<BaseButton> for ColorPickerButton
[src]
impl SubClass<BaseButton> for LinkButton
[src]
impl SubClass<BaseButton> for MenuButton
[src]
impl SubClass<BaseButton> for OptionButton
[src]
impl SubClass<BaseButton> for ToolButton
[src]
impl SubClass<BaseButton> for Button
[src]
impl SubClass<CanvasItem> for BaseButton
[src]
impl SubClass<Control> for BaseButton
[src]
impl SubClass<Node> for BaseButton
[src]
impl SubClass<Object> for BaseButton
[src]
Auto Trait Implementations
impl RefUnwindSafe for BaseButton
impl !Send for BaseButton
impl !Sync for BaseButton
impl Unpin for BaseButton
impl UnwindSafe for BaseButton
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>,