pub struct TextLayout { /* private fields */ }Expand description
Optional text layout instructions. Omitted fields retain owner defaults.
A supplied default request is an explicit reset, distinct from no request.
Implementations§
Source§impl TextLayout
impl TextLayout
Sourcepub const fn get_alignment(&self) -> Option<TextAlignment>
pub const fn get_alignment(&self) -> Option<TextAlignment>
Inspect the requested physical line alignment.
Sourcepub fn get_fit_priority(&self) -> Option<TextFitPriority>
pub fn get_fit_priority(&self) -> Option<TextFitPriority>
Inspect the requested fitting and abbreviation priority.
Sourcepub fn get_direction(&self) -> Option<TextDirection>
pub fn get_direction(&self) -> Option<TextDirection>
Inspect the requested paragraph direction.
Sourcepub fn get_orientation(&self) -> Option<&TextOrientation>
pub fn get_orientation(&self) -> Option<&TextOrientation>
Borrow the requested orientation program.
Sourcepub fn get_rotation_mode(&self) -> Option<TextRotationMode>
pub fn get_rotation_mode(&self) -> Option<TextRotationMode>
Inspect the requested rotation-anchor relationship.
Sourcepub fn get_anchor(&self) -> Option<TextAnchor>
pub fn get_anchor(&self) -> Option<TextAnchor>
Inspect the requested measured-block anchor.
Sourcepub fn get_offset(&self) -> Option<TextOffset>
pub fn get_offset(&self) -> Option<TextOffset>
Inspect the requested signed CSS-pixel displacement.
Sourcepub fn get_bounds(&self) -> Option<TextBounds>
pub fn get_bounds(&self) -> Option<TextBounds>
Inspect the requested text-local maxima.
Sourcepub fn get_wrapping(&self) -> Option<TextWrapping>
pub fn get_wrapping(&self) -> Option<TextWrapping>
Inspect the requested soft-wrap policy.
Sourcepub fn get_overflow(&self) -> Option<&TextOverflow>
pub fn get_overflow(&self) -> Option<&TextOverflow>
Borrow the requested overflow program.
Sourcepub fn get_overlap(&self) -> Option<TextOverlap>
pub fn get_overlap(&self) -> Option<TextOverlap>
Inspect the requested peer-overlap policy.
Sourcepub fn get_visibility(&self) -> Option<&TextVisibility>
pub fn get_visibility(&self) -> Option<&TextVisibility>
Borrow the requested text-eligibility program.
Sourcepub const fn alignment(self, alignment: TextAlignment) -> TextLayout
pub const fn alignment(self, alignment: TextAlignment) -> TextLayout
Set physical line alignment within the text block.
Source§impl TextLayout
impl TextLayout
Sourcepub fn anchor(self, value: TextAnchor) -> TextLayout
pub fn anchor(self, value: TextAnchor) -> TextLayout
Replace this request’s anchor instruction.
Sourcepub fn offset(self, value: TextOffset) -> TextLayout
pub fn offset(self, value: TextOffset) -> TextLayout
Replace this request’s offset instruction.
Sourcepub fn bounds(self, value: TextBounds) -> TextLayout
pub fn bounds(self, value: TextBounds) -> TextLayout
Replace this request’s bounds instruction.
Sourcepub fn wrapping(self, value: TextWrapping) -> TextLayout
pub fn wrapping(self, value: TextWrapping) -> TextLayout
Replace this request’s wrapping instruction.
Sourcepub fn overflow(self, value: TextOverflow) -> TextLayout
pub fn overflow(self, value: TextOverflow) -> TextLayout
Replace this request’s overflow instruction.
Sourcepub fn overlap(self, value: TextOverlap) -> TextLayout
pub fn overlap(self, value: TextOverlap) -> TextLayout
Replace this request’s overlap instruction.
Sourcepub fn visibility(self, value: TextVisibility) -> TextLayout
pub fn visibility(self, value: TextVisibility) -> TextLayout
Replace this request’s visibility instruction.
Sourcepub fn orientation(self, value: TextOrientation) -> TextLayout
pub fn orientation(self, value: TextOrientation) -> TextLayout
Replace this request’s orientation instruction.
Sourcepub fn rotation_mode(self, value: TextRotationMode) -> TextLayout
pub fn rotation_mode(self, value: TextRotationMode) -> TextLayout
Replace this request’s rotation_mode instruction.
Sourcepub fn direction(self, value: TextDirection) -> TextLayout
pub fn direction(self, value: TextDirection) -> TextLayout
Replace this request’s direction instruction.
Sourcepub fn fit(self, value: TextFit) -> TextLayout
pub fn fit(self, value: TextFit) -> TextLayout
Replace this request’s fit instruction.
Sourcepub fn fit_priority(self, value: TextFitPriority) -> TextLayout
pub fn fit_priority(self, value: TextFitPriority) -> TextLayout
Replace this request’s fit_priority instruction.
Source§impl TextLayout
impl TextLayout
Sourcepub fn rotation(self, value: TextRotation) -> TextLayout
pub fn rotation(self, value: TextRotation) -> TextLayout
Replace orientation with one fixed screen angle.
Trait Implementations§
Source§impl Clone for TextLayout
impl Clone for TextLayout
Source§fn clone(&self) -> TextLayout
fn clone(&self) -> TextLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TextLayout
impl Debug for TextLayout
Source§impl Default for TextLayout
impl Default for TextLayout
Source§fn default() -> TextLayout
fn default() -> TextLayout
impl Eq for TextLayout
Source§impl PartialEq for TextLayout
impl PartialEq for TextLayout
impl StructuralPartialEq for TextLayout
Auto Trait Implementations§
impl Forget for TextLayout
impl Freeze for TextLayoutwhere
*const ArcInner<TextInstructions> is !null: Freeze,
PhantomData<ArcInner<TextInstructions>>: Freeze,
impl Move for TextLayout
impl RefUnwindSafe for TextLayout
impl Send for TextLayout
impl Sync for TextLayout
impl Unpin for TextLayout
impl UnsafeUnpin for TextLayoutwhere
*const ArcInner<TextInstructions> is !null: UnsafeUnpin,
PhantomData<ArcInner<TextInstructions>>: UnsafeUnpin,
impl UnwindSafe for TextLayoutwhere
Arc<TextInstructions>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.