pub struct Tab {Show 16 fields
pub bg: Quad,
pub text: Text,
pub tab_close: TabClose,
pub label: String,
pub is_closeable: bool,
pub animator: Animator,
pub z: f32,
pub abs_origin: Option<Vec2>,
pub _is_selected: bool,
pub _is_focussed: bool,
pub _bg_area: Area,
pub _bg_inst: Option<InstanceArea>,
pub _text_area: Area,
pub _close_anim_rect: Rect,
pub _is_down: bool,
pub _is_drag: bool,
}
Fields§
§bg: Quad
§text: Text
§tab_close: TabClose
§label: String
§is_closeable: bool
§animator: Animator
§z: f32
§abs_origin: Option<Vec2>
§_is_selected: bool
§_is_focussed: bool
§_bg_area: Area
§_bg_inst: Option<InstanceArea>
§_text_area: Area
§_close_anim_rect: Rect
§_is_down: bool
§_is_drag: bool
Implementations§
Source§impl Tab
impl Tab
pub fn proto(cx: &mut Cx) -> Self
pub fn layout_bg() -> LayoutId
pub fn text_style_title() -> TextStyleId
pub fn instance_border_color() -> InstanceColor
pub fn tab_closing() -> InstanceFloat
pub fn shader_bg() -> ShaderId
pub fn style(cx: &mut Cx, opt: &StyleOptions)
pub fn get_bg_color(&self, cx: &Cx) -> Color
pub fn get_text_color(&self, cx: &Cx) -> Color
pub fn anim_default(&self, cx: &Cx) -> Anim
pub fn anim_over(&self, cx: &Cx) -> Anim
pub fn anim_down(&self, cx: &Cx) -> Anim
pub fn anim_close(&self, _cx: &Cx) -> Anim
pub fn set_tab_focus(&mut self, cx: &mut Cx, focus: bool)
pub fn set_tab_selected(&mut self, cx: &mut Cx, selected: bool)
pub fn set_tab_state(&mut self, cx: &mut Cx, selected: bool, focus: bool)
pub fn handle_tab(&mut self, cx: &mut Cx, event: &mut Event) -> TabEvent
pub fn get_tab_rect(&mut self, cx: &Cx) -> Rect
pub fn begin_tab(&mut self, cx: &mut Cx) -> Result<(), ()>
pub fn end_tab(&mut self, cx: &mut Cx)
pub fn draw_tab(&mut self, cx: &mut Cx)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tab
impl RefUnwindSafe for Tab
impl Send for Tab
impl Sync for Tab
impl Unpin for Tab
impl UnwindSafe for Tab
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