Struct TextEdit

Source
#[repr(C)]
pub struct TextEdit { /* private fields */ }
Expand description

Godot class TextEdit.

Inherits Control.

Related symbols:

See also Godot docs for TextEdit.

§Construction

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

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

Implementations§

Source§

impl TextEdit

Source

pub fn has_ime_text(&self) -> bool

Source

pub fn cancel_ime(&mut self)

Source

pub fn apply_ime(&mut self)

Source

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

Source

pub fn is_editable(&self) -> bool

Source

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

Source

pub fn get_text_direction(&self) -> TextDirection

Source

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

Source

pub fn get_language(&self) -> GString

Source

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

Source

pub fn get_structured_text_bidi_override(&self) -> StructuredTextParser

Source

pub fn set_structured_text_bidi_override_options( &mut self, args: &Array<Variant>, )

Source

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

Source

pub fn set_tab_size(&mut self, size: i32)

Source

pub fn get_tab_size(&self) -> i32

Source

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

Source

pub fn is_indent_wrapped_lines(&self) -> bool

Source

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

Source

pub fn is_overtype_mode_enabled(&self) -> bool

Source

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

Source

pub fn is_context_menu_enabled(&self) -> bool

Source

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

Source

pub fn is_shortcut_keys_enabled(&self) -> bool

Source

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

Source

pub fn is_virtual_keyboard_enabled(&self) -> bool

Source

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

Source

pub fn is_middle_mouse_paste_enabled(&self) -> bool

Source

pub fn clear(&mut self)

Source

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

Source

pub fn get_text(&self) -> GString

Source

pub fn get_line_count(&self) -> i32

Source

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

Source

pub fn get_placeholder(&self) -> GString

Source

pub fn set_line(&mut self, line: i32, new_text: impl AsArg<GString>)

Source

pub fn get_line(&self, line: i32) -> GString

Source

pub fn get_line_width(&self, line: i32) -> i32

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

Source

pub fn get_line_width_ex<'a>(&'a self, line: i32) -> ExGetLineWidth<'a>

Source

pub fn get_line_height(&self) -> i32

Source

pub fn get_indent_level(&self, line: i32) -> i32

Source

pub fn get_first_non_whitespace_column(&self, line: i32) -> i32

Source

pub fn swap_lines(&mut self, from_line: i32, to_line: i32)

Source

pub fn insert_line_at(&mut self, line: i32, text: impl AsArg<GString>)

Source

pub fn remove_line_at(&mut self, line: i32)

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

Source

pub fn remove_line_at_ex<'a>(&'a mut self, line: i32) -> ExRemoveLineAt<'a>

Source

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

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

Source

pub fn insert_text_at_caret_ex<'a>( &'a mut self, text: impl AsArg<GString> + 'a, ) -> ExInsertTextAtCaret<'a>

Source

pub fn insert_text(&mut self, text: impl AsArg<GString>, line: i32, column: i32)

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

Source

pub fn insert_text_ex<'a>( &'a mut self, text: impl AsArg<GString> + 'a, line: i32, column: i32, ) -> ExInsertText<'a>

Source

pub fn remove_text( &mut self, from_line: i32, from_column: i32, to_line: i32, to_column: i32, )

Source

pub fn get_last_unhidden_line(&self) -> i32

Source

pub fn get_next_visible_line_offset_from( &self, line: i32, visible_amount: i32, ) -> i32

Source

pub fn get_next_visible_line_index_offset_from( &self, line: i32, wrap_index: i32, visible_amount: i32, ) -> Vector2i

Source

pub fn backspace(&mut self)

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

Source

pub fn backspace_ex<'a>(&'a mut self) -> ExBackspace<'a>

Source

pub fn cut(&mut self)

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

Source

pub fn cut_ex<'a>(&'a mut self) -> ExCut<'a>

Source

pub fn copy(&mut self)

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

Source

pub fn copy_ex<'a>(&'a mut self) -> ExCopy<'a>

Source

pub fn paste(&mut self)

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

Source

pub fn paste_ex<'a>(&'a mut self) -> ExPaste<'a>

Source

pub fn paste_primary_clipboard(&mut self)

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

Source

pub fn paste_primary_clipboard_ex<'a>( &'a mut self, ) -> ExPastePrimaryClipboard<'a>

Source

pub fn start_action(&mut self, action: EditAction)

Source

pub fn end_action(&mut self)

Source

pub fn begin_complex_operation(&mut self)

Source

pub fn end_complex_operation(&mut self)

Source

pub fn has_undo(&self) -> bool

Source

pub fn has_redo(&self) -> bool

Source

pub fn undo(&mut self)

Source

pub fn redo(&mut self)

Source

pub fn clear_undo_history(&mut self)

Source

pub fn tag_saved_version(&mut self)

Source

pub fn get_version(&self) -> u32

Source

pub fn get_saved_version(&self) -> u32

Source

pub fn set_search_text(&mut self, search_text: impl AsArg<GString>)

Source

pub fn set_search_flags(&mut self, flags: u32)

Source

pub fn search( &self, text: impl AsArg<GString>, flags: u32, from_line: i32, from_column: i32, ) -> Vector2i

Source

pub fn set_tooltip_request_func(&mut self, callback: &Callable)

Source

pub fn get_local_mouse_pos(&self) -> Vector2

Source

pub fn get_word_at_pos(&self, position: Vector2) -> GString

Source

pub fn get_line_column_at_pos(&self, position: Vector2i) -> Vector2i

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

Source

pub fn get_line_column_at_pos_ex<'a>( &'a self, position: Vector2i, ) -> ExGetLineColumnAtPos<'a>

Source

pub fn get_pos_at_line_column(&self, line: i32, column: i32) -> Vector2i

Source

pub fn get_rect_at_line_column(&self, line: i32, column: i32) -> Rect2i

Source

pub fn get_minimap_line_at_pos(&self, position: Vector2i) -> i32

Source

pub fn is_dragging_cursor(&self) -> bool

Source

pub fn is_mouse_over_selection(&self, edges: bool) -> bool

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

Source

pub fn is_mouse_over_selection_ex<'a>( &'a self, edges: bool, ) -> ExIsMouseOverSelection<'a>

Source

pub fn set_caret_type(&mut self, type_: CaretType)

Source

pub fn get_caret_type(&self) -> CaretType

Source

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

Source

pub fn is_drawing_caret_when_editable_disabled(&self) -> bool

Source

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

Source

pub fn is_move_caret_on_right_click_enabled(&self) -> bool

Source

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

Source

pub fn is_caret_mid_grapheme_enabled(&self) -> bool

Source

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

Source

pub fn is_multiple_carets_enabled(&self) -> bool

Source

pub fn add_caret(&mut self, line: i32, column: i32) -> i32

Source

pub fn remove_caret(&mut self, caret: i32)

Source

pub fn remove_secondary_carets(&mut self)

Source

pub fn get_caret_count(&self) -> i32

Source

pub fn add_caret_at_carets(&mut self, below: bool)

Source

pub fn get_sorted_carets(&self) -> PackedInt32Array

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

Source

pub fn get_sorted_carets_ex<'a>(&'a self) -> ExGetSortedCarets<'a>

Source

pub fn collapse_carets( &mut self, from_line: i32, from_column: i32, to_line: i32, to_column: i32, )

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

Source

pub fn collapse_carets_ex<'a>( &'a mut self, from_line: i32, from_column: i32, to_line: i32, to_column: i32, ) -> ExCollapseCarets<'a>

Source

pub fn merge_overlapping_carets(&mut self)

Source

pub fn begin_multicaret_edit(&mut self)

Source

pub fn end_multicaret_edit(&mut self)

Source

pub fn is_in_mulitcaret_edit(&self) -> bool

Source

pub fn multicaret_edit_ignore_caret(&self, caret_index: i32) -> bool

Source

pub fn is_caret_visible(&self) -> bool

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

Source

pub fn is_caret_visible_ex<'a>(&'a self) -> ExIsCaretVisible<'a>

Source

pub fn get_caret_draw_pos(&self) -> Vector2

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

Source

pub fn get_caret_draw_pos_ex<'a>(&'a self) -> ExGetCaretDrawPos<'a>

Source

pub fn set_caret_line(&mut self, line: i32)

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

Source

pub fn set_caret_line_ex<'a>(&'a mut self, line: i32) -> ExSetCaretLine<'a>

Source

pub fn get_caret_line(&self) -> i32

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

Source

pub fn get_caret_line_ex<'a>(&'a self) -> ExGetCaretLine<'a>

Source

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

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

Source

pub fn set_caret_column_ex<'a>( &'a mut self, column: i32, ) -> ExSetCaretColumn<'a>

Source

pub fn get_caret_column(&self) -> i32

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

Source

pub fn get_caret_column_ex<'a>(&'a self) -> ExGetCaretColumn<'a>

Source

pub fn get_caret_wrap_index(&self) -> i32

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

Source

pub fn get_caret_wrap_index_ex<'a>(&'a self) -> ExGetCaretWrapIndex<'a>

Source

pub fn get_word_under_caret(&self) -> GString

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

Source

pub fn get_word_under_caret_ex<'a>(&'a self) -> ExGetWordUnderCaret<'a>

Source

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

Source

pub fn is_default_word_separators_enabled(&self) -> bool

Source

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

Source

pub fn is_custom_word_separators_enabled(&self) -> bool

Source

pub fn set_custom_word_separators( &mut self, custom_word_separators: impl AsArg<GString>, )

Source

pub fn get_custom_word_separators(&self) -> GString

Source

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

Source

pub fn is_selecting_enabled(&self) -> bool

Source

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

Source

pub fn is_deselect_on_focus_loss_enabled(&self) -> bool

Source

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

Source

pub fn is_drag_and_drop_selection_enabled(&self) -> bool

Source

pub fn set_selection_mode(&mut self, mode: SelectionMode)

Source

pub fn get_selection_mode(&self) -> SelectionMode

Source

pub fn select_all(&mut self)

Source

pub fn select_word_under_caret(&mut self)

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

Source

pub fn select_word_under_caret_ex<'a>( &'a mut self, ) -> ExSelectWordUnderCaret<'a>

Source

pub fn add_selection_for_next_occurrence(&mut self)

Source

pub fn skip_selection_for_next_occurrence(&mut self)

Source

pub fn select( &mut self, origin_line: i32, origin_column: i32, caret_line: i32, caret_column: i32, )

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

Source

pub fn select_ex<'a>( &'a mut self, origin_line: i32, origin_column: i32, caret_line: i32, caret_column: i32, ) -> ExSelect<'a>

Source

pub fn has_selection(&self) -> bool

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

Source

pub fn has_selection_ex<'a>(&'a self) -> ExHasSelection<'a>

Source

pub fn get_selected_text(&mut self) -> GString

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

Source

pub fn get_selected_text_ex<'a>(&'a mut self) -> ExGetSelectedText<'a>

Source

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

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

Source

pub fn get_selection_at_line_column_ex<'a>( &'a self, line: i32, column: i32, ) -> ExGetSelectionAtLineColumn<'a>

Source

pub fn get_line_ranges_from_carets(&self) -> Array<Vector2i>

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

Source

pub fn get_line_ranges_from_carets_ex<'a>( &'a self, ) -> ExGetLineRangesFromCarets<'a>

Source

pub fn get_selection_origin_line(&self) -> i32

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

Source

pub fn get_selection_origin_line_ex<'a>( &'a self, ) -> ExGetSelectionOriginLine<'a>

Source

pub fn get_selection_origin_column(&self) -> i32

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

Source

pub fn get_selection_origin_column_ex<'a>( &'a self, ) -> ExGetSelectionOriginColumn<'a>

Source

pub fn set_selection_origin_line(&mut self, line: i32)

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

Source

pub fn set_selection_origin_line_ex<'a>( &'a mut self, line: i32, ) -> ExSetSelectionOriginLine<'a>

Source

pub fn set_selection_origin_column(&mut self, column: i32)

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

Source

pub fn set_selection_origin_column_ex<'a>( &'a mut self, column: i32, ) -> ExSetSelectionOriginColumn<'a>

Source

pub fn get_selection_from_line(&self) -> i32

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

Source

pub fn get_selection_from_line_ex<'a>(&'a self) -> ExGetSelectionFromLine<'a>

Source

pub fn get_selection_from_column(&self) -> i32

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

Source

pub fn get_selection_from_column_ex<'a>( &'a self, ) -> ExGetSelectionFromColumn<'a>

Source

pub fn get_selection_to_line(&self) -> i32

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

Source

pub fn get_selection_to_line_ex<'a>(&'a self) -> ExGetSelectionToLine<'a>

Source

pub fn get_selection_to_column(&self) -> i32

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

Source

pub fn get_selection_to_column_ex<'a>(&'a self) -> ExGetSelectionToColumn<'a>

Source

pub fn is_caret_after_selection_origin(&self) -> bool

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

Source

pub fn is_caret_after_selection_origin_ex<'a>( &'a self, ) -> ExIsCaretAfterSelectionOrigin<'a>

Source

pub fn deselect(&mut self)

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

Source

pub fn deselect_ex<'a>(&'a mut self) -> ExDeselect<'a>

Source

pub fn delete_selection(&mut self)

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

Source

pub fn delete_selection_ex<'a>(&'a mut self) -> ExDeleteSelection<'a>

Source

pub fn set_line_wrapping_mode(&mut self, mode: LineWrappingMode)

Source

pub fn get_line_wrapping_mode(&self) -> LineWrappingMode

Source

pub fn set_autowrap_mode(&mut self, autowrap_mode: AutowrapMode)

Source

pub fn get_autowrap_mode(&self) -> AutowrapMode

Source

pub fn is_line_wrapped(&self, line: i32) -> bool

Source

pub fn get_line_wrap_count(&self, line: i32) -> i32

Source

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

Source

pub fn get_line_wrapped_text(&self, line: i32) -> PackedStringArray

Source

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

Source

pub fn is_smooth_scroll_enabled(&self) -> bool

Source

pub fn get_v_scroll_bar(&self) -> Option<Gd<VScrollBar>>

Source

pub fn get_h_scroll_bar(&self) -> Option<Gd<HScrollBar>>

Source

pub fn set_v_scroll(&mut self, value: f64)

Source

pub fn get_v_scroll(&self) -> f64

Source

pub fn set_h_scroll(&mut self, value: i32)

Source

pub fn get_h_scroll(&self) -> i32

Source

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

Source

pub fn is_scroll_past_end_of_file_enabled(&self) -> bool

Source

pub fn set_v_scroll_speed(&mut self, speed: f32)

Source

pub fn get_v_scroll_speed(&self) -> f32

Source

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

Source

pub fn is_fit_content_height_enabled(&self) -> bool

Source

pub fn get_scroll_pos_for_line(&self, line: i32) -> f64

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

Source

pub fn get_scroll_pos_for_line_ex<'a>( &'a self, line: i32, ) -> ExGetScrollPosForLine<'a>

Source

pub fn set_line_as_first_visible(&mut self, line: i32)

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

Source

pub fn set_line_as_first_visible_ex<'a>( &'a mut self, line: i32, ) -> ExSetLineAsFirstVisible<'a>

Source

pub fn get_first_visible_line(&self) -> i32

Source

pub fn set_line_as_center_visible(&mut self, line: i32)

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

Source

pub fn set_line_as_center_visible_ex<'a>( &'a mut self, line: i32, ) -> ExSetLineAsCenterVisible<'a>

Source

pub fn set_line_as_last_visible(&mut self, line: i32)

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

Source

pub fn set_line_as_last_visible_ex<'a>( &'a mut self, line: i32, ) -> ExSetLineAsLastVisible<'a>

Source

pub fn get_last_full_visible_line(&self) -> i32

Source

pub fn get_last_full_visible_line_wrap_index(&self) -> i32

Source

pub fn get_visible_line_count(&self) -> i32

Source

pub fn get_visible_line_count_in_range( &self, from_line: i32, to_line: i32, ) -> i32

Source

pub fn get_total_visible_line_count(&self) -> i32

Source

pub fn adjust_viewport_to_caret(&mut self)

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

Source

pub fn adjust_viewport_to_caret_ex<'a>( &'a mut self, ) -> ExAdjustViewportToCaret<'a>

Source

pub fn center_viewport_to_caret(&mut self)

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

Source

pub fn center_viewport_to_caret_ex<'a>( &'a mut self, ) -> ExCenterViewportToCaret<'a>

Source

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

Source

pub fn is_drawing_minimap(&self) -> bool

Source

pub fn set_minimap_width(&mut self, width: i32)

Source

pub fn get_minimap_width(&self) -> i32

Source

pub fn get_minimap_visible_lines(&self) -> i32

Source

pub fn add_gutter(&mut self)

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

Source

pub fn add_gutter_ex<'a>(&'a mut self) -> ExAddGutter<'a>

Source

pub fn remove_gutter(&mut self, gutter: i32)

Source

pub fn get_gutter_count(&self) -> i32

Source

pub fn set_gutter_name(&mut self, gutter: i32, name: impl AsArg<GString>)

Source

pub fn get_gutter_name(&self, gutter: i32) -> GString

Source

pub fn set_gutter_type(&mut self, gutter: i32, type_: GutterType)

Source

pub fn get_gutter_type(&self, gutter: i32) -> GutterType

Source

pub fn set_gutter_width(&mut self, gutter: i32, width: i32)

Source

pub fn get_gutter_width(&self, gutter: i32) -> i32

Source

pub fn set_gutter_draw(&mut self, gutter: i32, draw: bool)

Source

pub fn is_gutter_drawn(&self, gutter: i32) -> bool

Source

pub fn set_gutter_clickable(&mut self, gutter: i32, clickable: bool)

Source

pub fn is_gutter_clickable(&self, gutter: i32) -> bool

Source

pub fn set_gutter_overwritable(&mut self, gutter: i32, overwritable: bool)

Source

pub fn is_gutter_overwritable(&self, gutter: i32) -> bool

Source

pub fn merge_gutters(&mut self, from_line: i32, to_line: i32)

Source

pub fn set_gutter_custom_draw(&mut self, column: i32, draw_callback: &Callable)

Source

pub fn get_total_gutter_width(&self) -> i32

Source

pub fn set_line_gutter_metadata( &mut self, line: i32, gutter: i32, metadata: &Variant, )

Source

pub fn get_line_gutter_metadata(&self, line: i32, gutter: i32) -> Variant

Source

pub fn set_line_gutter_text( &mut self, line: i32, gutter: i32, text: impl AsArg<GString>, )

Source

pub fn get_line_gutter_text(&self, line: i32, gutter: i32) -> GString

Source

pub fn set_line_gutter_icon( &mut self, line: i32, gutter: i32, icon: impl AsObjectArg<Texture2D>, )

Source

pub fn get_line_gutter_icon( &self, line: i32, gutter: i32, ) -> Option<Gd<Texture2D>>

Source

pub fn set_line_gutter_item_color( &mut self, line: i32, gutter: i32, color: Color, )

Source

pub fn get_line_gutter_item_color(&self, line: i32, gutter: i32) -> Color

Source

pub fn set_line_gutter_clickable( &mut self, line: i32, gutter: i32, clickable: bool, )

Source

pub fn is_line_gutter_clickable(&self, line: i32, gutter: i32) -> bool

Source

pub fn set_line_background_color(&mut self, line: i32, color: Color)

Source

pub fn get_line_background_color(&self, line: i32) -> Color

Source

pub fn set_syntax_highlighter( &mut self, syntax_highlighter: impl AsObjectArg<SyntaxHighlighter>, )

Source

pub fn get_syntax_highlighter(&self) -> Option<Gd<SyntaxHighlighter>>

Source

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

Source

pub fn is_highlight_current_line_enabled(&self) -> bool

Source

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

Source

pub fn is_highlight_all_occurrences_enabled(&self) -> bool

Source

pub fn get_draw_control_chars(&self) -> bool

Source

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

Source

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

Source

pub fn is_drawing_tabs(&self) -> bool

Source

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

Source

pub fn is_drawing_spaces(&self) -> bool

Source

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

Source

pub fn is_menu_visible(&self) -> bool

Source

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

Source

pub fn adjust_carets_after_edit( &mut self, caret: i32, from_line: i32, from_col: i32, to_line: i32, to_col: i32, )

Source

pub fn get_caret_index_edit_order(&mut self) -> PackedInt32Array

Source

pub fn get_selection_line(&self) -> i32

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

Source

pub fn get_selection_line_ex<'a>(&'a self) -> ExGetSelectionLine<'a>

Source

pub fn get_selection_column(&self) -> i32

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

Source

pub fn get_selection_column_ex<'a>(&'a self) -> ExGetSelectionColumn<'a>

Methods from Deref<Target = Control>§

Source

pub fn accept_event(&mut self)

Source

pub fn get_minimum_size(&self) -> Vector2

Source

pub fn get_combined_minimum_size(&self) -> Vector2

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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

Source

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

Source

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

Source

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.

Source

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

Source

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

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

pub fn reset_size(&mut self)

Source

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

Source

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.

Source

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

Source

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

Source

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

Source

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

Source

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

Source

pub fn get_begin(&self) -> Vector2

Source

pub fn get_end(&self) -> Vector2

Source

pub fn get_position(&self) -> Vector2

Source

pub fn get_size(&self) -> Vector2

Source

pub fn get_rotation(&self) -> f32

Source

pub fn get_rotation_degrees(&self) -> f32

Source

pub fn get_scale(&self) -> Vector2

Source

pub fn get_pivot_offset(&self) -> Vector2

Source

pub fn get_custom_minimum_size(&self) -> Vector2

Source

pub fn get_parent_area_size(&self) -> Vector2

Source

pub fn get_global_position(&self) -> Vector2

Source

pub fn get_screen_position(&self) -> Vector2

Source

pub fn get_rect(&self) -> Rect2

Source

pub fn get_global_rect(&self) -> Rect2

Source

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

Source

pub fn get_focus_mode(&self) -> FocusMode

Source

pub fn has_focus(&self) -> bool

Source

pub fn grab_focus(&mut self)

Source

pub fn release_focus(&mut self)

Source

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

Source

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

Source

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

Source

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

Source

pub fn get_h_size_flags(&self) -> SizeFlags

Source

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

Source

pub fn get_stretch_ratio(&self) -> f32

Source

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

Source

pub fn get_v_size_flags(&self) -> SizeFlags

Source

pub fn set_theme(&mut self, theme: impl AsObjectArg<Theme>)

Source

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

Source

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

Source

pub fn get_theme_type_variation(&self) -> StringName

Source

pub fn begin_bulk_theme_override(&mut self)

Source

pub fn end_bulk_theme_override(&mut self)

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

pub fn get_theme_default_base_scale(&self) -> f32

Source

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

Source

pub fn get_theme_default_font_size(&self) -> i32

Source

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

Source

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

Source

pub fn get_h_grow_direction(&self) -> GrowDirection

Source

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

Source

pub fn get_v_grow_direction(&self) -> GrowDirection

Source

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

Source

pub fn get_tooltip_text(&self) -> GString

Source

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.

Source

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

Source

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

Source

pub fn get_default_cursor_shape(&self) -> CursorShape

Source

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.

Source

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

Source

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

Source

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

Source

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

Source

pub fn get_focus_next(&self) -> NodePath

Source

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

Source

pub fn get_focus_previous(&self) -> NodePath

Source

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

Source

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

Source

pub fn get_mouse_filter(&self) -> MouseFilter

Source

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

Source

pub fn is_force_pass_scroll_events(&self) -> bool

Source

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

Source

pub fn is_clipping_contents(&mut self) -> bool

Source

pub fn grab_click_focus(&mut self)

Source

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

Source

pub fn set_drag_preview(&mut self, control: impl AsObjectArg<Control>)

Source

pub fn is_drag_successful(&self) -> bool

Source

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

Source

pub fn set_shortcut_context(&mut self, node: impl AsObjectArg<Node>)

Source

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

Source

pub fn update_minimum_size(&mut self)

Source

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

Source

pub fn get_layout_direction(&self) -> LayoutDirection

Source

pub fn is_layout_rtl(&self) -> bool

Source

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

Source

pub fn is_auto_translating(&self) -> bool

Source

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

Source

pub fn is_localizing_numeral_system(&self) -> bool

Source

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.

Source

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>§

Source

pub fn get_canvas_item(&self) -> Rid

Source

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

Source

pub fn is_visible(&self) -> bool

Source

pub fn is_visible_in_tree(&self) -> bool

Source

pub fn show(&mut self)

Source

pub fn hide(&mut self)

Source

pub fn queue_redraw(&mut self)

Source

pub fn move_to_front(&mut self)

Source

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

Source

pub fn is_set_as_top_level(&self) -> bool

Source

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

Source

pub fn get_light_mask(&self) -> i32

Source

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

Source

pub fn get_modulate(&self) -> Color

Source

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

Source

pub fn get_self_modulate(&self) -> Color

Source

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

Source

pub fn get_z_index(&self) -> i32

Source

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

Source

pub fn is_z_relative(&self) -> bool

Source

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

Source

pub fn is_y_sort_enabled(&self) -> bool

Source

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

Source

pub fn is_draw_behind_parent_enabled(&self) -> bool

Source

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.

Source

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

Source

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.

Source

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

Source

pub fn draw_polyline(&mut self, points: &PackedVector2Array, color: Color)

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

Source

pub fn draw_polyline_ex<'a>( &'a mut self, points: &'a PackedVector2Array, color: Color, ) -> ExDrawPolyline<'a>

Source

pub fn draw_polyline_colors( &mut self, points: &PackedVector2Array, colors: &PackedColorArray, )

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

Source

pub fn draw_polyline_colors_ex<'a>( &'a mut self, points: &'a PackedVector2Array, colors: &'a PackedColorArray, ) -> ExDrawPolylineColors<'a>

Source

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.

Source

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

Source

pub fn draw_multiline(&mut self, points: &PackedVector2Array, color: Color)

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

Source

pub fn draw_multiline_ex<'a>( &'a mut self, points: &'a PackedVector2Array, color: Color, ) -> ExDrawMultiline<'a>

Source

pub fn draw_multiline_colors( &mut self, points: &PackedVector2Array, colors: &PackedColorArray, )

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

Source

pub fn draw_multiline_colors_ex<'a>( &'a mut self, points: &'a PackedVector2Array, colors: &'a PackedColorArray, ) -> ExDrawMultilineColors<'a>

Source

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.

Source

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

Source

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.

Source

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

Source

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

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

Source

pub fn draw_texture_ex<'a>( &'a mut self, texture: impl AsObjectArg<Texture2D>, position: Vector2, ) -> ExDrawTexture<'a>

Source

pub fn draw_texture_rect( &mut self, texture: impl AsObjectArg<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.

Source

pub fn draw_texture_rect_ex<'a>( &'a mut self, texture: impl AsObjectArg<Texture2D>, rect: Rect2, tile: bool, ) -> ExDrawTextureRect<'a>

Source

pub fn draw_texture_rect_region( &mut self, texture: impl AsObjectArg<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.

Source

pub fn draw_texture_rect_region_ex<'a>( &'a mut self, texture: impl AsObjectArg<Texture2D>, rect: Rect2, src_rect: Rect2, ) -> ExDrawTextureRectRegion<'a>

Source

pub fn draw_msdf_texture_rect_region( &mut self, texture: impl AsObjectArg<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.

Source

pub fn draw_msdf_texture_rect_region_ex<'a>( &'a mut self, texture: impl AsObjectArg<Texture2D>, rect: Rect2, src_rect: Rect2, ) -> ExDrawMsdfTextureRectRegion<'a>

Source

pub fn draw_lcd_texture_rect_region( &mut self, texture: impl AsObjectArg<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.

Source

pub fn draw_lcd_texture_rect_region_ex<'a>( &'a mut self, texture: impl AsObjectArg<Texture2D>, rect: Rect2, src_rect: Rect2, ) -> ExDrawLcdTextureRectRegion<'a>

Source

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

Source

pub fn draw_primitive( &mut self, points: &PackedVector2Array, colors: &PackedColorArray, uvs: &PackedVector2Array, )

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

Source

pub fn draw_primitive_ex<'a>( &'a mut self, points: &'a PackedVector2Array, colors: &'a PackedColorArray, uvs: &'a PackedVector2Array, ) -> ExDrawPrimitive<'a>

Source

pub fn draw_polygon( &mut self, points: &PackedVector2Array, colors: &PackedColorArray, )

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

Source

pub fn draw_polygon_ex<'a>( &'a mut self, points: &'a PackedVector2Array, colors: &'a PackedColorArray, ) -> ExDrawPolygon<'a>

Source

pub fn draw_colored_polygon( &mut self, points: &PackedVector2Array, color: Color, )

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

Source

pub fn draw_colored_polygon_ex<'a>( &'a mut self, points: &'a PackedVector2Array, color: Color, ) -> ExDrawColoredPolygon<'a>

Source

pub fn draw_string( &self, font: impl AsObjectArg<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.

Source

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

Source

pub fn draw_multiline_string( &self, font: impl AsObjectArg<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.

Source

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

Source

pub fn draw_string_outline( &self, font: impl AsObjectArg<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.

Source

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

Source

pub fn draw_multiline_string_outline( &self, font: impl AsObjectArg<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.

Source

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

Source

pub fn draw_char( &self, font: impl AsObjectArg<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.

Source

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

Source

pub fn draw_char_outline( &self, font: impl AsObjectArg<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.

Source

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

Source

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

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

Source

pub fn draw_mesh_ex<'a>( &'a mut self, mesh: impl AsObjectArg<Mesh>, texture: impl AsObjectArg<Texture2D>, ) -> ExDrawMesh<'a>

Source

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

Source

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.

Source

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

Source

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

Source

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.

Source

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

Source

pub fn draw_end_animation(&mut self)

Source

pub fn get_transform(&self) -> Transform2D

Source

pub fn get_global_transform(&self) -> Transform2D

Source

pub fn get_global_transform_with_canvas(&self) -> Transform2D

Source

pub fn get_viewport_transform(&self) -> Transform2D

Source

pub fn get_viewport_rect(&self) -> Rect2

Source

pub fn get_canvas_transform(&self) -> Transform2D

Source

pub fn get_screen_transform(&self) -> Transform2D

Source

pub fn get_local_mouse_position(&self) -> Vector2

Source

pub fn get_global_mouse_position(&self) -> Vector2

Source

pub fn get_canvas(&self) -> Rid

Source

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

Source

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

Source

pub fn set_material(&mut self, material: impl AsObjectArg<Material>)

Source

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

Source

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

Source

pub fn get_use_parent_material(&self) -> bool

Source

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

Source

pub fn is_local_transform_notification_enabled(&self) -> bool

Source

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

Source

pub fn is_transform_notification_enabled(&self) -> bool

Source

pub fn force_update_transform(&mut self)

Source

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

Source

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

Source

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

Source

pub fn get_visibility_layer(&self) -> u32

Source

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

Source

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

Source

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

Source

pub fn get_texture_filter(&self) -> TextureFilter

Source

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

Source

pub fn get_texture_repeat(&self) -> TextureRepeat

Source

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

Source

pub fn get_clip_children_mode(&self) -> ClipChildrenMode

Source

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.

Source

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>§

Source

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.

Source

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.

Source

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

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

Source

pub fn add_sibling_ex<'a>( &'a mut self, sibling: impl AsObjectArg<Node>, ) -> ExAddSibling<'a>

Source

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

Source

pub fn get_name(&self) -> StringName

Source

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

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

Source

pub fn add_child_ex<'a>( &'a mut self, node: impl AsObjectArg<Node>, ) -> ExAddChild<'a>

Source

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

Source

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

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

Source

pub fn reparent_ex<'a>( &'a mut self, new_parent: impl AsObjectArg<Node>, ) -> ExReparent<'a>

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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

Source

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

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

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

Source

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

Source

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

Source

pub fn is_inside_tree(&self) -> bool

Source

pub fn is_part_of_edited_scene(&self) -> bool

Source

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

Source

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

Source

pub fn get_path(&self) -> NodePath

Source

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

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

Source

pub fn get_path_to_ex<'a>( &'a self, node: impl AsObjectArg<Node>, ) -> ExGetPathTo<'a>

Source

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.

Source

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

Source

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

Source

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

Source

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

Source

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

Source

pub fn set_owner(&mut self, owner: impl AsObjectArg<Node>)

Source

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

Source

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.

Source

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

Source

pub fn print_tree(&mut self)

Source

pub fn print_tree_pretty(&mut self)

Source

pub fn get_tree_string(&mut self) -> GString

Source

pub fn get_tree_string_pretty(&mut self) -> GString

Source

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

Source

pub fn get_scene_file_path(&self) -> GString

Source

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

Source

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.

Source

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

Source

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

Source

pub fn get_physics_process_delta_time(&self) -> f64

Source

pub fn is_physics_processing(&self) -> bool

Source

pub fn get_process_delta_time(&self) -> f64

Source

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

Source

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

Source

pub fn get_process_priority(&self) -> i32

Source

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

Source

pub fn get_physics_process_priority(&self) -> i32

Source

pub fn is_processing(&self) -> bool

Source

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

Source

pub fn is_processing_input(&self) -> bool

Source

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

Source

pub fn is_processing_shortcut_input(&self) -> bool

Source

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

Source

pub fn is_processing_unhandled_input(&self) -> bool

Source

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

Source

pub fn is_processing_unhandled_key_input(&self) -> bool

Source

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

Source

pub fn get_process_mode(&self) -> ProcessMode

Source

pub fn can_process(&self) -> bool

Source

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

Source

pub fn get_process_thread_group(&self) -> ProcessThreadGroup

Source

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

Source

pub fn get_process_thread_messages(&self) -> ProcessThreadMessages

Source

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

Source

pub fn get_process_thread_group_order(&self) -> i32

Source

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

Source

pub fn is_displayed_folded(&self) -> bool

Source

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

Source

pub fn is_processing_internal(&self) -> bool

Source

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

Source

pub fn is_physics_processing_internal(&self) -> bool

Source

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

Source

pub fn get_physics_interpolation_mode(&self) -> PhysicsInterpolationMode

Source

pub fn is_physics_interpolated(&self) -> bool

Source

pub fn is_physics_interpolated_and_enabled(&self) -> bool

Source

pub fn reset_physics_interpolation(&mut self)

Source

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

Source

pub fn get_auto_translate_mode(&self) -> AutoTranslateMode

Source

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

Source

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

Source

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

Source

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

Source

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

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

Source

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

Source

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

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

Source

pub fn replace_by_ex<'a>( &'a mut self, node: impl AsObjectArg<Node>, ) -> ExReplaceBy<'a>

Source

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

Source

pub fn get_scene_instance_load_placeholder(&self) -> bool

Source

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

Source

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

Source

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

Source

pub fn queue_free(&mut self)

Source

pub fn request_ready(&mut self)

Source

pub fn is_node_ready(&self) -> bool

Source

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.

Source

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

Source

pub fn get_multiplayer_authority(&self) -> i32

Source

pub fn is_multiplayer_authority(&self) -> bool

Source

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

Source

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

Source

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

Source

pub fn get_editor_description(&self) -> GString

Source

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

Source

pub fn is_unique_name_in_owner(&self) -> bool

Source

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.

Source

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

Source

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.

Source

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

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn update_configuration_warnings(&mut self)

Source

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.

Source

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.

Source

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

Source

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

Source

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.

Source

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.

Source

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

Source

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

Source

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.

Source

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>§

Source

pub fn get_class(&self) -> GString

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

pub fn set_script(&mut self, script: &Variant)

Source

pub fn get_script(&self) -> Variant

Source

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

Source

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

Source

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.

Source

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

Source

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

Source

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

Source

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.

Source

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

Source

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

Source

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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

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

Source

pub fn connect_ex<'a>( &'a mut self, signal: impl AsArg<StringName> + 'a, callable: &'a Callable, ) -> ExConnect<'a>

Source

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

Source

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

Source

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

Source

pub fn is_blocking_signals(&self) -> bool

Source

pub fn notify_property_list_changed(&mut self)

Source

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

Source

pub fn can_translate_messages(&self) -> bool

Source

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.

Source

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

Source

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.

Source

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

Source

pub fn is_queued_for_deletion(&self) -> bool

Source

pub fn cancel_free(&mut self)

Source

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.

Source

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§

Source§

impl Bounds for TextEdit

Source§

type Memory = MemManual

Defines the memory strategy of the static type.
Source§

type Declarer = DeclEngine

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

impl Debug for TextEdit

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Deref for TextEdit

Source§

type Target = Control

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl DerefMut for TextEdit

Source§

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

Mutably dereferences the value.
Source§

impl GodotClass for TextEdit

Source§

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

Initialization level, during which this class should be initialized with Godot. Read more
Source§

type Base = Control

The immediate superclass of T. This is always a Godot engine class.
Source§

fn class_name() -> ClassName

The name of the class, under which it is registered in Godot. Read more
Source§

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

Returns whether Self inherits from U. Read more
Source§

impl GodotDefault for TextEdit

Source§

impl Inherits<CanvasItem> for TextEdit

Source§

impl Inherits<Control> for TextEdit

Source§

impl Inherits<Node> for TextEdit

Source§

impl Inherits<Object> for TextEdit

Source§

impl Inherits<TextEdit> for CodeEdit

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.

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.

Source§

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

Source§

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.
Source§

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