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§
Sourcefn dec_by_point<P: PointMethods>(&self, pt: &P)
fn dec_by_point<P: PointMethods>(&self, pt: &P)
Decreases the size in both x and y directions.
Sourcefn dec_by_size<S: SizeMethods>(&self, size: &S)
fn dec_by_size<S: SizeMethods>(&self, size: &S)
Sourcefn dec_by_int_int(&self, dx: c_int, dy: c_int)
fn dec_by_int_int(&self, dx: c_int, dy: c_int)
Sourcefn dec_by_int(&self, d: c_int)
fn dec_by_int(&self, d: c_int)
Sourcefn dec_to<S: SizeMethods>(&self, size: &S)
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.
Sourcefn dec_to_if_specified<S: SizeMethods>(&self, size: &S)
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.
Sourcefn get_height(&self) -> c_int
fn get_height(&self) -> c_int
Gets the height member.
Sourcefn inc_by_point<P: PointMethods>(&self, pt: &P)
fn inc_by_point<P: PointMethods>(&self, pt: &P)
Increases the size in both x and y directions.
Sourcefn inc_by_size<S: SizeMethods>(&self, size: &S)
fn inc_by_size<S: SizeMethods>(&self, size: &S)
Sourcefn inc_by_int_int(&self, dx: c_int, dy: c_int)
fn inc_by_int_int(&self, dx: c_int, dy: c_int)
Sourcefn inc_by_int(&self, d: c_int)
fn inc_by_int(&self, d: c_int)
Sourcefn inc_to<S: SizeMethods>(&self, size: &S)
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.
Sourcefn is_fully_specified(&self) -> bool
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).
Sourcefn set_defaults<S: SizeMethods>(&self, size_default: &S)
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.
Sourcefn set_height(&self, height: c_int)
fn set_height(&self, height: c_int)
Sets the height.
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.