pub trait TextEntryMethods: WxRustMethods {
Show 41 methods
// Provided methods
fn as_text_entry(&self) -> *mut c_void { ... }
fn append_text(&self, text: &str) { ... }
fn auto_complete_arraystring<A: ArrayStringMethods>(
&self,
choices: &A,
) -> bool { ... }
fn auto_complete_textcompleter(&self, completer: *mut c_void) -> bool { ... }
fn auto_complete_file_names(&self) -> bool { ... }
fn auto_complete_directories(&self) -> bool { ... }
fn can_copy(&self) -> bool { ... }
fn can_cut(&self) -> bool { ... }
fn can_paste(&self) -> bool { ... }
fn can_redo(&self) -> bool { ... }
fn can_undo(&self) -> bool { ... }
fn change_value(&self, value: &str) { ... }
fn clear(&self) { ... }
fn copy(&self) { ... }
fn cut(&self) { ... }
fn force_upper(&self) { ... }
fn get_insertion_point(&self) -> c_long { ... }
fn get_range(&self, from: c_long, to: c_long) -> String { ... }
fn get_selection_long(&self, from: *mut c_void, to: *mut c_void) { ... }
fn get_string_selection(&self) -> String { ... }
fn get_value(&self) -> String { ... }
fn is_editable(&self) -> bool { ... }
fn is_empty(&self) -> bool { ... }
fn paste(&self) { ... }
fn redo(&self) { ... }
fn remove(&self, from: c_long, to: c_long) { ... }
fn replace(&self, from: c_long, to: c_long, value: &str) { ... }
fn set_editable(&self, editable: bool) { ... }
fn set_insertion_point(&self, pos: c_long) { ... }
fn set_insertion_point_end(&self) { ... }
fn set_selection_long(&self, from: c_long, to: c_long) { ... }
fn select_all(&self) { ... }
fn select_none(&self) { ... }
fn set_hint(&self, hint: &str) -> bool { ... }
fn get_hint(&self) -> String { ... }
fn set_margins_point<P: PointMethods>(&self, pt: &P) -> bool { ... }
fn set_margins_coord(&self, left: c_int, top: c_int) -> bool { ... }
fn get_margins(&self) -> Point { ... }
fn set_value(&self, value: &str) { ... }
fn undo(&self) { ... }
fn write_text(&self, text: &str) { ... }
}
Expand description
This trait represents C++ wxTextEntry
class’s methods and inheritance.
See TextEntryIsOwned
documentation for the class usage.
Provided Methods§
fn as_text_entry(&self) -> *mut c_void
Sourcefn append_text(&self, text: &str)
fn append_text(&self, text: &str)
Appends the text to the end of the text control.
Sourcefn auto_complete_arraystring<A: ArrayStringMethods>(&self, choices: &A) -> bool
fn auto_complete_arraystring<A: ArrayStringMethods>(&self, choices: &A) -> bool
Call this function to enable auto-completion of the text typed in a single-line text control using the given choices.
Sourcefn auto_complete_textcompleter(&self, completer: *mut c_void) -> bool
fn auto_complete_textcompleter(&self, completer: *mut c_void) -> bool
Enable auto-completion using the provided completer object.
Sourcefn auto_complete_file_names(&self) -> bool
fn auto_complete_file_names(&self) -> bool
Call this function to enable auto-completion of the text typed in a single-line text control using all valid file system paths.
See C++ wxTextEntry::AutoCompleteFileNames()
’s documentation.
Sourcefn auto_complete_directories(&self) -> bool
fn auto_complete_directories(&self) -> bool
Call this function to enable auto-completion of the text using the file system directories.
See C++ wxTextEntry::AutoCompleteDirectories()
’s documentation.
Sourcefn can_paste(&self) -> bool
fn can_paste(&self) -> bool
Returns true if the contents of the clipboard can be pasted into the text control.
Sourcefn can_redo(&self) -> bool
fn can_redo(&self) -> bool
Returns true if there is a redo facility available and the last operation can be redone.
Sourcefn can_undo(&self) -> bool
fn can_undo(&self) -> bool
Returns true if there is an undo facility available and the last operation can be undone.
Sourcefn change_value(&self, value: &str)
fn change_value(&self, value: &str)
Sets the new text control value.
Sourcefn force_upper(&self)
fn force_upper(&self)
Convert all text entered into the control to upper case.
Sourcefn get_insertion_point(&self) -> c_long
fn get_insertion_point(&self) -> c_long
Returns the insertion point, or cursor, position.
Sourcefn get_range(&self, from: c_long, to: c_long) -> String
fn get_range(&self, from: c_long, to: c_long) -> String
Returns the string containing the text starting in the positions from and up to to in the control.
Sourcefn get_selection_long(&self, from: *mut c_void, to: *mut c_void)
fn get_selection_long(&self, from: *mut c_void, to: *mut c_void)
Gets the current selection span.
Sourcefn get_string_selection(&self) -> String
fn get_string_selection(&self) -> String
Gets the text currently selected in the control.
Sourcefn is_editable(&self) -> bool
fn is_editable(&self) -> bool
Returns true if the controls contents may be edited by user (note that it always can be changed by the program).
Sourcefn redo(&self)
fn redo(&self)
If there is a redo facility and the last operation can be redone, redoes the last operation.
Sourcefn remove(&self, from: c_long, to: c_long)
fn remove(&self, from: c_long, to: c_long)
Removes the text starting at the first given position up to (but not including) the character at the last position.
Sourcefn replace(&self, from: c_long, to: c_long, value: &str)
fn replace(&self, from: c_long, to: c_long, value: &str)
Replaces the text starting at the first position up to (but not including) the character at the last position with the given text.
Sourcefn set_editable(&self, editable: bool)
fn set_editable(&self, editable: bool)
Makes the text item editable or read-only, overriding the wxTE_READONLY flag.
Sourcefn set_insertion_point(&self, pos: c_long)
fn set_insertion_point(&self, pos: c_long)
Sets the insertion point at the given position.
Sourcefn set_insertion_point_end(&self)
fn set_insertion_point_end(&self)
Sets the insertion point at the end of the text control.
See C++ wxTextEntry::SetInsertionPointEnd()
’s documentation.
Sourcefn set_selection_long(&self, from: c_long, to: c_long)
fn set_selection_long(&self, from: c_long, to: c_long)
Selects the text starting at the first position up to (but not including) the character at the last position.
Sourcefn select_all(&self)
fn select_all(&self)
Selects all text in the control.
Sourcefn select_none(&self)
fn select_none(&self)
Deselects selected text in the control.
Sourcefn set_margins_point<P: PointMethods>(&self, pt: &P) -> bool
fn set_margins_point<P: PointMethods>(&self, pt: &P) -> bool
Attempts to set the control margins.
Sourcefn set_margins_coord(&self, left: c_int, top: c_int) -> bool
fn set_margins_coord(&self, left: c_int, top: c_int) -> bool
Sourcefn get_margins(&self) -> Point
fn get_margins(&self) -> Point
Returns the margins used by the control.
Sourcefn undo(&self)
fn undo(&self)
If there is an undo facility and the last operation can be undone, undoes the last operation.
Sourcefn write_text(&self, text: &str)
fn write_text(&self, text: &str)
Writes the text into the text control at the current insertion position.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.