Struct native_windows_gui::FontT
[−]
[src]
pub struct FontT<S: Clone + Into<String>> { pub family: S, pub size: c_int, pub weight: c_int, pub decoration: u32, }
A template that can create a font resource
Params:
• size
: The height, in logical units, of the font's character cell or character. 0 means default height.
• weight
: The weight of the font in the range 0 through 1000. For example, 400 is normal and 700 is bold. See the FONT_WEIGHT_* constants for convenience
• decoration
: Extra style for the font. A bitwise combination of the FONT_DECO_* constants. Ex: FONT_DECO_ITALIC | FONT_DECO_UNDERLINE | FONT_DECO_STRIKEOUT
Fields
family: S
size: c_int
weight: c_int
decoration: u32
Trait Implementations
impl<S: Clone + Clone + Into<String>> Clone for FontT<S>
[src]
fn clone(&self) -> FontT<S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<ID: Clone + Hash, S: Clone + Into<String>> ResourceT<ID> for FontT<S>
[src]
fn type_id(&self) -> TypeId
Should return the TypeId of the generated resource. For example a FontT
struct returns the TypeId of a Font
struct.
fn build(&self, ui: &Ui<ID>) -> Result<Box<Resource>, Error>
Should instance the resource and return it as a Box. If an error is raised, it will be returned by ui.commit
.