[]Struct pango::TabArray

pub struct TabArray(_);

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

Implementations

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_size

Initial number of tab stops to allocate, can be 0

positions_in_pixels

whether positions are in pixel units

Returns

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.

Returns

whether positions are in pixels.

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

Gets the number of tab stops in self.

Returns

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_index

tab stop index

alignment

location to store alignment, or None

location

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

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.

tab_index

the index of a tab stop

alignment

tab alignment

location

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
[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> 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>, 
[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.