pub struct MenuItemLayout {
pub id: u64,
pub min: Vec2,
pub max: Vec2,
pub label_pos: Vec2,
pub hint_pos: Vec2,
pub track: Option<(Vec2, Vec2)>,
}Expand description
Re-exported for the same reason: menu_skin returns a MenuSkin, and
a caller that can name this crate’s menu art should not have to add a second
dependency to lay out and draw the menu it skins. It is also what lets an
end-to-end suite that depends on this crate take a golden image of the real
menu rather than of a replica.
Where one item landed.
Fields§
§id: u64The item this rectangle belongs to.
min: Vec2The button’s upper-left corner, in screen pixels.
max: Vec2The button’s lower-right corner, in screen pixels.
label_pos: Vec2Where the label’s em box starts.
hint_pos: Vec2Where the key hint’s em box starts — right-aligned inside the button.
track: Option<(Vec2, Vec2)>A MenuItemKind::Slider row’s groove: (min, max) in screen pixels,
between the label and the value. None for a button row.
Implementations§
Trait Implementations§
Source§impl Clone for MenuItemLayout
impl Clone for MenuItemLayout
Source§fn clone(&self) -> MenuItemLayout
fn clone(&self) -> MenuItemLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MenuItemLayout
Source§impl Debug for MenuItemLayout
impl Debug for MenuItemLayout
Source§impl PartialEq for MenuItemLayout
impl PartialEq for MenuItemLayout
impl StructuralPartialEq for MenuItemLayout
Auto Trait Implementations§
impl Freeze for MenuItemLayout
impl RefUnwindSafe for MenuItemLayout
impl Send for MenuItemLayout
impl Sync for MenuItemLayout
impl Unpin for MenuItemLayout
impl UnsafeUnpin for MenuItemLayout
impl UnwindSafe for MenuItemLayout
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