FontIsOwned

Struct FontIsOwned 

Source
pub struct FontIsOwned<const OWNED: bool>(/* private fields */);
Expand description

A font is an object which determines the appearance of text.

Implementations§

Source§

impl<const OWNED: bool> FontIsOwned<OWNED>

Source

pub fn new() -> FontIsOwned<OWNED>

Source

pub fn new_with_font<F: FontMethods>(font: &F) -> FontIsOwned<OWNED>

Copy constructor, uses reference counting.

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

Source

pub fn new_with_fontinfo(font_info: *const c_void) -> FontIsOwned<OWNED>

Creates a font object using the specified font description.

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

Source

pub fn new_with_str(native_info_string: &str) -> FontIsOwned<OWNED>

Constructor from font description string.

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

Source

pub fn new_with_nativefontinfo<N: NativeFontInfoMethods>( native_info: &N, ) -> FontIsOwned<OWNED>

Construct font from a native font info structure.

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

Source

pub fn none() -> Option<&'static Self>

Trait Implementations§

Source§

impl Clone for FontIsOwned<false>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const OWNED: bool> Drop for FontIsOwned<OWNED>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<const OWNED: bool> DynamicCast for FontIsOwned<OWNED>

Source§

impl<const OWNED: bool> FontMethods for FontIsOwned<OWNED>

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. Read more
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. Read more
Source§

fn get_native_font_info_desc(&self) -> String

Returns the platform-dependent string completely describing this font. Read more
Source§

fn get_native_font_info_user_desc(&self) -> String

Returns a user-friendly string for this font object. Read more
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. Read more
Source§

fn get_point_size(&self) -> c_int

Gets the point size as an integer number. Read more
Source§

fn get_fractional_point_size(&self) -> c_double

Gets the point size as a floating number. Read more
Source§

fn get_pixel_size(&self) -> Size

Gets the pixel size. Read more
Source§

fn get_underlined(&self) -> bool

Returns true if the font is underlined, false otherwise. Read more
Source§

fn get_strikethrough(&self) -> bool

Returns true if the font is stricken-through, false otherwise. Read more
Source§

fn get_numeric_weight(&self) -> c_int

Gets the font weight as an integer value. Read more
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. Read more
Source§

fn is_ok(&self) -> bool

Returns true if this object is a valid font, false otherwise. Read more
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. Read more
Source§

fn bold(&self) -> Font

Returns a bold version of this font. Read more
Source§

fn italic(&self) -> Font

Returns an italic version of this font. Read more
Source§

fn larger(&self) -> Font

Returns a larger version of this font. Read more
Source§

fn smaller(&self) -> Font

Returns a smaller version of this font. Read more
Source§

fn underlined(&self) -> Font

Returns underlined version of this font. Read more
Source§

fn strikethrough(&self) -> Font

Returns stricken-through version of this font. Read more
Source§

fn make_bold(&self) -> &Self

Changes this font to be bold. Read more
Source§

fn make_italic(&self) -> &Self

Changes this font to be italic. Read more
Source§

fn make_larger(&self) -> &Self

Changes this font to be larger. Read more
Source§

fn make_smaller(&self) -> &Self

Changes this font to be smaller. Read more
Source§

fn make_underlined(&self) -> &Self

Changes this font to be underlined. Read more
Source§

fn make_strikethrough(&self) -> &Self

Changes this font to be stricken-through. Read more
Source§

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

Sets the facename for the font. Read more
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(). Read more
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. Read more
Source§

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

Sets the encoding for this font. Read more
Source§

fn set_point_size(&self, point_size: c_int)

Sets the font size in points to an integer value. Read more
Source§

fn set_fractional_point_size(&self, point_size: c_double)

Sets the font size in points. Read more
Source§

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

Sets the pixel size. Read more
Source§

fn set_underlined(&self, underlined: bool)

Sets underlining. Read more
Source§

fn set_strikethrough(&self, strikethrough: bool)

Sets strike-through attribute of the font. Read more
Source§

fn set_numeric_weight(&self, weight: c_int)

Sets the font weight using an integer value. Read more
Source§

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

Sets the encoding for this font. Read more
Source§

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

Sets the encoding for this font. Read more
Source§

impl<const OWNED: bool> From<FontIsOwned<OWNED>> for GDIObjectIsOwned<OWNED>

Source§

fn from(o: FontIsOwned<OWNED>) -> Self

Converts to this type from the input type.
Source§

impl<const OWNED: bool> From<FontIsOwned<OWNED>> for ObjectIsOwned<OWNED>

Source§

fn from(o: FontIsOwned<OWNED>) -> Self

Converts to this type from the input type.
Source§

impl<const OWNED: bool> ObjectMethods for FontIsOwned<OWNED>

Source§

fn get_class_info(&self) -> Option<ClassInfoIsOwned<false>>

This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar). Read more
Source§

fn get_ref_data(&self) -> Option<ObjectRefDataIsOwned<false>>

Returns the wxObject::m_refData pointer, i.e. the data referenced by this object. Read more
Source§

fn is_kind_of<C>(&self, info: Option<&C>) -> bool

Determines whether this class is a subclass of (or the same class as) the given class. Read more
Source§

fn is_same_as<O>(&self, obj: &O) -> bool
where O: ObjectMethods,

Returns true if this object has the same data pointer as obj. Read more
Source§

fn ref_<O>(&self, clone: &O)
where O: ObjectMethods,

Makes this object refer to the data in clone. Read more
Source§

fn set_ref_data<O>(&self, data: Option<&O>)

Sets the wxObject::m_refData pointer. Read more
Source§

fn un_ref(&self)

Decrements the reference count in the associated data, and if it is zero, deletes the data. Read more
Source§

fn un_share(&self)

This is the same of AllocExclusive() but this method is public. Read more
Source§

impl<const OWNED: bool> WxRustMethods for FontIsOwned<OWNED>

Source§

type Unowned = FontIsOwned<false>

Source§

unsafe fn as_ptr(&self) -> *mut c_void

Source§

unsafe fn from_ptr(ptr: *mut c_void) -> Self

Source§

unsafe fn from_unowned_ptr(ptr: *mut c_void) -> Self::Unowned

Source§

unsafe fn with_ptr<F: Fn(&Self)>(ptr: *mut c_void, closure: F)

Source§

unsafe fn option_from(ptr: *mut c_void) -> Option<Self::Unowned>
where Self: Sized,

Source§

impl<const OWNED: bool> GDIObjectMethods for FontIsOwned<OWNED>

Auto Trait Implementations§

§

impl<const OWNED: bool> Freeze for FontIsOwned<OWNED>

§

impl<const OWNED: bool> RefUnwindSafe for FontIsOwned<OWNED>

§

impl<const OWNED: bool> !Send for FontIsOwned<OWNED>

§

impl<const OWNED: bool> !Sync for FontIsOwned<OWNED>

§

impl<const OWNED: bool> Unpin for FontIsOwned<OWNED>

§

impl<const OWNED: bool> UnwindSafe for FontIsOwned<OWNED>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.