CaretMethods

Trait CaretMethods 

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

Source

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).

See C++ wxCaret::Create()’s documentation.

Source

fn create_size<W: WindowMethods, S: SizeMethods>( &self, window: Option<&W>, size: &S, ) -> bool

Source

fn get_position_int(&self, x: *mut c_void, y: *mut c_void)

Get the caret position (in pixels).

See C++ wxCaret::GetPosition()’s documentation.

Source

fn get_position(&self) -> Point

Source

fn get_size_int(&self, width: *mut c_void, height: *mut c_void)

Source

fn get_size(&self) -> Size

Source

fn get_window(&self) -> WeakRef<Window>

Get the window the caret is associated with.

See C++ wxCaret::GetWindow()’s documentation.

Source

fn hide(&self)

Hides the caret, same as Show(false).

See C++ wxCaret::Hide()’s documentation.

Source

fn is_ok(&self) -> bool

Returns true if the caret was created successfully.

See C++ wxCaret::IsOk()’s documentation.

Source

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).

See C++ wxCaret::IsVisible()’s documentation.

Source

fn move_int(&self, x: c_int, y: c_int)

Move the caret to given position (in logical coordinates).

See C++ wxCaret::Move()’s documentation.

Source

fn move_point<P: PointMethods>(&self, pt: &P)

Source

fn set_size_int(&self, width: c_int, height: c_int)

Changes the size of the caret.

See C++ wxCaret::SetSize()’s documentation.

Source

fn set_size_size<S: SizeMethods>(&self, size: &S)

Source

fn show(&self, show: bool)

Shows or hides the caret.

See C++ wxCaret::Show()’s documentation.

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).

See C++ wxCaret::GetBlinkTime()’s documentation.

Sets the blink time for all the carets.

See C++ wxCaret::SetBlinkTime()’s documentation.

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.

Implementors§

Source§

impl<const OWNED: bool> CaretMethods for CaretIsOwned<OWNED>