#[allow(clippy::wildcard_imports)] // widget/render module pulls in the css property/value types it builds with
fn push_padding(v: &mut Vec<Cond>, top: isize, right: isize, bottom: isize, left: isize) {
v.push(Cond::simple(P::const_border_top_style(StyleBorderTopStyle { inner: BorderStyle::Solid })));
v.push(Cond::simple(P::const_border_left_style(StyleBorderLeftStyle { inner: BorderStyle::Solid })));
v.push(Cond::simple(P::const_border_right_style(StyleBorderRightStyle { inner: BorderStyle::Solid })));
v.push(Cond::simple(P::const_border_bottom_style(StyleBorderBottomStyle { inner: BorderStyle::Solid })));
v.push(Cond::simple(P::const_border_bottom_style(StyleBorderBottomStyle { inner: BorderStyle::Solid })));
v.push(Cond::simple(P::const_flex_shrink(LayoutFlexShrink { inner: FloatValue::const_new(0) })));
v.push(Cond::simple(P::const_flex_shrink(LayoutFlexShrink { inner: FloatValue::const_new(0) })));
v.push(Cond::simple(P::const_flex_shrink(LayoutFlexShrink { inner: FloatValue::const_new(0) })));
Cond::simple(P::const_border_right_style(StyleBorderRightStyle { inner: BorderStyle::Solid })),
Cond::simple(P::const_border_left_style(StyleBorderLeftStyle { inner: BorderStyle::Solid })),
v.push(Cond::on_focus(P::const_border_right_color(StyleBorderRightColor { inner: t.accent })));
v.push(Cond::on_focus(P::const_border_bottom_color(StyleBorderBottomColor { inner: t.accent })));
fn theme_mobile_group_list(t: &RibbonTheme, left_handed: bool) -> CssPropertyWithConditionsVec {
fn theme_mobile_group_list_item_selected(t: &RibbonTheme) -> CssPropertyWithConditionsVec {
impl_vec!(RibbonTab, RibbonTabVec, RibbonTabVecDestructor, RibbonTabVecDestructorType, RibbonTabVecSlice, OptionRibbonTab);
impl_vec!(RibbonGroup, RibbonGroupVec, RibbonGroupVecDestructor, RibbonGroupVecDestructorType, RibbonGroupVecSlice, OptionRibbonGroup);
impl_vec!(RibbonItem, RibbonItemVec, RibbonItemVecDestructor, RibbonItemVecDestructorType, RibbonItemVecSlice, OptionRibbonItem);
impl_vec!(RibbonGalleryCell, RibbonGalleryCellVec, RibbonGalleryCellVecDestructor, RibbonGalleryCellVecDestructorType, RibbonGalleryCellVecSlice, OptionRibbonGalleryCell);
pub fn with_on_tab_click<C: Into<RibbonOnTabClickCallback>>(mut self, data: RefAny, cb: C) -> Self {
let mut group_doms: Vec<Dom> = match tabs.into_library_owned_vec().into_iter().nth(active_tab) {
.with_children(DomVec::from_vec(vec![Dom::create_text_do_not_use_without_block_level_wrapper(active_label)])),
.with_children(DomVec::from_vec(vec![Dom::create_text_do_not_use_without_block_level_wrapper(label)])),
.with_children(DomVec::from_vec(vec![Dom::create_text_do_not_use_without_block_level_wrapper(cell.label.clone())]));
extern "C" fn on_ribbon_mobile_group_click(mut refany: RefAny, mut info: CallbackInfo) -> Update {
extern "C" fn on_ribbon_tab_double_click(mut refany: RefAny, mut info: CallbackInfo) -> Update {
extern "C" fn on_ribbon_mobile_tab_click(mut refany: RefAny, mut info: CallbackInfo) -> Update {
extern "C" fn on_ribbon_gallery_more_click(mut refany: RefAny, mut info: CallbackInfo) -> Update {
extern "C" fn on_ribbon_gallery_cell_click(mut refany: RefAny, mut info: CallbackInfo) -> Update {
.with_on_tab_click(RefAny::new(IndexLog { seen: Vec::new() }), record_index as RibbonOnTabClickCallbackType)
assert!(!i.collapsible && !i.peek_on_hover && !i.auto_select_gallery && !i.expandable_gallery);
let right = RibbonStyle::from_theme_handed(RibbonTheme::office_2013(), Handedness::RightHanded);
let left = RibbonStyle::from_theme_handed(RibbonTheme::office_2013(), Handedness::LeftHanded);