pub struct Layout(_, _);Implementations
sourceimpl Layout
impl Layout
pub fn new(context: &Context) -> Layout
pub fn context_changed(&self)
pub fn copy(&self) -> Option<Layout>
pub fn get_alignment(&self) -> Alignment
pub fn get_attributes(&self) -> Option<AttrList>
pub fn get_auto_dir(&self) -> bool
pub fn get_baseline(&self) -> i32
pub fn get_character_count(&self) -> i32
pub fn get_context(&self) -> Option<Context>
pub fn get_cursor_pos(&self, index_: i32) -> (Rectangle, Rectangle)
pub fn get_ellipsize(&self) -> EllipsizeMode
pub fn get_extents(&self) -> (Rectangle, Rectangle)
pub fn get_font_description(&self) -> Option<FontDescription>
pub fn get_height(&self) -> i32
pub fn get_indent(&self) -> i32
pub fn get_iter(&self) -> Option<LayoutIter>
pub fn get_justify(&self) -> bool
pub fn get_line(&self, line: i32) -> Option<LayoutLine>
pub fn get_line_count(&self) -> i32
pub fn get_line_readonly(&self, line: i32) -> Option<LayoutLine>
pub fn get_lines(&self) -> Vec<LayoutLine>
pub fn get_lines_readonly(&self) -> Vec<LayoutLine>
pub fn get_pixel_extents(&self) -> (Rectangle, Rectangle)
pub fn get_pixel_size(&self) -> (i32, i32)
pub fn get_serial(&self) -> u32
pub fn get_single_paragraph_mode(&self) -> bool
pub fn get_size(&self) -> (i32, i32)
pub fn get_spacing(&self) -> i32
pub fn get_tabs(&self) -> Option<TabArray>
pub fn get_text(&self) -> Option<GString>
pub fn get_unknown_glyphs_count(&self) -> i32
pub fn get_width(&self) -> i32
pub fn get_wrap(&self) -> WrapMode
pub fn index_to_line_x(&self, index_: i32, trailing: bool) -> (i32, i32)
pub fn index_to_pos(&self, index_: i32) -> Rectangle
pub fn is_ellipsized(&self) -> bool
pub fn is_wrapped(&self) -> bool
pub fn move_cursor_visually(
&self,
strong: bool,
old_index: i32,
old_trailing: i32,
direction: i32
) -> (i32, i32)
pub fn set_alignment(&self, alignment: Alignment)
pub fn set_attributes(&self, attrs: Option<&AttrList>)
pub fn set_auto_dir(&self, auto_dir: bool)
pub fn set_ellipsize(&self, ellipsize: EllipsizeMode)
pub fn set_font_description(&self, desc: Option<&FontDescription>)
pub fn set_height(&self, height: i32)
pub fn set_indent(&self, indent: i32)
pub fn set_justify(&self, justify: bool)
pub fn set_markup(&self, markup: &str)
pub fn set_markup_with_accel(&self, markup: &str, accel_marker: char) -> char
pub fn set_single_paragraph_mode(&self, setting: bool)
pub fn set_spacing(&self, spacing: i32)
pub fn set_tabs(&self, tabs: Option<&TabArray>)
pub fn set_text(&self, text: &str)
pub fn set_width(&self, width: i32)
pub fn set_wrap(&self, wrap: WrapMode)
pub fn xy_to_index(&self, x: i32, y: i32) -> (bool, i32, i32)
Trait Implementations
sourceimpl Ord for Layout
impl Ord for Layout
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: ObjectType> PartialOrd<T> for Layout
impl<T: ObjectType> PartialOrd<T> for Layout
sourcefn partial_cmp(&self, other: &T) -> Option<Ordering>
fn partial_cmp(&self, other: &T) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresourceimpl StaticType for Layout
impl StaticType for Layout
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self.impl Eq for Layout
Auto Trait Implementations
impl RefUnwindSafe for Layout
impl !Send for Layout
impl !Sync for Layout
impl Unpin for Layout
impl UnwindSafe for Layout
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
sourcefn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
Upcasts an object to a superclass or interface
T. Read moresourcefn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
Upcasts an object to a reference of its superclass or interface
T. Read moresourcefn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
Tries to downcast to a subclass or interface implementor
T. Read moresourcefn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
Tries to downcast to a reference of its subclass or interface implementor
T. Read moresourcefn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
Tries to cast to an object of type
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast and upcast will do many checks at compile-time already. Read moresourcefn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Tries to cast to reference to an object of type
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast and upcast will do many checks at compile-time already. Read moresourceunsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
Casts to
T unconditionally. Read moresourceunsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
Casts to
&T unconditionally. Read moresourceimpl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
sourcefn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
Returns
true if the object is an instance of (can be cast to) T.