[]Struct pango::TabArray

pub struct TabArray(_);

A TabArray struct contains an array of tab stops. Each tab stop has an alignment and a position.


impl TabArray[src]

pub fn new(initial_size: i32, positions_in_pixels: bool) -> TabArray[src]

Creates an array of initial_size tab stops. Tab stops are specified in pixel units if positions_in_pixels is true, otherwise in Pango units. All stops are initially at position 0.


Initial number of tab stops to allocate, can be 0


whether positions are in pixel units


the newly allocated TabArray, which should be freed with TabArray::free.

pub fn get_positions_in_pixels(&mut self) -> bool[src]

Returns true if the tab positions are in pixels, false if they are in Pango units.


whether positions are in pixels.

pub fn get_size(&mut self) -> i32[src]

Gets the number of tab stops in self.


the number of tab stops in the array.

pub fn get_tab(&mut self, tab_index: i32) -> (TabAlign, i32)[src]

Gets the alignment and position of a tab stop.


tab stop index


location to store alignment, or None


location to store tab position, or None

pub fn resize(&mut self, new_size: i32)[src]

Resizes a tab array. You must subsequently initialize any tabs that were added as a result of growing the array.


new size of the array

pub fn set_tab(&mut self, tab_index: i32, alignment: TabAlign, location: i32)[src]

Sets the alignment and location of a tab stop. alignment must always be TabAlign::Left in the current implementation.


the index of a tab stop


tab alignment


tab location in Pango units

Trait Implementations

impl Clone for TabArray

impl Debug for TabArray[src]

impl Eq for TabArray[src]

impl Hash for TabArray[src]

impl Ord for TabArray[src]

impl PartialEq<TabArray> for TabArray[src]

impl PartialOrd<TabArray> for TabArray[src]

impl StaticType for TabArray

impl StructuralEq for TabArray[src]

impl StructuralPartialEq for TabArray[src]

Auto Trait Implementations

impl RefUnwindSafe for TabArray

impl !Send for TabArray

impl !Sync for TabArray

impl Unpin for TabArray

impl UnwindSafe for TabArray

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.