[]Struct pango::Attribute

pub struct Attribute(_);

The Attribute structure represents the common portions of all attributes. Particular types of attributes include this structure as their initial portion. The common portion of the attribute holds the range to which the value in the type-specific part of the attribute applies and should be initialized using Attribute::init. By default an attribute will have an all-inclusive range of [0,G_MAXUINT].

Implementations

impl Attribute[src]

pub fn init(&mut self, klass: &AttrClass)[src]

Initializes self's klass to klass, it's start_index to PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING and end_index to PANGO_ATTR_INDEX_TO_TEXT_END such that the attribute applies to the entire text by default.

klass

a AttrClass

impl Attribute[src]

pub fn new_background_alpha(alpha: u16) -> Option<Attribute>[src]

pub fn new_background(red: u16, green: u16, blue: u16) -> Option<Attribute>[src]

pub fn new_fallback(enable_fallback: bool) -> Option<Attribute>[src]

pub fn new_family(family: &str) -> Option<Attribute>[src]

pub fn new_foreground_alpha(alpha: u16) -> Option<Attribute>[src]

pub fn new_foreground(red: u16, green: u16, blue: u16) -> Option<Attribute>[src]

pub fn new_gravity_hint(hint: GravityHint) -> Option<Attribute>[src]

pub fn new_gravity(gravity: Gravity) -> Option<Attribute>[src]

pub fn new_letter_spacing(letter_spacing: i32) -> Option<Attribute>[src]

pub fn new_rise(rise: i32) -> Option<Attribute>[src]

pub fn new_scale(scale_factor: f64) -> Option<Attribute>[src]

pub fn new_size(size: i32) -> Option<Attribute>[src]

pub fn new_size_absolute(size: i32) -> Option<Attribute>[src]

pub fn new_stretch(stretch: Stretch) -> Option<Attribute>[src]

pub fn new_strikethrough_color(
    red: u16,
    green: u16,
    blue: u16
) -> Option<Attribute>
[src]

pub fn new_strikethrough(strikethrough: bool) -> Option<Attribute>[src]

pub fn new_style(style: Style) -> Option<Attribute>[src]

pub fn new_underline_color(red: u16, green: u16, blue: u16) -> Option<Attribute>[src]

pub fn new_underline(underline: Underline) -> Option<Attribute>[src]

pub fn new_variant(variant: Variant) -> Option<Attribute>[src]

pub fn new_weight(weight: Weight) -> Option<Attribute>[src]

pub fn get_attr_class(&self) -> AttrClass[src]

pub fn get_start_index(&self) -> u32[src]

pub fn get_end_index(&self) -> u32[src]

pub fn set_start_index(&mut self, index: u32)[src]

pub fn set_end_index(&mut self, index: u32)[src]

Trait Implementations

impl Clone for Attribute

impl Debug for Attribute[src]

impl Eq for Attribute[src]

impl Hash for Attribute[src]

impl Ord for Attribute[src]

impl PartialEq<Attribute> for Attribute[src]

impl PartialOrd<Attribute> for Attribute[src]

impl StaticType for Attribute

Auto Trait Implementations

impl RefUnwindSafe for Attribute

impl !Send for Attribute

impl !Sync for Attribute

impl Unpin for Attribute

impl UnwindSafe for Attribute

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.