Skip to main content

LineEdit

Struct LineEdit 

pub struct LineEdit { /* private fields */ }
Expand description

Godot class LineEdit.

Inherits Control.

Related symbols:

See also Godot docs for LineEdit.

ยงConstruction

This class is manually managed. You can create a new instance using LineEdit::new_alloc().

Do not forget to call free() or hand over ownership to Godot.

Implementationsยง

ยง

impl LineEdit

pub fn has_ime_text(&self) -> bool

pub fn cancel_ime(&mut self)

pub fn apply_ime(&mut self)

pub fn set_horizontal_alignment(&mut self, alignment: HorizontalAlignment)

pub fn get_horizontal_alignment(&self) -> HorizontalAlignment

pub fn edit(&mut self)

To set the default parameters, use Self::edit_ex and its builder methods. See the book for detailed usage instructions.

pub fn edit_ex<'ex>(&'ex mut self) -> ExEdit<'ex>

pub fn unedit(&mut self)

pub fn is_editing(&self) -> bool

pub fn set_keep_editing_on_text_submit(&mut self, enable: bool)

pub fn is_editing_kept_on_text_submit(&self) -> bool

pub fn clear(&mut self)

pub fn select(&mut self)

To set the default parameters, use Self::select_ex and its builder methods. See the book for detailed usage instructions.

pub fn select_ex<'ex>(&'ex mut self) -> ExSelect<'ex>

pub fn select_all(&mut self)

pub fn deselect(&mut self)

pub fn has_undo(&self) -> bool

pub fn has_redo(&self) -> bool

pub fn has_selection(&self) -> bool

pub fn get_selected_text(&self) -> GString

pub fn get_selection_from_column(&self) -> i32

pub fn get_selection_to_column(&self) -> i32

pub fn set_text(&mut self, text: impl AsArg<GString>)

pub fn get_text(&self) -> GString

pub fn get_draw_control_chars(&self) -> bool

pub fn set_draw_control_chars(&mut self, enable: bool)

pub fn set_text_direction(&mut self, direction: TextDirection)

pub fn get_text_direction(&self) -> TextDirection

pub fn set_language(&mut self, language: impl AsArg<GString>)

pub fn get_language(&self) -> GString

pub fn set_structured_text_bidi_override( &mut self, parser: StructuredTextParser, )

pub fn get_structured_text_bidi_override(&self) -> StructuredTextParser

pub fn set_structured_text_bidi_override_options(&mut self, args: &AnyArray)

pub fn get_structured_text_bidi_override_options(&self) -> Array<Variant>

pub fn set_placeholder(&mut self, text: impl AsArg<GString>)

pub fn get_placeholder(&self) -> GString

pub fn set_caret_column(&mut self, position: i32)

pub fn get_caret_column(&self) -> i32

pub fn get_next_composite_character_column(&self, column: i32) -> i32

pub fn get_previous_composite_character_column(&self, column: i32) -> i32

pub fn get_scroll_offset(&self) -> f32

pub fn set_expand_to_text_length_enabled(&mut self, enabled: bool)

pub fn is_expand_to_text_length_enabled(&self) -> bool

pub fn set_caret_mid_grapheme_enabled(&mut self, enabled: bool)

pub fn is_caret_mid_grapheme_enabled(&self) -> bool

pub fn set_caret_force_displayed(&mut self, enabled: bool)

pub fn is_caret_force_displayed(&self) -> bool

pub fn set_max_length(&mut self, chars: i32)

pub fn get_max_length(&self) -> i32

pub fn insert_text_at_caret(&mut self, text: impl AsArg<GString>)

pub fn delete_char_at_caret(&mut self)

pub fn delete_text(&mut self, from_column: i32, to_column: i32)

pub fn set_editable(&mut self, enabled: bool)

pub fn is_editable(&self) -> bool

pub fn set_secret(&mut self, enabled: bool)

pub fn is_secret(&self) -> bool

pub fn set_secret_character(&mut self, character: impl AsArg<GString>)

pub fn get_secret_character(&self) -> GString

pub fn menu_option(&mut self, option: i32)

pub fn get_menu(&self) -> Option<Gd<PopupMenu>>

pub fn is_menu_visible(&self) -> bool

pub fn set_context_menu_enabled(&mut self, enable: bool)

pub fn is_context_menu_enabled(&self) -> bool

pub fn set_emoji_menu_enabled(&mut self, enable: bool)

pub fn is_emoji_menu_enabled(&self) -> bool

pub fn set_backspace_deletes_composite_character_enabled( &mut self, enable: bool, )

pub fn is_backspace_deletes_composite_character_enabled(&self) -> bool

pub fn set_virtual_keyboard_enabled(&mut self, enable: bool)

pub fn is_virtual_keyboard_enabled(&self) -> bool

pub fn set_virtual_keyboard_show_on_focus(&mut self, show_on_focus: bool)

pub fn get_virtual_keyboard_show_on_focus(&self) -> bool

pub fn set_virtual_keyboard_type(&mut self, type_: VirtualKeyboardType)

pub fn get_virtual_keyboard_type(&self) -> VirtualKeyboardType

pub fn set_clear_button_enabled(&mut self, enable: bool)

pub fn is_clear_button_enabled(&self) -> bool

pub fn set_shortcut_keys_enabled(&mut self, enable: bool)

pub fn is_shortcut_keys_enabled(&self) -> bool

pub fn set_middle_mouse_paste_enabled(&mut self, enable: bool)

pub fn is_middle_mouse_paste_enabled(&self) -> bool

pub fn set_selecting_enabled(&mut self, enable: bool)

pub fn is_selecting_enabled(&self) -> bool

pub fn set_deselect_on_focus_loss_enabled(&mut self, enable: bool)

pub fn is_deselect_on_focus_loss_enabled(&self) -> bool

pub fn set_drag_and_drop_selection_enabled(&mut self, enable: bool)

pub fn is_drag_and_drop_selection_enabled(&self) -> bool

pub fn set_right_icon(&mut self, icon: impl AsArg<Option<Gd<Texture2D>>>)

pub fn get_right_icon(&self) -> Option<Gd<Texture2D>>

pub fn set_icon_expand_mode(&mut self, mode: ExpandMode)

pub fn get_icon_expand_mode(&self) -> ExpandMode

pub fn set_right_icon_scale(&mut self, scale: f32)

pub fn get_right_icon_scale(&self) -> f32

pub fn set_flat(&mut self, enabled: bool)

pub fn is_flat(&self) -> bool

pub fn set_select_all_on_focus(&mut self, enabled: bool)

pub fn is_select_all_on_focus(&self) -> bool

Methods from Deref<Target = Control>ยง

pub fn accept_event(&mut self)

pub fn get_minimum_size(&self) -> Vector2

pub fn get_combined_minimum_size(&self) -> Vector2

pub fn set_anchors_preset(&mut self, preset: LayoutPreset)

To set the default parameters, use Self::set_anchors_preset_ex and its builder methods. See the book for detailed usage instructions.

pub fn set_anchors_preset_ex<'ex>( &'ex mut self, preset: LayoutPreset, ) -> ExSetAnchorsPreset<'ex>

pub fn set_offsets_preset(&mut self, preset: LayoutPreset)

To set the default parameters, use Self::set_offsets_preset_ex and its builder methods. See the book for detailed usage instructions.

pub fn set_offsets_preset_ex<'ex>( &'ex mut self, preset: LayoutPreset, ) -> ExSetOffsetsPreset<'ex>

pub fn set_anchors_and_offsets_preset(&mut self, preset: LayoutPreset)

To set the default parameters, use Self::set_anchors_and_offsets_preset_ex and its builder methods. See the book for detailed usage instructions.

pub fn set_anchors_and_offsets_preset_ex<'ex>( &'ex mut self, preset: LayoutPreset, ) -> ExSetAnchorsAndOffsetsPreset<'ex>

pub fn set_anchor(&mut self, side: Side, anchor: f32)

To set the default parameters, use Self::set_anchor_ex and its builder methods. See the book for detailed usage instructions.

pub fn set_anchor_ex<'ex>( &'ex mut self, side: Side, anchor: f32, ) -> ExSetAnchor<'ex>

pub fn get_anchor(&self, side: Side) -> f32

pub fn set_offset(&mut self, side: Side, offset: f32)

pub fn get_offset(&self, offset: Side) -> f32

pub fn set_anchor_and_offset(&mut self, side: Side, anchor: f32, offset: f32)

To set the default parameters, use Self::set_anchor_and_offset_ex and its builder methods. See the book for detailed usage instructions.

pub fn set_anchor_and_offset_ex<'ex>( &'ex mut self, side: Side, anchor: f32, offset: f32, ) -> ExSetAnchorAndOffset<'ex>

pub fn set_begin(&mut self, position: Vector2)

pub fn set_end(&mut self, position: Vector2)

pub fn set_position(&mut self, position: Vector2)

To set the default parameters, use Self::set_position_ex and its builder methods. See the book for detailed usage instructions.

pub fn set_position_ex<'ex>( &'ex mut self, position: Vector2, ) -> ExSetPosition<'ex>

pub fn set_size(&mut self, size: Vector2)

To set the default parameters, use Self::set_size_ex and its builder methods. See the book for detailed usage instructions.

pub fn set_size_ex<'ex>(&'ex mut self, size: Vector2) -> ExSetSize<'ex>

pub fn reset_size(&mut self)

pub fn set_custom_minimum_size(&mut self, size: Vector2)

pub fn set_global_position(&mut self, position: Vector2)

To set the default parameters, use Self::set_global_position_ex and its builder methods. See the book for detailed usage instructions.

pub fn set_global_position_ex<'ex>( &'ex mut self, position: Vector2, ) -> ExSetGlobalPosition<'ex>

pub fn set_rotation(&mut self, radians: f32)

pub fn set_rotation_degrees(&mut self, degrees: f32)

pub fn set_scale(&mut self, scale: Vector2)

pub fn set_pivot_offset(&mut self, pivot_offset: Vector2)

pub fn set_pivot_offset_ratio(&mut self, ratio: Vector2)

pub fn get_begin(&self) -> Vector2

pub fn get_end(&self) -> Vector2

pub fn get_position(&self) -> Vector2

pub fn get_size(&self) -> Vector2

pub fn get_rotation(&self) -> f32

pub fn get_rotation_degrees(&self) -> f32

pub fn get_scale(&self) -> Vector2

pub fn get_pivot_offset(&self) -> Vector2

pub fn get_pivot_offset_ratio(&self) -> Vector2

pub fn get_combined_pivot_offset(&self) -> Vector2

pub fn get_custom_minimum_size(&self) -> Vector2

pub fn get_parent_area_size(&self) -> Vector2

pub fn get_global_position(&self) -> Vector2

pub fn get_screen_position(&self) -> Vector2

pub fn get_rect(&self) -> Rect2

pub fn get_global_rect(&self) -> Rect2

pub fn set_focus_mode(&mut self, mode: FocusMode)

pub fn get_focus_mode(&self) -> FocusMode

pub fn get_focus_mode_with_override(&self) -> FocusMode

pub fn set_focus_behavior_recursive( &mut self, focus_behavior_recursive: FocusBehaviorRecursive, )

pub fn get_focus_behavior_recursive(&self) -> FocusBehaviorRecursive

pub fn has_focus(&self) -> bool

To set the default parameters, use Self::has_focus_ex and its builder methods. See the book for detailed usage instructions.

pub fn has_focus_ex<'ex>(&'ex self) -> ExHasFocus<'ex>

pub fn grab_focus(&mut self)

To set the default parameters, use Self::grab_focus_ex and its builder methods. See the book for detailed usage instructions.

pub fn grab_focus_ex<'ex>(&'ex mut self) -> ExGrabFocus<'ex>

pub fn release_focus(&mut self)

pub fn find_prev_valid_focus(&self) -> Option<Gd<Control>>

pub fn find_next_valid_focus(&self) -> Option<Gd<Control>>

pub fn find_valid_focus_neighbor(&self, side: Side) -> Option<Gd<Control>>

pub fn set_h_size_flags(&mut self, flags: SizeFlags)

pub fn get_h_size_flags(&self) -> SizeFlags

pub fn set_stretch_ratio(&mut self, ratio: f32)

pub fn get_stretch_ratio(&self) -> f32

pub fn set_v_size_flags(&mut self, flags: SizeFlags)

pub fn get_v_size_flags(&self) -> SizeFlags

pub fn set_theme(&mut self, theme: impl AsArg<Option<Gd<Theme>>>)

pub fn get_theme(&self) -> Option<Gd<Theme>>

pub fn set_theme_type_variation(&mut self, theme_type: impl AsArg<StringName>)

pub fn get_theme_type_variation(&self) -> StringName

pub fn begin_bulk_theme_override(&mut self)

pub fn end_bulk_theme_override(&mut self)

pub fn add_theme_icon_override( &mut self, name: impl AsArg<StringName>, texture: impl AsArg<Gd<Texture2D>>, )

pub fn add_theme_stylebox_override( &mut self, name: impl AsArg<StringName>, stylebox: impl AsArg<Gd<StyleBox>>, )

pub fn add_theme_font_override( &mut self, name: impl AsArg<StringName>, font: impl AsArg<Gd<Font>>, )

pub fn add_theme_font_size_override( &mut self, name: impl AsArg<StringName>, font_size: i32, )

pub fn add_theme_color_override( &mut self, name: impl AsArg<StringName>, color: Color, )

pub fn add_theme_constant_override( &mut self, name: impl AsArg<StringName>, constant: i32, )

pub fn remove_theme_icon_override(&mut self, name: impl AsArg<StringName>)

pub fn remove_theme_stylebox_override(&mut self, name: impl AsArg<StringName>)

pub fn remove_theme_font_override(&mut self, name: impl AsArg<StringName>)

pub fn remove_theme_font_size_override(&mut self, name: impl AsArg<StringName>)

pub fn remove_theme_color_override(&mut self, name: impl AsArg<StringName>)

pub fn remove_theme_constant_override(&mut self, name: impl AsArg<StringName>)

pub fn get_theme_icon( &self, name: impl AsArg<StringName>, ) -> Option<Gd<Texture2D>>

To set the default parameters, use Self::get_theme_icon_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_theme_icon_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExGetThemeIcon<'ex>

pub fn get_theme_stylebox( &self, name: impl AsArg<StringName>, ) -> Option<Gd<StyleBox>>

To set the default parameters, use Self::get_theme_stylebox_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_theme_stylebox_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExGetThemeStylebox<'ex>

pub fn get_theme_font(&self, name: impl AsArg<StringName>) -> Option<Gd<Font>>

To set the default parameters, use Self::get_theme_font_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_theme_font_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExGetThemeFont<'ex>

pub fn get_theme_font_size(&self, name: impl AsArg<StringName>) -> i32

To set the default parameters, use Self::get_theme_font_size_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_theme_font_size_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExGetThemeFontSize<'ex>

pub fn get_theme_color(&self, name: impl AsArg<StringName>) -> Color

To set the default parameters, use Self::get_theme_color_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_theme_color_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExGetThemeColor<'ex>

pub fn get_theme_constant(&self, name: impl AsArg<StringName>) -> i32

To set the default parameters, use Self::get_theme_constant_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_theme_constant_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExGetThemeConstant<'ex>

pub fn has_theme_icon_override(&self, name: impl AsArg<StringName>) -> bool

pub fn has_theme_stylebox_override(&self, name: impl AsArg<StringName>) -> bool

pub fn has_theme_font_override(&self, name: impl AsArg<StringName>) -> bool

pub fn has_theme_font_size_override(&self, name: impl AsArg<StringName>) -> bool

pub fn has_theme_color_override(&self, name: impl AsArg<StringName>) -> bool

pub fn has_theme_constant_override(&self, name: impl AsArg<StringName>) -> bool

pub fn has_theme_icon(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_icon_ex and its builder methods. See the book for detailed usage instructions.

pub fn has_theme_icon_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExHasThemeIcon<'ex>

pub fn has_theme_stylebox(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_stylebox_ex and its builder methods. See the book for detailed usage instructions.

pub fn has_theme_stylebox_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExHasThemeStylebox<'ex>

pub fn has_theme_font(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_font_ex and its builder methods. See the book for detailed usage instructions.

pub fn has_theme_font_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExHasThemeFont<'ex>

pub fn has_theme_font_size(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_font_size_ex and its builder methods. See the book for detailed usage instructions.

pub fn has_theme_font_size_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExHasThemeFontSize<'ex>

pub fn has_theme_color(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_color_ex and its builder methods. See the book for detailed usage instructions.

pub fn has_theme_color_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExHasThemeColor<'ex>

pub fn has_theme_constant(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_constant_ex and its builder methods. See the book for detailed usage instructions.

pub fn has_theme_constant_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExHasThemeConstant<'ex>

pub fn get_theme_default_base_scale(&self) -> f32

pub fn get_theme_default_font(&self) -> Option<Gd<Font>>

pub fn get_theme_default_font_size(&self) -> i32

pub fn get_parent_control(&self) -> Option<Gd<Control>>

pub fn set_h_grow_direction(&mut self, direction: GrowDirection)

pub fn get_h_grow_direction(&self) -> GrowDirection

pub fn set_v_grow_direction(&mut self, direction: GrowDirection)

pub fn get_v_grow_direction(&self) -> GrowDirection

pub fn set_tooltip_auto_translate_mode(&mut self, mode: AutoTranslateMode)

pub fn get_tooltip_auto_translate_mode(&self) -> AutoTranslateMode

pub fn set_tooltip_text(&mut self, hint: impl AsArg<GString>)

pub fn get_tooltip_text(&self) -> GString

pub fn get_tooltip(&self) -> GString

To set the default parameters, use Self::get_tooltip_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_tooltip_ex<'ex>(&'ex self) -> ExGetTooltip<'ex>

pub fn set_default_cursor_shape(&mut self, shape: CursorShape)

pub fn get_default_cursor_shape(&self) -> CursorShape

pub fn get_cursor_shape(&self) -> CursorShape

To set the default parameters, use Self::get_cursor_shape_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_cursor_shape_ex<'ex>(&'ex self) -> ExGetCursorShape<'ex>

pub fn set_focus_neighbor(&mut self, side: Side, neighbor: impl AsArg<NodePath>)

pub fn get_focus_neighbor(&self, side: Side) -> NodePath

pub fn set_focus_next(&mut self, next: impl AsArg<NodePath>)

pub fn get_focus_next(&self) -> NodePath

pub fn set_focus_previous(&mut self, previous: impl AsArg<NodePath>)

pub fn get_focus_previous(&self) -> NodePath

pub fn force_drag( &mut self, data: &Variant, preview: impl AsArg<Option<Gd<Control>>>, )

pub fn accessibility_drag(&mut self)

pub fn accessibility_drop(&mut self)

pub fn set_accessibility_name(&mut self, name: impl AsArg<GString>)

pub fn get_accessibility_name(&self) -> GString

pub fn set_accessibility_description( &mut self, description: impl AsArg<GString>, )

pub fn get_accessibility_description(&self) -> GString

pub fn set_accessibility_live(&mut self, mode: AccessibilityLiveMode)

pub fn get_accessibility_live(&self) -> AccessibilityLiveMode

pub fn set_accessibility_controls_nodes(&mut self, node_path: &Array<NodePath>)

pub fn get_accessibility_controls_nodes(&self) -> Array<NodePath>

pub fn set_accessibility_described_by_nodes( &mut self, node_path: &Array<NodePath>, )

pub fn get_accessibility_described_by_nodes(&self) -> Array<NodePath>

pub fn set_accessibility_labeled_by_nodes( &mut self, node_path: &Array<NodePath>, )

pub fn get_accessibility_labeled_by_nodes(&self) -> Array<NodePath>

pub fn set_accessibility_flow_to_nodes(&mut self, node_path: &Array<NodePath>)

pub fn get_accessibility_flow_to_nodes(&self) -> Array<NodePath>

pub fn set_mouse_filter(&mut self, filter: MouseFilter)

pub fn get_mouse_filter(&self) -> MouseFilter

pub fn get_mouse_filter_with_override(&self) -> MouseFilter

pub fn set_mouse_behavior_recursive( &mut self, mouse_behavior_recursive: MouseBehaviorRecursive, )

pub fn get_mouse_behavior_recursive(&self) -> MouseBehaviorRecursive

pub fn set_force_pass_scroll_events(&mut self, force_pass_scroll_events: bool)

pub fn is_force_pass_scroll_events(&self) -> bool

pub fn set_clip_contents(&mut self, enable: bool)

pub fn is_clipping_contents(&self) -> bool

pub fn grab_click_focus(&mut self)

pub fn set_drag_forwarding( &mut self, drag_func: &Callable, can_drop_func: &Callable, drop_func: &Callable, )

pub fn set_drag_preview(&mut self, control: impl AsArg<Option<Gd<Control>>>)

pub fn is_drag_successful(&self) -> bool

pub fn warp_mouse(&mut self, position: Vector2)

pub fn set_shortcut_context(&mut self, node: impl AsArg<Option<Gd<Node>>>)

pub fn get_shortcut_context(&self) -> Option<Gd<Node>>

pub fn update_minimum_size(&mut self)

pub fn set_layout_direction(&mut self, direction: LayoutDirection)

pub fn get_layout_direction(&self) -> LayoutDirection

pub fn is_layout_rtl(&self) -> bool

pub fn set_auto_translate(&mut self, enable: bool)

pub fn is_auto_translating(&self) -> bool

pub fn set_localize_numeral_system(&mut self, enable: bool)

pub fn is_localizing_numeral_system(&self) -> bool

pub fn notify(&mut self, what: ControlNotification)

โš ๏ธ Sends a Godot notification to all classes inherited by the object.

Triggers calls to on_notification(), and depending on the notification, also to Godotโ€™s lifecycle callbacks such as ready().

Starts from the highest ancestor (the Object class) and goes down the hierarchy. See also Godot docs for Object::notification().

ยงPanics

If you call this method on a user-defined object while holding a GdRef or GdMut guard on the instance, you will encounter a panic. The reason is that the receiving virtual method on_notification() acquires a GdMut lock dynamically, which must be exclusive.

pub fn notify_reversed(&mut self, what: ControlNotification)

โš ๏ธ Like Self::notify(), but starts at the most-derived class and goes up the hierarchy.

See docs of that method, including the panics.

Methods from Deref<Target = CanvasItem>ยง

pub fn get_canvas_item(&self) -> Rid

pub fn set_visible(&mut self, visible: bool)

pub fn is_visible(&self) -> bool

pub fn is_visible_in_tree(&self) -> bool

pub fn show(&mut self)

pub fn hide(&mut self)

pub fn queue_redraw(&mut self)

pub fn move_to_front(&mut self)

pub fn set_as_top_level(&mut self, enable: bool)

pub fn is_set_as_top_level(&self) -> bool

pub fn set_light_mask(&mut self, light_mask: i32)

pub fn get_light_mask(&self) -> i32

pub fn set_modulate(&mut self, modulate: Color)

pub fn get_modulate(&self) -> Color

pub fn set_self_modulate(&mut self, self_modulate: Color)

pub fn get_self_modulate(&self) -> Color

pub fn set_z_index(&mut self, z_index: i32)

pub fn get_z_index(&self) -> i32

pub fn set_z_as_relative(&mut self, enable: bool)

pub fn is_z_relative(&self) -> bool

pub fn set_y_sort_enabled(&mut self, enabled: bool)

pub fn is_y_sort_enabled(&self) -> bool

pub fn set_draw_behind_parent(&mut self, enable: bool)

pub fn is_draw_behind_parent_enabled(&self) -> bool

pub fn draw_line(&mut self, from: Vector2, to: Vector2, color: Color)

To set the default parameters, use Self::draw_line_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_line_ex<'ex>( &'ex mut self, from: Vector2, to: Vector2, color: Color, ) -> ExDrawLine<'ex>

pub fn draw_dashed_line(&mut self, from: Vector2, to: Vector2, color: Color)

To set the default parameters, use Self::draw_dashed_line_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_dashed_line_ex<'ex>( &'ex mut self, from: Vector2, to: Vector2, color: Color, ) -> ExDrawDashedLine<'ex>

pub fn draw_polyline(&mut self, points: &PackedArray<Vector2>, color: Color)

To set the default parameters, use Self::draw_polyline_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_polyline_ex<'ex>( &'ex mut self, points: &'ex PackedArray<Vector2>, color: Color, ) -> ExDrawPolyline<'ex>

pub fn draw_polyline_colors( &mut self, points: &PackedArray<Vector2>, colors: &PackedArray<Color>, )

To set the default parameters, use Self::draw_polyline_colors_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_polyline_colors_ex<'ex>( &'ex mut self, points: &'ex PackedArray<Vector2>, colors: &'ex PackedArray<Color>, ) -> ExDrawPolylineColors<'ex>

pub fn draw_ellipse_arc( &mut self, center: Vector2, major: f32, minor: f32, start_angle: f32, end_angle: f32, point_count: i32, color: Color, )

To set the default parameters, use Self::draw_ellipse_arc_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_ellipse_arc_ex<'ex>( &'ex mut self, center: Vector2, major: f32, minor: f32, start_angle: f32, end_angle: f32, point_count: i32, color: Color, ) -> ExDrawEllipseArc<'ex>

pub fn draw_arc( &mut self, center: Vector2, radius: f32, start_angle: f32, end_angle: f32, point_count: i32, color: Color, )

To set the default parameters, use Self::draw_arc_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_arc_ex<'ex>( &'ex mut self, center: Vector2, radius: f32, start_angle: f32, end_angle: f32, point_count: i32, color: Color, ) -> ExDrawArc<'ex>

pub fn draw_multiline(&mut self, points: &PackedArray<Vector2>, color: Color)

To set the default parameters, use Self::draw_multiline_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_multiline_ex<'ex>( &'ex mut self, points: &'ex PackedArray<Vector2>, color: Color, ) -> ExDrawMultiline<'ex>

pub fn draw_multiline_colors( &mut self, points: &PackedArray<Vector2>, colors: &PackedArray<Color>, )

To set the default parameters, use Self::draw_multiline_colors_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_multiline_colors_ex<'ex>( &'ex mut self, points: &'ex PackedArray<Vector2>, colors: &'ex PackedArray<Color>, ) -> ExDrawMultilineColors<'ex>

pub fn draw_rect(&mut self, rect: Rect2, color: Color)

To set the default parameters, use Self::draw_rect_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_rect_ex<'ex>( &'ex mut self, rect: Rect2, color: Color, ) -> ExDrawRect<'ex>

pub fn draw_circle(&mut self, position: Vector2, radius: f32, color: Color)

To set the default parameters, use Self::draw_circle_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_circle_ex<'ex>( &'ex mut self, position: Vector2, radius: f32, color: Color, ) -> ExDrawCircle<'ex>

pub fn draw_ellipse( &mut self, position: Vector2, major: f32, minor: f32, color: Color, )

To set the default parameters, use Self::draw_ellipse_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_ellipse_ex<'ex>( &'ex mut self, position: Vector2, major: f32, minor: f32, color: Color, ) -> ExDrawEllipse<'ex>

pub fn draw_texture( &mut self, texture: impl AsArg<Gd<Texture2D>>, position: Vector2, )

To set the default parameters, use Self::draw_texture_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_texture_ex<'ex>( &'ex mut self, texture: impl AsArg<Gd<Texture2D>> + 'ex, position: Vector2, ) -> ExDrawTexture<'ex>

pub fn draw_texture_rect( &mut self, texture: impl AsArg<Gd<Texture2D>>, rect: Rect2, tile: bool, )

To set the default parameters, use Self::draw_texture_rect_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_texture_rect_ex<'ex>( &'ex mut self, texture: impl AsArg<Gd<Texture2D>> + 'ex, rect: Rect2, tile: bool, ) -> ExDrawTextureRect<'ex>

pub fn draw_texture_rect_region( &mut self, texture: impl AsArg<Gd<Texture2D>>, rect: Rect2, src_rect: Rect2, )

To set the default parameters, use Self::draw_texture_rect_region_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_texture_rect_region_ex<'ex>( &'ex mut self, texture: impl AsArg<Gd<Texture2D>> + 'ex, rect: Rect2, src_rect: Rect2, ) -> ExDrawTextureRectRegion<'ex>

pub fn draw_msdf_texture_rect_region( &mut self, texture: impl AsArg<Gd<Texture2D>>, rect: Rect2, src_rect: Rect2, )

To set the default parameters, use Self::draw_msdf_texture_rect_region_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_msdf_texture_rect_region_ex<'ex>( &'ex mut self, texture: impl AsArg<Gd<Texture2D>> + 'ex, rect: Rect2, src_rect: Rect2, ) -> ExDrawMsdfTextureRectRegion<'ex>

pub fn draw_lcd_texture_rect_region( &mut self, texture: impl AsArg<Gd<Texture2D>>, rect: Rect2, src_rect: Rect2, )

To set the default parameters, use Self::draw_lcd_texture_rect_region_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_lcd_texture_rect_region_ex<'ex>( &'ex mut self, texture: impl AsArg<Gd<Texture2D>> + 'ex, rect: Rect2, src_rect: Rect2, ) -> ExDrawLcdTextureRectRegion<'ex>

pub fn draw_style_box( &mut self, style_box: impl AsArg<Gd<StyleBox>>, rect: Rect2, )

pub fn draw_primitive( &mut self, points: &PackedArray<Vector2>, colors: &PackedArray<Color>, uvs: &PackedArray<Vector2>, )

To set the default parameters, use Self::draw_primitive_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_primitive_ex<'ex>( &'ex mut self, points: &'ex PackedArray<Vector2>, colors: &'ex PackedArray<Color>, uvs: &'ex PackedArray<Vector2>, ) -> ExDrawPrimitive<'ex>

pub fn draw_polygon( &mut self, points: &PackedArray<Vector2>, colors: &PackedArray<Color>, )

To set the default parameters, use Self::draw_polygon_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_polygon_ex<'ex>( &'ex mut self, points: &'ex PackedArray<Vector2>, colors: &'ex PackedArray<Color>, ) -> ExDrawPolygon<'ex>

pub fn draw_colored_polygon( &mut self, points: &PackedArray<Vector2>, color: Color, )

To set the default parameters, use Self::draw_colored_polygon_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_colored_polygon_ex<'ex>( &'ex mut self, points: &'ex PackedArray<Vector2>, color: Color, ) -> ExDrawColoredPolygon<'ex>

pub fn draw_string( &self, font: impl AsArg<Gd<Font>>, pos: Vector2, text: impl AsArg<GString>, )

To set the default parameters, use Self::draw_string_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_string_ex<'ex>( &'ex self, font: impl AsArg<Gd<Font>> + 'ex, pos: Vector2, text: impl AsArg<GString> + 'ex, ) -> ExDrawString<'ex>

pub fn draw_multiline_string( &self, font: impl AsArg<Gd<Font>>, pos: Vector2, text: impl AsArg<GString>, )

To set the default parameters, use Self::draw_multiline_string_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_multiline_string_ex<'ex>( &'ex self, font: impl AsArg<Gd<Font>> + 'ex, pos: Vector2, text: impl AsArg<GString> + 'ex, ) -> ExDrawMultilineString<'ex>

pub fn draw_string_outline( &self, font: impl AsArg<Gd<Font>>, pos: Vector2, text: impl AsArg<GString>, )

To set the default parameters, use Self::draw_string_outline_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_string_outline_ex<'ex>( &'ex self, font: impl AsArg<Gd<Font>> + 'ex, pos: Vector2, text: impl AsArg<GString> + 'ex, ) -> ExDrawStringOutline<'ex>

pub fn draw_multiline_string_outline( &self, font: impl AsArg<Gd<Font>>, pos: Vector2, text: impl AsArg<GString>, )

To set the default parameters, use Self::draw_multiline_string_outline_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_multiline_string_outline_ex<'ex>( &'ex self, font: impl AsArg<Gd<Font>> + 'ex, pos: Vector2, text: impl AsArg<GString> + 'ex, ) -> ExDrawMultilineStringOutline<'ex>

pub fn draw_char( &self, font: impl AsArg<Gd<Font>>, pos: Vector2, char: impl AsArg<GString>, )

To set the default parameters, use Self::draw_char_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_char_ex<'ex>( &'ex self, font: impl AsArg<Gd<Font>> + 'ex, pos: Vector2, char: impl AsArg<GString> + 'ex, ) -> ExDrawChar<'ex>

pub fn draw_char_outline( &self, font: impl AsArg<Gd<Font>>, pos: Vector2, char: impl AsArg<GString>, )

To set the default parameters, use Self::draw_char_outline_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_char_outline_ex<'ex>( &'ex self, font: impl AsArg<Gd<Font>> + 'ex, pos: Vector2, char: impl AsArg<GString> + 'ex, ) -> ExDrawCharOutline<'ex>

pub fn draw_mesh( &mut self, mesh: impl AsArg<Gd<Mesh>>, texture: impl AsArg<Option<Gd<Texture2D>>>, )

To set the default parameters, use Self::draw_mesh_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_mesh_ex<'ex>( &'ex mut self, mesh: impl AsArg<Gd<Mesh>> + 'ex, texture: impl AsArg<Option<Gd<Texture2D>>> + 'ex, ) -> ExDrawMesh<'ex>

pub fn draw_multimesh( &mut self, multimesh: impl AsArg<Gd<MultiMesh>>, texture: impl AsArg<Option<Gd<Texture2D>>>, )

pub fn draw_set_transform(&mut self, position: Vector2)

To set the default parameters, use Self::draw_set_transform_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_set_transform_ex<'ex>( &'ex mut self, position: Vector2, ) -> ExDrawSetTransform<'ex>

pub fn draw_set_transform_matrix(&mut self, xform: Transform2D)

pub fn draw_animation_slice( &mut self, animation_length: f64, slice_begin: f64, slice_end: f64, )

To set the default parameters, use Self::draw_animation_slice_ex and its builder methods. See the book for detailed usage instructions.

pub fn draw_animation_slice_ex<'ex>( &'ex mut self, animation_length: f64, slice_begin: f64, slice_end: f64, ) -> ExDrawAnimationSlice<'ex>

pub fn draw_end_animation(&mut self)

pub fn get_transform(&self) -> Transform2D

pub fn get_global_transform(&self) -> Transform2D

pub fn get_global_transform_with_canvas(&self) -> Transform2D

pub fn get_viewport_transform(&self) -> Transform2D

pub fn get_viewport_rect(&self) -> Rect2

pub fn get_canvas_transform(&self) -> Transform2D

pub fn get_screen_transform(&self) -> Transform2D

pub fn get_local_mouse_position(&self) -> Vector2

pub fn get_global_mouse_position(&self) -> Vector2

pub fn get_canvas(&self) -> Rid

pub fn get_canvas_layer_node(&self) -> Option<Gd<CanvasLayer>>

pub fn get_world_2d(&self) -> Option<Gd<World2D>>

pub fn set_material(&mut self, material: impl AsArg<Option<Gd<Material>>>)

pub fn get_material(&self) -> Option<Gd<Material>>

pub fn set_instance_shader_parameter( &mut self, name: impl AsArg<StringName>, value: &Variant, )

pub fn get_instance_shader_parameter( &self, name: impl AsArg<StringName>, ) -> Variant

pub fn set_use_parent_material(&mut self, enable: bool)

pub fn get_use_parent_material(&self) -> bool

pub fn set_notify_local_transform(&mut self, enable: bool)

pub fn is_local_transform_notification_enabled(&self) -> bool

pub fn set_notify_transform(&mut self, enable: bool)

pub fn is_transform_notification_enabled(&self) -> bool

pub fn force_update_transform(&mut self)

pub fn make_canvas_position_local(&self, viewport_point: Vector2) -> Vector2

pub fn make_input_local( &self, event: impl AsArg<Gd<InputEvent>>, ) -> Gd<InputEvent>

pub fn set_visibility_layer(&mut self, layer: u32)

pub fn get_visibility_layer(&self) -> u32

pub fn set_visibility_layer_bit(&mut self, layer: u32, enabled: bool)

pub fn get_visibility_layer_bit(&self, layer: u32) -> bool

pub fn set_texture_filter(&mut self, mode: TextureFilter)

pub fn get_texture_filter(&self) -> TextureFilter

pub fn set_texture_repeat(&mut self, mode: TextureRepeat)

pub fn get_texture_repeat(&self) -> TextureRepeat

pub fn set_clip_children_mode(&mut self, mode: ClipChildrenMode)

pub fn get_clip_children_mode(&self) -> ClipChildrenMode

pub fn notify(&mut self, what: CanvasItemNotification)

โš ๏ธ Sends a Godot notification to all classes inherited by the object.

Triggers calls to on_notification(), and depending on the notification, also to Godotโ€™s lifecycle callbacks such as ready().

Starts from the highest ancestor (the Object class) and goes down the hierarchy. See also Godot docs for Object::notification().

ยงPanics

If you call this method on a user-defined object while holding a GdRef or GdMut guard on the instance, you will encounter a panic. The reason is that the receiving virtual method on_notification() acquires a GdMut lock dynamically, which must be exclusive.

pub fn notify_reversed(&mut self, what: CanvasItemNotification)

โš ๏ธ Like Self::notify(), but starts at the most-derived class and goes up the hierarchy.

See docs of that method, including the panics.

Methods from Deref<Target = Node>ยง

pub fn get_node_as<T>(&self, path: impl AsArg<NodePath>) -> Gd<T>
where T: Inherits<Node>,

โš ๏ธ Retrieves the node at path path, panicking if not found or bad type.

ยงPanics

If the node is not found, or if it does not have type T or inherited.

pub fn try_get_node_as<T>(&self, path: impl AsArg<NodePath>) -> Option<Gd<T>>
where T: Inherits<Node>,

Retrieves the node at path path (fallible).

If the node is not found, or if it does not have type T or inherited, None will be returned.

pub fn get_tree(&self) -> Gd<SceneTree>

โš ๏ธ Assuming the node is inside a scene tree, obtains the latter.

ยงPanics

If the node is not inside the scene tree. If youโ€™re unsure, use get_tree_or_null().

pub fn get_tree_or_null(&self) -> Option<Gd<SceneTree>>

Fallibly obtains the scene tree containing the node, or None.

pub fn add_sibling(&mut self, sibling: impl AsArg<Gd<Node>>)

To set the default parameters, use Self::add_sibling_ex and its builder methods. See the book for detailed usage instructions.

pub fn add_sibling_ex<'ex>( &'ex mut self, sibling: impl AsArg<Gd<Node>> + 'ex, ) -> ExAddSibling<'ex>

pub fn set_name(&mut self, name: impl AsArg<StringName>)

pub fn get_name(&self) -> StringName

pub fn add_child(&mut self, node: impl AsArg<Gd<Node>>)

To set the default parameters, use Self::add_child_ex and its builder methods. See the book for detailed usage instructions.

pub fn add_child_ex<'ex>( &'ex mut self, node: impl AsArg<Gd<Node>> + 'ex, ) -> ExAddChild<'ex>

pub fn remove_child(&mut self, node: impl AsArg<Gd<Node>>)

pub fn reparent(&mut self, new_parent: impl AsArg<Gd<Node>>)

To set the default parameters, use Self::reparent_ex and its builder methods. See the book for detailed usage instructions.

pub fn reparent_ex<'ex>( &'ex mut self, new_parent: impl AsArg<Gd<Node>> + 'ex, ) -> ExReparent<'ex>

pub fn get_child_count(&self) -> i32

To set the default parameters, use Self::get_child_count_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_child_count_ex<'ex>(&'ex self) -> ExGetChildCount<'ex>

pub fn get_children(&self) -> Array<Gd<Node>>

To set the default parameters, use Self::get_children_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_children_ex<'ex>(&'ex self) -> ExGetChildren<'ex>

pub fn get_child(&self, idx: i32) -> Option<Gd<Node>>

To set the default parameters, use Self::get_child_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_child_ex<'ex>(&'ex self, idx: i32) -> ExGetChild<'ex>

pub fn has_node(&self, path: impl AsArg<NodePath>) -> bool

pub fn get_node_or_null(&self, path: impl AsArg<NodePath>) -> Option<Gd<Node>>

pub fn get_parent(&self) -> Option<Gd<Node>>

pub fn find_child(&self, pattern: impl AsArg<GString>) -> Option<Gd<Node>>

To set the default parameters, use Self::find_child_ex and its builder methods. See the book for detailed usage instructions.

pub fn find_child_ex<'ex>( &'ex self, pattern: impl AsArg<GString> + 'ex, ) -> ExFindChild<'ex>

pub fn find_children(&self, pattern: impl AsArg<GString>) -> Array<Gd<Node>>

To set the default parameters, use Self::find_children_ex and its builder methods. See the book for detailed usage instructions.

pub fn find_children_ex<'ex>( &'ex self, pattern: impl AsArg<GString> + 'ex, ) -> ExFindChildren<'ex>

pub fn find_parent(&self, pattern: impl AsArg<GString>) -> Option<Gd<Node>>

pub fn has_node_and_resource(&self, path: impl AsArg<NodePath>) -> bool

pub fn get_node_and_resource( &self, path: impl AsArg<NodePath>, ) -> Array<Variant>

pub fn is_inside_tree(&self) -> bool

pub fn is_part_of_edited_scene(&self) -> bool

pub fn is_ancestor_of(&self, node: impl AsArg<Gd<Node>>) -> bool

pub fn is_greater_than(&self, node: impl AsArg<Gd<Node>>) -> bool

pub fn get_path(&self) -> NodePath

pub fn get_path_to(&self, node: impl AsArg<Gd<Node>>) -> NodePath

To set the default parameters, use Self::get_path_to_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_path_to_ex<'ex>( &'ex self, node: impl AsArg<Gd<Node>> + 'ex, ) -> ExGetPathTo<'ex>

pub fn add_to_group(&mut self, group: impl AsArg<StringName>)

To set the default parameters, use Self::add_to_group_ex and its builder methods. See the book for detailed usage instructions.

pub fn add_to_group_ex<'ex>( &'ex mut self, group: impl AsArg<StringName> + 'ex, ) -> ExAddToGroup<'ex>

pub fn remove_from_group(&mut self, group: impl AsArg<StringName>)

pub fn is_in_group(&self, group: impl AsArg<StringName>) -> bool

pub fn move_child(&mut self, child_node: impl AsArg<Gd<Node>>, to_index: i32)

pub fn get_groups(&self) -> Array<StringName>

pub fn set_owner(&mut self, owner: impl AsArg<Option<Gd<Node>>>)

pub fn get_owner(&self) -> Option<Gd<Node>>

pub fn get_index(&self) -> i32

To set the default parameters, use Self::get_index_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_index_ex<'ex>(&'ex self) -> ExGetIndex<'ex>

pub fn print_tree(&mut self)

pub fn print_tree_pretty(&mut self)

pub fn get_tree_string(&self) -> GString

pub fn get_tree_string_pretty(&self) -> GString

pub fn set_scene_file_path(&mut self, scene_file_path: impl AsArg<GString>)

pub fn get_scene_file_path(&self) -> GString

pub fn propagate_notification(&mut self, what: i32)

pub fn propagate_call(&mut self, method: impl AsArg<StringName>)

To set the default parameters, use Self::propagate_call_ex and its builder methods. See the book for detailed usage instructions.

pub fn propagate_call_ex<'ex>( &'ex mut self, method: impl AsArg<StringName> + 'ex, ) -> ExPropagateCall<'ex>

pub fn set_physics_process(&mut self, enable: bool)

pub fn get_physics_process_delta_time(&self) -> f64

pub fn is_physics_processing(&self) -> bool

pub fn get_process_delta_time(&self) -> f64

pub fn set_process(&mut self, enable: bool)

pub fn set_process_priority(&mut self, priority: i32)

pub fn get_process_priority(&self) -> i32

pub fn set_physics_process_priority(&mut self, priority: i32)

pub fn get_physics_process_priority(&self) -> i32

pub fn is_processing(&self) -> bool

pub fn set_process_input(&mut self, enable: bool)

pub fn is_processing_input(&self) -> bool

pub fn set_process_shortcut_input(&mut self, enable: bool)

pub fn is_processing_shortcut_input(&self) -> bool

pub fn set_process_unhandled_input(&mut self, enable: bool)

pub fn is_processing_unhandled_input(&self) -> bool

pub fn set_process_unhandled_key_input(&mut self, enable: bool)

pub fn is_processing_unhandled_key_input(&self) -> bool

pub fn set_process_mode(&mut self, mode: ProcessMode)

pub fn get_process_mode(&self) -> ProcessMode

pub fn can_process(&self) -> bool

pub fn set_process_thread_group(&mut self, mode: ProcessThreadGroup)

pub fn get_process_thread_group(&self) -> ProcessThreadGroup

pub fn set_process_thread_messages(&mut self, flags: ProcessThreadMessages)

pub fn get_process_thread_messages(&self) -> ProcessThreadMessages

pub fn set_process_thread_group_order(&mut self, order: i32)

pub fn get_process_thread_group_order(&self) -> i32

pub fn queue_accessibility_update(&mut self)

pub fn get_accessibility_element(&self) -> Rid

pub fn set_display_folded(&mut self, fold: bool)

pub fn is_displayed_folded(&self) -> bool

pub fn set_process_internal(&mut self, enable: bool)

pub fn is_processing_internal(&self) -> bool

pub fn set_physics_process_internal(&mut self, enable: bool)

pub fn is_physics_processing_internal(&self) -> bool

pub fn set_physics_interpolation_mode(&mut self, mode: PhysicsInterpolationMode)

pub fn get_physics_interpolation_mode(&self) -> PhysicsInterpolationMode

pub fn is_physics_interpolated(&self) -> bool

pub fn is_physics_interpolated_and_enabled(&self) -> bool

pub fn reset_physics_interpolation(&mut self)

pub fn set_auto_translate_mode(&mut self, mode: AutoTranslateMode)

pub fn get_auto_translate_mode(&self) -> AutoTranslateMode

pub fn can_auto_translate(&self) -> bool

pub fn set_translation_domain_inherited(&mut self)

pub fn get_window(&self) -> Option<Gd<Window>>

pub fn get_last_exclusive_window(&self) -> Option<Gd<Window>>

pub fn create_tween(&mut self) -> Gd<Tween>

pub fn duplicate(&self) -> Option<Gd<Node>>

๐Ÿ‘ŽDeprecated: Use Gd::duplicate_node() or Gd::duplicate_node_ex().

To set the default parameters, use Self::duplicate_ex and its builder methods. See the book for detailed usage instructions.

pub fn duplicate_ex<'ex>(&'ex self) -> ExDuplicate<'ex>

๐Ÿ‘ŽDeprecated: Use Gd::duplicate_node() or Gd::duplicate_node_ex().

pub fn replace_by(&mut self, node: impl AsArg<Gd<Node>>)

To set the default parameters, use Self::replace_by_ex and its builder methods. See the book for detailed usage instructions.

pub fn replace_by_ex<'ex>( &'ex mut self, node: impl AsArg<Gd<Node>> + 'ex, ) -> ExReplaceBy<'ex>

pub fn set_scene_instance_load_placeholder(&mut self, load_placeholder: bool)

pub fn get_scene_instance_load_placeholder(&self) -> bool

pub fn set_editable_instance( &mut self, node: impl AsArg<Gd<Node>>, is_editable: bool, )

pub fn is_editable_instance(&self, node: impl AsArg<Option<Gd<Node>>>) -> bool

pub fn get_viewport(&self) -> Option<Gd<Viewport>>

pub fn queue_free(&mut self)

pub fn request_ready(&mut self)

pub fn is_node_ready(&self) -> bool

pub fn set_multiplayer_authority(&mut self, id: i32)

To set the default parameters, use Self::set_multiplayer_authority_ex and its builder methods. See the book for detailed usage instructions.

pub fn set_multiplayer_authority_ex<'ex>( &'ex mut self, id: i32, ) -> ExSetMultiplayerAuthority<'ex>

pub fn get_multiplayer_authority(&self) -> i32

pub fn is_multiplayer_authority(&self) -> bool

pub fn get_multiplayer(&self) -> Option<Gd<MultiplayerApi>>

pub fn rpc_config(&mut self, method: impl AsArg<StringName>, config: &Variant)

pub fn get_node_rpc_config(&self) -> Variant

pub fn set_editor_description( &mut self, editor_description: impl AsArg<GString>, )

pub fn get_editor_description(&self) -> GString

pub fn set_unique_name_in_owner(&mut self, enable: bool)

pub fn is_unique_name_in_owner(&self) -> bool

pub fn atr(&self, message: impl AsArg<GString>) -> GString

To set the default parameters, use Self::atr_ex and its builder methods. See the book for detailed usage instructions.

pub fn atr_ex<'ex>(&'ex self, message: impl AsArg<GString> + 'ex) -> ExAtr<'ex>

pub fn atr_n( &self, message: impl AsArg<GString>, plural_message: impl AsArg<StringName>, n: i32, ) -> GString

To set the default parameters, use Self::atr_n_ex and its builder methods. See the book for detailed usage instructions.

pub fn atr_n_ex<'ex>( &'ex self, message: impl AsArg<GString> + 'ex, plural_message: impl AsArg<StringName> + 'ex, n: i32, ) -> ExAtrN<'ex>

pub fn rpc( &mut self, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Error

ยงPanics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_rpc( &mut self, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Result<Error, CallError>

ยงReturn type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn rpc_id( &mut self, peer_id: i64, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Error

ยงPanics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_rpc_id( &mut self, peer_id: i64, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Result<Error, CallError>

ยงReturn type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn update_configuration_warnings(&mut self)

pub fn call_deferred_thread_group( &mut self, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Variant

ยงPanics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_call_deferred_thread_group( &mut self, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Result<Variant, CallError>

ยงReturn type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn set_deferred_thread_group( &mut self, property: impl AsArg<StringName>, value: &Variant, )

pub fn notify_deferred_thread_group(&mut self, what: i32)

pub fn call_thread_safe( &mut self, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Variant

ยงPanics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_call_thread_safe( &mut self, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Result<Variant, CallError>

ยงReturn type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn set_thread_safe( &mut self, property: impl AsArg<StringName>, value: &Variant, )

pub fn notify_thread_safe(&mut self, what: i32)

pub fn notify(&mut self, what: NodeNotification)

โš ๏ธ Sends a Godot notification to all classes inherited by the object.

Triggers calls to on_notification(), and depending on the notification, also to Godotโ€™s lifecycle callbacks such as ready().

Starts from the highest ancestor (the Object class) and goes down the hierarchy. See also Godot docs for Object::notification().

ยงPanics

If you call this method on a user-defined object while holding a GdRef or GdMut guard on the instance, you will encounter a panic. The reason is that the receiving virtual method on_notification() acquires a GdMut lock dynamically, which must be exclusive.

pub fn notify_reversed(&mut self, what: NodeNotification)

โš ๏ธ Like Self::notify(), but starts at the most-derived class and goes up the hierarchy.

See docs of that method, including the panics.

Methods from Deref<Target = Object>ยง

pub fn get_script(&self) -> Option<Gd<Script>>

pub fn set_script(&mut self, script: impl AsArg<Option<Gd<Script>>>)

pub fn connect( &mut self, signal: impl AsArg<StringName>, callable: &Callable, ) -> Error

pub fn connect_flags( &mut self, signal: impl AsArg<StringName>, callable: &Callable, flags: ConnectFlags, ) -> Error

pub fn get_class(&self) -> GString

pub fn is_class(&self, class: impl AsArg<GString>) -> bool

pub fn set(&mut self, property: impl AsArg<StringName>, value: &Variant)

pub fn get(&self, property: impl AsArg<StringName>) -> Variant

pub fn set_indexed( &mut self, property_path: impl AsArg<NodePath>, value: &Variant, )

pub fn get_indexed(&self, property_path: impl AsArg<NodePath>) -> Variant

pub fn get_property_list(&self) -> Array<Dictionary<Variant, Variant>>

pub fn get_method_list(&self) -> Array<Dictionary<Variant, Variant>>

pub fn property_can_revert(&self, property: impl AsArg<StringName>) -> bool

pub fn property_get_revert(&self, property: impl AsArg<StringName>) -> Variant

pub fn set_meta(&mut self, name: impl AsArg<StringName>, value: &Variant)

pub fn remove_meta(&mut self, name: impl AsArg<StringName>)

pub fn get_meta(&self, name: impl AsArg<StringName>) -> Variant

To set the default parameters, use Self::get_meta_ex and its builder methods. See the book for detailed usage instructions.

pub fn get_meta_ex<'ex>( &'ex self, name: impl AsArg<StringName> + 'ex, ) -> ExGetMeta<'ex>

pub fn has_meta(&self, name: impl AsArg<StringName>) -> bool

pub fn get_meta_list(&self) -> Array<StringName>

pub fn add_user_signal(&mut self, signal: impl AsArg<GString>)

To set the default parameters, use Self::add_user_signal_ex and its builder methods. See the book for detailed usage instructions.

pub fn add_user_signal_ex<'ex>( &'ex mut self, signal: impl AsArg<GString> + 'ex, ) -> ExAddUserSignal<'ex>

pub fn has_user_signal(&self, signal: impl AsArg<StringName>) -> bool

pub fn remove_user_signal(&mut self, signal: impl AsArg<StringName>)

pub fn emit_signal( &mut self, signal: impl AsArg<StringName>, varargs: &[Variant], ) -> Error

ยงPanics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_emit_signal( &mut self, signal: impl AsArg<StringName>, varargs: &[Variant], ) -> Result<Error, CallError>

ยงReturn type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn call( &mut self, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Variant

ยงPanics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_call( &mut self, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Result<Variant, CallError>

ยงReturn type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn call_deferred( &mut self, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Variant

ยงPanics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_call_deferred( &mut self, method: impl AsArg<StringName>, varargs: &[Variant], ) -> Result<Variant, CallError>

ยงReturn type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn set_deferred( &mut self, property: impl AsArg<StringName>, value: &Variant, )

pub fn callv( &mut self, method: impl AsArg<StringName>, arg_array: &AnyArray, ) -> Variant

pub fn has_method(&self, method: impl AsArg<StringName>) -> bool

pub fn get_method_argument_count(&self, method: impl AsArg<StringName>) -> i32

pub fn has_signal(&self, signal: impl AsArg<StringName>) -> bool

pub fn get_signal_list(&self) -> Array<Dictionary<Variant, Variant>>

pub fn get_signal_connection_list( &self, signal: impl AsArg<StringName>, ) -> Array<Dictionary<Variant, Variant>>

pub fn get_incoming_connections(&self) -> Array<Dictionary<Variant, Variant>>

pub fn disconnect( &mut self, signal: impl AsArg<StringName>, callable: &Callable, )

pub fn is_connected( &self, signal: impl AsArg<StringName>, callable: &Callable, ) -> bool

pub fn has_connections(&self, signal: impl AsArg<StringName>) -> bool

pub fn set_block_signals(&mut self, enable: bool)

pub fn is_blocking_signals(&self) -> bool

pub fn notify_property_list_changed(&mut self)

pub fn set_message_translation(&mut self, enable: bool)

pub fn can_translate_messages(&self) -> bool

pub fn tr(&self, message: impl AsArg<StringName>) -> GString

To set the default parameters, use Self::tr_ex and its builder methods. See the book for detailed usage instructions.

pub fn tr_ex<'ex>(&'ex self, message: impl AsArg<StringName> + 'ex) -> ExTr<'ex>

pub fn tr_n( &self, message: impl AsArg<StringName>, plural_message: impl AsArg<StringName>, n: i32, ) -> GString

To set the default parameters, use Self::tr_n_ex and its builder methods. See the book for detailed usage instructions.

pub fn tr_n_ex<'ex>( &'ex self, message: impl AsArg<StringName> + 'ex, plural_message: impl AsArg<StringName> + 'ex, n: i32, ) -> ExTrN<'ex>

pub fn get_translation_domain(&self) -> StringName

pub fn set_translation_domain(&mut self, domain: impl AsArg<StringName>)

pub fn is_queued_for_deletion(&self) -> bool

pub fn cancel_free(&mut self)

pub fn notify(&mut self, what: ObjectNotification)

โš ๏ธ Sends a Godot notification to all classes inherited by the object.

Triggers calls to on_notification(), and depending on the notification, also to Godotโ€™s lifecycle callbacks such as ready().

Starts from the highest ancestor (the Object class) and goes down the hierarchy. See also Godot docs for Object::notification().

ยงPanics

If you call this method on a user-defined object while holding a GdRef or GdMut guard on the instance, you will encounter a panic. The reason is that the receiving virtual method on_notification() acquires a GdMut lock dynamically, which must be exclusive.

pub fn notify_reversed(&mut self, what: ObjectNotification)

โš ๏ธ Like Self::notify(), but starts at the most-derived class and goes up the hierarchy.

See docs of that method, including the panics.

Trait Implementationsยง

ยง

impl Bounds for LineEdit

ยง

type Memory = MemManual

Defines the memory strategy of the static type.
ยง

type Declarer = DeclEngine

Whether this class is a core Godot class provided by the engine, or declared by the user as a Rust struct.
ยง

impl Debug for LineEdit

ยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
ยง

impl Deref for LineEdit

ยง

type Target = Control

The resulting type after dereferencing.
ยง

fn deref(&self) -> &<LineEdit as Deref>::Target

Dereferences the value.
ยง

impl DerefMut for LineEdit

ยง

fn deref_mut(&mut self) -> &mut <LineEdit as Deref>::Target

Mutably dereferences the value.
ยง

impl GodotClass for LineEdit

ยง

const INIT_LEVEL: InitLevel = crate::init::InitLevel::Scene

Initialization level, during which this class should be initialized with Godot. Read more
ยง

type Base = Control

The immediate superclass of T. This is always a Godot engine class.
ยง

fn class_id() -> ClassId

Globally unique class ID, linked to the name under which the class is registered in Godot. Read more
ยง

fn inherits<Base>() -> bool
where Base: GodotClass,

Returns whether Self inherits from Base. Read more
ยง

impl Inherits<CanvasItem> for LineEdit

ยง

const IS_SAME_CLASS: bool = false

True iff Self == Base. Read more
ยง

impl Inherits<Control> for LineEdit

ยง

const IS_SAME_CLASS: bool = false

True iff Self == Base. Read more
ยง

impl Inherits<Node> for LineEdit

ยง

const IS_SAME_CLASS: bool = false

True iff Self == Base. Read more
ยง

impl Inherits<Object> for LineEdit

ยง

const IS_SAME_CLASS: bool = false

True iff Self == Base. Read more
ยง

impl WithSignals for LineEdit

ยง

type SignalCollection<'c, C: WithSignals> = SignalsOfLineEdit<'c, C>

The associated struct listing all signals of this class. Read more
ยง

impl GodotDefault for LineEdit

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

ยง

impl<T> Inherits<T> for T
where T: GodotClass,

ยง

const IS_SAME_CLASS: bool = true

True iff Self == Base. Read more
Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

ยง

impl<T> NewAlloc for T
where T: GodotDefault<Memory = MemManual> + Bounds,

ยง

fn new_alloc() -> Gd<T>

Return a new, manually-managed Gd containing a default-constructed instance. Read more
Sourceยง

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Sourceยง

type Target = T

๐Ÿ”ฌThis is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
ยง

impl<T> UniformObjectDeref<DeclEngine> for T
where T: GodotClass<Declarer = DeclEngine>,

ยง

type TargetRef<'a> = Gd<T>

ยง

type TargetMut<'a> = Gd<T>

ยง

fn object_as_ref<'a>( gd: &'a Gd<T>, ) -> <T as UniformObjectDeref<DeclEngine>>::TargetRef<'a>

ยง

fn object_as_mut<'a>( gd: &'a mut Gd<T>, ) -> <T as UniformObjectDeref<DeclEngine>>::TargetMut<'a>