pub struct RibbonLayout { /* private fields */ }Expand description
Per-frame ribbon layout: shrink groups before moving them into labeled flyouts.
Implementations§
Source§impl RibbonLayout
impl RibbonLayout
Sourcepub fn new(available_width: i32, groups: &[RibbonGroup<'_>]) -> Self
pub fn new(available_width: i32, groups: &[RibbonGroup<'_>]) -> Self
Compute group presentation for an available inner width in DIP. Groups collapse from right to left; extremely narrow windows can scroll.
Sourcepub fn with_metrics(
available_width: i32,
groups: &[RibbonGroup<'_>],
metrics: RibbonMetrics,
) -> Self
pub fn with_metrics( available_width: i32, groups: &[RibbonGroup<'_>], metrics: RibbonMetrics, ) -> Self
Compute a layout using the active style’s sizing and overflow policy.
Sourcepub fn is_collapsed(&self, index: usize) -> bool
pub fn is_collapsed(&self, index: usize) -> bool
Whether a group is reachable through its labeled overflow button.
Sourcepub fn group_width(&self, index: usize) -> Option<i32>
pub fn group_width(&self, index: usize) -> Option<i32>
Width occupied by a group in the ribbon, in DIP.
Auto Trait Implementations§
impl Forget for RibbonLayout
impl Freeze for RibbonLayout
impl RefUnwindSafe for RibbonLayout
impl Send for RibbonLayout
impl Sync for RibbonLayout
impl Unpin for RibbonLayout
impl UnsafeUnpin for RibbonLayout
impl UnwindSafe for RibbonLayout
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
Mutably borrows from an owned value. Read more