Struct gdnative::Button
[−]
[src]
pub struct Button { /* fields omitted */ }
core class Button : BaseButton
(manually managed)
Base class
Button inherits BaseButton and all of its methods.
Memory management
Non reference counted objects such as the ones of this type are usually owned by the engine.
In the cases where Rust code owns an object of this type, ownership should be either passed
to the engine or the object must be manually destroyed using Button::free
.
Methods
impl Button
[src]
[src]
Up-cast.
pub fn new() -> Self
[src]
Constructor.
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 Button::free
.
pub unsafe fn free(self)
[src]
Manually deallocate the object.
pub fn set_text(&mut self, text: GodotString)
[src]
pub fn get_text(&self) -> GodotString
[src]
[src]
[src]
pub fn set_flat(&mut self, enabled: bool)
[src]
pub fn set_clip_text(&mut self, enabled: bool)
[src]
pub fn get_clip_text(&self) -> bool
[src]
pub fn set_text_align(&mut self, align: i64)
[src]
pub fn is_flat(&self) -> bool
[src]
pub fn cast<T: GodotObject>(&self) -> Option<T>
[src]
Methods from Deref<Target = BaseButton>
pub fn as_control(&self) -> Control
[src]
Up-cast.
pub fn _pressed(&mut self)
[src]
pub fn _toggled(&mut self, button_pressed: bool)
[src]
pub fn _gui_input(&mut self, arg0: Option<InputEvent>)
[src]
pub fn _unhandled_input(&mut self, arg0: Option<InputEvent>)
[src]
pub fn set_pressed(&mut self, pressed: bool)
[src]
pub fn is_pressed(&self) -> bool
[src]
pub fn is_hovered(&self) -> bool
[src]
pub fn set_toggle_mode(&mut self, enabled: bool)
[src]
pub fn is_toggle_mode(&self) -> bool
[src]
pub fn set_disabled(&mut self, disabled: bool)
[src]
pub fn is_disabled(&self) -> bool
[src]
pub fn set_action_mode(&mut self, mode: i64)
[src]
pub fn set_enabled_focus_mode(&mut self, mode: i64)
[src]
pub fn set_shortcut(&mut self, shortcut: Option<ShortCut>)
[src]
pub fn get_shortcut(&self) -> Option<ShortCut>
[src]
[src]
[src]
pub fn cast<T: GodotObject>(&self) -> Option<T>
[src]
Trait Implementations
impl GodotObject for Button
[src]
fn class_name() -> &'static str
[src]
unsafe fn from_sys(obj: *mut godot_object) -> Self
[src]
unsafe fn to_sys(&self) -> *mut godot_object
[src]
impl Deref for Button
[src]
type Target = BaseButton
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.