pub fn with_selection<F: FnOnce(&Printer)>(&self, selection: bool, f: F) {
        self.with_color(
            if selection {
                if self.focused {
                    ColorStyle::highlight()
                } else {
                    ColorStyle::highlight_inactive()
                }
            } else {
                ColorStyle::primary()
            },
            f,
        );
    }
/// Apply a selection style and call the given function.
///
/// * If `selection` is `false`, simply uses `ColorStyle::primary()`.
/// * If `selection` is `true`:
///     * If the printer currently has the focus,
///       uses `ColorStyle::highlight()`.
///     * Otherwise, uses `ColorStyle::highlight_inactive()`.
Apply a selection style and call the given function.
Apply a selection style and call the given function .
pub fn with_selection<F: FnOnce(&Printer)>(&self, selection: bool, f: F) {
        self.with_color(
            if selection {
                if self.focused {
                    ColorStyle::highlight()
                } else {
                    ColorStyle::highlight_inactive()
                }
            } else {
                ColorStyle::primary()
            },
            f,
        );
    }
pub fn with_selection < F : FnOnce ( & Printer ) > ( & self , selection : bool , f : F ) { self . with_color ( if selection { if self . focused { ColorStyle :: highlight ( ) } else { ColorStyle :: highlight_inactive ( ) } } else { ColorStyle :: primary ( ) } , f , ) ; }
Apply a selection style and call the given function.
Apply a selection style and call the given function .
&self
selection
bool
f
F
&self
selection
bool
f
F