Skip to main content

CardBody

Trait CardBody 

pub trait CardBody {
    // Required method
    fn show_as_card(&mut self, selected: bool, activate: Event);
}
Expand description

A widget that can be shown as a card: what a card component (a board’s BoardCard) asks of the one widget it was given, so the card is that widget’s own surface and what it says is written once. Asked as a capability, so a widget wrapped in a host’s pane, a context menu or any other decorator still answers.

Required Methods§

fn show_as_card(&mut self, selected: bool, activate: Event)

Show as a card: its own surface, its title wrapped over up to CARD_TITLE_LINES lines, its facts on a line under the title, and a press reporting activate — and selection, where it is the selected one.

Implementors§