Struct viewy::components::TitleBar
source · [−]pub struct TitleBar {
pub title: String,
pub is_sticky: bool,
pub left_item: Option<Box<dyn Renderable>>,
pub right_item: Option<Box<dyn Renderable>>,
pub bottom_item: Option<Box<dyn Renderable>>,
/* private fields */
}Fields
title: Stringis_sticky: boolleft_item: Option<Box<dyn Renderable>>right_item: Option<Box<dyn Renderable>>bottom_item: Option<Box<dyn Renderable>>Implementations
sourceimpl TitleBar
impl TitleBar
pub fn new(title: &str) -> Self
pub fn sticky(&mut self, is_sticky: bool) -> Self
pub fn left_item<'a, T>(&'a mut self, item: T) -> Self where
T: 'static + Renderable,
pub fn right_item<'a, T>(&'a mut self, item: T) -> Self where
T: 'static + Renderable,
pub fn bottom_item<'a, T>(&'a mut self, item: T) -> Self where
T: 'static + Renderable,
Trait Implementations
sourceimpl DefaultModifiers<TitleBar> for TitleBar
impl DefaultModifiers<TitleBar> for TitleBar
fn color(&mut self, color: &str) -> Self
fn add_class(&mut self, class_name: &str) -> Self
fn remove_class(&mut self, class_name: &str) -> Self
fn position(&mut self, position: Position) -> Self
fn padding(&mut self, padding: Vec<i32>) -> Self
fn padding_top(&mut self, value: i32) -> Self
fn padding_bottom(&mut self, value: i32) -> Self
fn padding_left(&mut self, value: i32) -> Self
fn padding_right(&mut self, value: i32) -> Self
fn margin(&mut self, margin: Vec<i32>) -> Self
fn margin_top(&mut self, value: i32) -> Self
fn margin_bottom(&mut self, value: i32) -> Self
fn margin_left(&mut self, value: i32) -> Self
fn margin_right(&mut self, value: i32) -> Self
fn width(&mut self, value: &str) -> Self
fn height(&mut self, value: &str) -> Self
fn min_width(&mut self, value: &str) -> Self
fn min_height(&mut self, value: &str) -> Self
fn max_width(&mut self, value: &str) -> Self
fn max_height(&mut self, value: &str) -> Self
fn sticky_to_top(&mut self, top: i32) -> Self
fn sticky_to_bottom(&mut self, bottom: i32) -> Self
fn align_self(&mut self, value: &str) -> Self
fn justify_self(&mut self, value: &str) -> Self
fn background_color(&mut self, color: &str) -> Self
fn display(&mut self, display: &str) -> Self
fn background_image(&mut self, url: &str) -> Self
fn background(&mut self, value: &str) -> Self
fn border(&mut self, value: &str) -> Self
fn border_left(&mut self, value: &str) -> Self
fn border_right(&mut self, value: &str) -> Self
fn border_bottom(&mut self, value: &str) -> Self
fn border_top(&mut self, value: &str) -> Self
fn tag(&mut self, tag_name: &str) -> Self
fn set_attr(&mut self, name: &str, value: &str) -> Self
fn unset_attr(&mut self, name: &str) -> Self
fn grid_area(&mut self, name: &str) -> Self
fn grid_column(&mut self, column: &str) -> Self
fn grid_row(&mut self, row: &str) -> Self
fn flex_grow(&mut self, value: i32) -> Self
fn line_height(&mut self, value: &str) -> Self
fn border_radius(&mut self, value: &str) -> Self
fn text_align(&mut self, value: &str) -> Self
fn overflow(&mut self, overflow: Overflow) -> Self
fn popover(&mut self, popover: Popover) -> Self
fn popup(&mut self, popup: Popup) -> Self
Auto Trait Implementations
impl !RefUnwindSafe for TitleBar
impl Send for TitleBar
impl Sync for TitleBar
impl Unpin for TitleBar
impl !UnwindSafe for TitleBar
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more