pub type RibbonGalleryOnSelectCallbackType = extern "C" fn(RefAny, CallbackInfo, usize) -> Update;
fn push_padding(v: &mut Vec<Cond>, top: isize, right: isize, bottom: isize, left: isize) {
fn push_border_colors_both(v: &mut Vec<Cond>, t: &RibbonTheme, field: fn(&RibbonTheme) -> ColorU) {
fn push_box_border_both(v: &mut Vec<Cond>, t: &RibbonTheme, field: fn(&RibbonTheme) -> ColorU) {
fn push_bottom_border_both(v: &mut Vec<Cond>, t: &RibbonTheme, field: fn(&RibbonTheme) -> ColorU) {
// * the chrome — tab strip, buttons, launcher, gallery, the mobile lists — is page-neutral: white
// * the application button is an ACCENT fill in either mode, so its hover keeps the palette's own
// * a hovered tab's text and a focused field's ring take the ACCENT, the one state colour with a
fn theme_mobile_group_list(t: &RibbonTheme, left_handed: bool) -> CssPropertyWithConditionsVec {
fn theme_mobile_group_list_item_selected(t: &RibbonTheme) -> CssPropertyWithConditionsVec {
/// The `launcher_button_style` this bundle renders with: the caller's override if there is one,
/// The `gallery_spinner_style` this bundle renders with: the caller's override if there is one,
/// The `gallery_wrapper_style` this bundle renders with: the caller's override if there is one,
/// The `mobile_tab_overlay_item_style` this bundle renders with: the caller's override if there
/// The `mobile_group_list_item_style` this bundle renders with: the caller's override if there
/// The `mobile_group_list_item_selected_style` this bundle renders with: the caller's override
pub fn resolved_mobile_group_list_item_selected_style(&self) -> CssPropertyWithConditionsVec {
/// The `gallery_spinner_button_style` this bundle renders with: the caller's override if there
/// The `gallery_spinner_icon_style` this bundle renders with: the caller's override if there is
let tab_labels: Vec<AzString> = tabs.as_slice().iter().map(|t| t.label.clone()).collect();
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 {
fn ancestor_with_class(info: &CallbackInfo, start: DomNodeId, class: &str) -> Option<DomNodeId> {
fn descendant_with_class(info: &CallbackInfo, root: DomNodeId, class: &str) -> Option<DomNodeId> {
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 {