Trait SizeMethods

Source
pub trait SizeMethods: WxRustMethods {
Show 18 methods // Provided methods fn dec_by_point<P: PointMethods>(&self, pt: &P) { ... } fn dec_by_size<S: SizeMethods>(&self, size: &S) { ... } fn dec_by_int_int(&self, dx: c_int, dy: c_int) { ... } fn dec_by_int(&self, d: c_int) { ... } fn dec_to<S: SizeMethods>(&self, size: &S) { ... } fn dec_to_if_specified<S: SizeMethods>(&self, size: &S) { ... } fn get_height(&self) -> c_int { ... } fn get_width(&self) -> c_int { ... } fn inc_by_point<P: PointMethods>(&self, pt: &P) { ... } fn inc_by_size<S: SizeMethods>(&self, size: &S) { ... } fn inc_by_int_int(&self, dx: c_int, dy: c_int) { ... } fn inc_by_int(&self, d: c_int) { ... } fn inc_to<S: SizeMethods>(&self, size: &S) { ... } fn is_fully_specified(&self) -> bool { ... } fn set(&self, width: c_int, height: c_int) { ... } fn set_defaults<S: SizeMethods>(&self, size_default: &S) { ... } fn set_height(&self, height: c_int) { ... } fn set_width(&self, width: c_int) { ... }
}
Expand description

This trait represents C++ wxSize class’s methods and inheritance.

See SizeIsOwned documentation for the class usage.

Provided Methods§

Source

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

Decreases the size in both x and y directions.

See C++ wxSize::DecBy()’s documentation.

Source

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

Source

fn dec_by_int_int(&self, dx: c_int, dy: c_int)

Source

fn dec_by_int(&self, d: c_int)

Source

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

Decrements this object so that both of its dimensions are not greater than the corresponding dimensions of the size.

See C++ wxSize::DecTo()’s documentation.

Source

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

Decrements this object to be not bigger than the given size ignoring non-specified components.

See C++ wxSize::DecToIfSpecified()’s documentation.

Source

fn get_height(&self) -> c_int

Gets the height member.

See C++ wxSize::GetHeight()’s documentation.

Source

fn get_width(&self) -> c_int

Gets the width member.

See C++ wxSize::GetWidth()’s documentation.

Source

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

Increases the size in both x and y directions.

See C++ wxSize::IncBy()’s documentation.

Source

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

Source

fn inc_by_int_int(&self, dx: c_int, dy: c_int)

Source

fn inc_by_int(&self, d: c_int)

Source

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

Increments this object so that both of its dimensions are not less than the corresponding dimensions of the size.

See C++ wxSize::IncTo()’s documentation.

Source

fn is_fully_specified(&self) -> bool

Returns true if neither of the size object components is equal to -1, which is used as default for the size values in wxWidgets (hence the predefined wxDefaultSize has both of its components equal to -1).

See C++ wxSize::IsFullySpecified()’s documentation.

Source

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

Sets the width and height members.

See C++ wxSize::Set()’s documentation.

Source

fn set_defaults<S: SizeMethods>(&self, size_default: &S)

Combine this size object with another one replacing the default (i.e. equal to -1) components of this object with those of the other.

See C++ wxSize::SetDefaults()’s documentation.

Source

fn set_height(&self, height: c_int)

Source

fn set_width(&self, width: c_int)

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> SizeMethods for SizeIsOwned<OWNED>