Trait FontMethods

Source
pub trait FontMethods: GDIObjectMethods {
Show 38 methods // Provided methods fn get_base_font(&self) -> Font { ... } fn get_face_name(&self) -> String { ... } fn get_native_font_info_desc(&self) -> String { ... } fn get_native_font_info_user_desc(&self) -> String { ... } fn get_native_font_info(&self) -> Option<NativeFontInfoIsOwned<false>> { ... } fn get_point_size(&self) -> c_int { ... } fn get_fractional_point_size(&self) -> c_double { ... } fn get_pixel_size(&self) -> Size { ... } fn get_underlined(&self) -> bool { ... } fn get_strikethrough(&self) -> bool { ... } fn get_numeric_weight(&self) -> c_int { ... } fn is_fixed_width(&self) -> bool { ... } fn is_ok(&self) -> bool { ... } fn add_private_font(filename: &str) -> bool { ... } fn bold(&self) -> Font { ... } fn italic(&self) -> Font { ... } fn larger(&self) -> Font { ... } fn smaller(&self) -> Font { ... } fn underlined(&self) -> Font { ... } fn strikethrough(&self) -> Font { ... } fn make_bold(&self) -> &Self { ... } fn make_italic(&self) -> &Self { ... } fn make_larger(&self) -> &Self { ... } fn make_smaller(&self) -> &Self { ... } fn make_underlined(&self) -> &Self { ... } fn make_strikethrough(&self) -> &Self { ... } fn set_face_name(&self, face_name: &str) -> bool { ... } fn set_native_font_info_str(&self, info: &str) -> bool { ... } fn set_native_font_info_user_desc(&self, info: &str) -> bool { ... } fn set_native_font_info_nativefontinfo<N: NativeFontInfoMethods>( &self, info: &N, ) { ... } fn set_point_size(&self, point_size: c_int) { ... } fn set_fractional_point_size(&self, point_size: c_double) { ... } fn set_pixel_size<S: SizeMethods>(&self, pixel_size: &S) { ... } fn set_underlined(&self, underlined: bool) { ... } fn set_strikethrough(&self, strikethrough: bool) { ... } fn set_numeric_weight(&self, weight: c_int) { ... } fn new_nativefontinfo<N: NativeFontInfoMethods>( native_info: &N, ) -> Option<FontIsOwned<false>> { ... } fn new_str(native_info_string: &str) -> Option<FontIsOwned<false>> { ... }
}
Expand description

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

See FontIsOwned documentation for the class usage.

Provided Methods§

Source

fn get_base_font(&self) -> Font

Returns a font with the same face/size as the given one but with normal weight and style and not underlined nor stricken through.

See C++ wxFont::GetBaseFont()’s documentation.

Source

fn get_face_name(&self) -> String

Returns the face name associated with the font, or the empty string if there is no face information.

See C++ wxFont::GetFaceName()’s documentation.

Source

fn get_native_font_info_desc(&self) -> String

Returns the platform-dependent string completely describing this font.

See C++ wxFont::GetNativeFontInfoDesc()’s documentation.

Source

fn get_native_font_info_user_desc(&self) -> String

Returns a user-friendly string for this font object.

See C++ wxFont::GetNativeFontInfoUserDesc()’s documentation.

Source

fn get_native_font_info(&self) -> Option<NativeFontInfoIsOwned<false>>

Returns a font with the same face/size as the given one but with normal weight and style and not underlined nor stricken through.

See C++ wxFont::GetNativeFontInfo()’s documentation.

Source

fn get_point_size(&self) -> c_int

Gets the point size as an integer number.

See C++ wxFont::GetPointSize()’s documentation.

Source

fn get_fractional_point_size(&self) -> c_double

Gets the point size as a floating number.

See C++ wxFont::GetFractionalPointSize()’s documentation.

Source

fn get_pixel_size(&self) -> Size

Source

fn get_underlined(&self) -> bool

Returns true if the font is underlined, false otherwise.

See C++ wxFont::GetUnderlined()’s documentation.

Source

fn get_strikethrough(&self) -> bool

Returns true if the font is stricken-through, false otherwise.

See C++ wxFont::GetStrikethrough()’s documentation.

Source

fn get_numeric_weight(&self) -> c_int

Gets the font weight as an integer value.

See C++ wxFont::GetNumericWeight()’s documentation.

Source

fn is_fixed_width(&self) -> bool

Returns true if the font is a fixed width (or monospaced) font, false if it is a proportional one or font is invalid.

See C++ wxFont::IsFixedWidth()’s documentation.

Source

fn is_ok(&self) -> bool

Returns true if this object is a valid font, false otherwise.

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

Source

fn add_private_font(filename: &str) -> bool

Specify the name of a file containing a TrueType font to be made available to the current application.

See C++ wxFont::AddPrivateFont()’s documentation.

Source

fn bold(&self) -> Font

Returns a bold version of this font.

See C++ wxFont::Bold()’s documentation.

Source

fn italic(&self) -> Font

Returns an italic version of this font.

See C++ wxFont::Italic()’s documentation.

Source

fn larger(&self) -> Font

Returns a larger version of this font.

See C++ wxFont::Larger()’s documentation.

Source

fn smaller(&self) -> Font

Returns a smaller version of this font.

See C++ wxFont::Smaller()’s documentation.

Source

fn underlined(&self) -> Font

Returns underlined version of this font.

See C++ wxFont::Underlined()’s documentation.

Source

fn strikethrough(&self) -> Font

Returns stricken-through version of this font.

See C++ wxFont::Strikethrough()’s documentation.

Source

fn make_bold(&self) -> &Self

Changes this font to be bold.

See C++ wxFont::MakeBold()’s documentation.

Source

fn make_italic(&self) -> &Self

Changes this font to be italic.

See C++ wxFont::MakeItalic()’s documentation.

Source

fn make_larger(&self) -> &Self

Changes this font to be larger.

See C++ wxFont::MakeLarger()’s documentation.

Source

fn make_smaller(&self) -> &Self

Changes this font to be smaller.

See C++ wxFont::MakeSmaller()’s documentation.

Source

fn make_underlined(&self) -> &Self

Changes this font to be underlined.

See C++ wxFont::MakeUnderlined()’s documentation.

Source

fn make_strikethrough(&self) -> &Self

Changes this font to be stricken-through.

See C++ wxFont::MakeStrikethrough()’s documentation.

Source

fn set_face_name(&self, face_name: &str) -> bool

Sets the facename for the font.

See C++ wxFont::SetFaceName()’s documentation.

Source

fn set_native_font_info_str(&self, info: &str) -> bool

Creates the font corresponding to the given native font description string which must have been previously returned by GetNativeFontInfoDesc().

See C++ wxFont::SetNativeFontInfo()’s documentation.

Source

fn set_native_font_info_user_desc(&self, info: &str) -> bool

Creates the font corresponding to the given native font description string and returns true if the creation was successful.

See C++ wxFont::SetNativeFontInfoUserDesc()’s documentation.

Source

fn set_native_font_info_nativefontinfo<N: NativeFontInfoMethods>( &self, info: &N, )

Sets the encoding for this font.

See C++ wxFont::SetNativeFontInfo()’s documentation.

Source

fn set_point_size(&self, point_size: c_int)

Sets the font size in points to an integer value.

See C++ wxFont::SetPointSize()’s documentation.

Source

fn set_fractional_point_size(&self, point_size: c_double)

Sets the font size in points.

See C++ wxFont::SetFractionalPointSize()’s documentation.

Source

fn set_pixel_size<S: SizeMethods>(&self, pixel_size: &S)

Source

fn set_underlined(&self, underlined: bool)

Source

fn set_strikethrough(&self, strikethrough: bool)

Sets strike-through attribute of the font.

See C++ wxFont::SetStrikethrough()’s documentation.

Source

fn set_numeric_weight(&self, weight: c_int)

Sets the font weight using an integer value.

See C++ wxFont::SetNumericWeight()’s documentation.

Source

fn new_nativefontinfo<N: NativeFontInfoMethods>( native_info: &N, ) -> Option<FontIsOwned<false>>

Sets the encoding for this font.

See C++ wxFont::New()’s documentation.

Source

fn new_str(native_info_string: &str) -> Option<FontIsOwned<false>>

Sets the encoding for this font.

See C++ wxFont::New()’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> FontMethods for FontIsOwned<OWNED>