pub trait CaretMethods: WxRustMethods {
Show 17 methods
// Provided methods
fn create_int<W: WindowMethods>(
&self,
window: Option<&W>,
width: c_int,
height: c_int,
) -> bool { ... }
fn create_size<W: WindowMethods, S: SizeMethods>(
&self,
window: Option<&W>,
size: &S,
) -> bool { ... }
fn get_position_int(&self, x: *mut c_void, y: *mut c_void) { ... }
fn get_position(&self) -> Point { ... }
fn get_size_int(&self, width: *mut c_void, height: *mut c_void) { ... }
fn get_size(&self) -> Size { ... }
fn get_window(&self) -> WeakRef<Window> { ... }
fn hide(&self) { ... }
fn is_ok(&self) -> bool { ... }
fn is_visible(&self) -> bool { ... }
fn move_int(&self, x: c_int, y: c_int) { ... }
fn move_point<P: PointMethods>(&self, pt: &P) { ... }
fn set_size_int(&self, width: c_int, height: c_int) { ... }
fn set_size_size<S: SizeMethods>(&self, size: &S) { ... }
fn show(&self, show: bool) { ... }
fn get_blink_time() -> c_int { ... }
fn set_blink_time(milliseconds: c_int) { ... }
}
Expand description
This trait represents C++ wxCaret
class’s methods and inheritance.
See CaretIsOwned
documentation for the class usage.
Provided Methods§
Sourcefn create_int<W: WindowMethods>(
&self,
window: Option<&W>,
width: c_int,
height: c_int,
) -> bool
fn create_int<W: WindowMethods>( &self, window: Option<&W>, width: c_int, height: c_int, ) -> bool
Creates a caret with the given size (in pixels) and associates it with the window (same as the equivalent constructors).
Sourcefn create_size<W: WindowMethods, S: SizeMethods>(
&self,
window: Option<&W>,
size: &S,
) -> bool
fn create_size<W: WindowMethods, S: SizeMethods>( &self, window: Option<&W>, size: &S, ) -> bool
Sourcefn get_position(&self) -> Point
fn get_position(&self) -> Point
Sourcefn get_window(&self) -> WeakRef<Window>
fn get_window(&self) -> WeakRef<Window>
Get the window the caret is associated with.
Sourcefn is_visible(&self) -> bool
fn is_visible(&self) -> bool
Returns true if the caret is visible and false if it is permanently hidden (if it is blinking and not shown currently but will be after the next blink, this method still returns true).
Sourcefn move_int(&self, x: c_int, y: c_int)
fn move_int(&self, x: c_int, y: c_int)
Move the caret to given position (in logical coordinates).
Sourcefn move_point<P: PointMethods>(&self, pt: &P)
fn move_point<P: PointMethods>(&self, pt: &P)
Sourcefn set_size_int(&self, width: c_int, height: c_int)
fn set_size_int(&self, width: c_int, height: c_int)
Changes the size of the caret.
Sourcefn set_size_size<S: SizeMethods>(&self, size: &S)
fn set_size_size<S: SizeMethods>(&self, size: &S)
Sourcefn get_blink_time() -> c_int
fn get_blink_time() -> c_int
Returns the blink time which is measured in milliseconds and is the time elapsed between 2 inversions of the caret (blink time of the caret is the same for all carets, so this functions is static).
Sourcefn set_blink_time(milliseconds: c_int)
fn set_blink_time(milliseconds: c_int)
Sets the blink time for all the carets.
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.