Module emoji_picker
Expand description
The emoji picker every app opens: to react to something, to put an emoji in what it writes.
A compact panel: the search field (focused), Unicode’s groups as tabs,
and a grid that lists the workspace’s own emoji first, with an “Add
emoji” tile for whoever may add them (crate::workspace_emoji), then
the person’s recently used emoji, then the chosen group; while a query
is typed, the matches (the workspace’s first). Everything is reachable
from the keyboard: typing searches, the arrows move the highlight, Tab
changes the group, Enter picks, Shift+Enter (a right click, a long press)
offers the skin tones of an emoji that takes them, Escape closes.
A pick is PickerEvent::Picked: the emoji itself, or a workspace
emoji written :name:; it joins the recents
(crate::emoji_catalogue::record_recent). The Unicode emoji come from
the toolkit’s own catalogue (crate::emoji_catalogue); the workspace’s
emoji are added to it, and the person’s recents come first.
Hosts: a retained view puts it in a super::Popover
(EmojiPicker::new lays out at its own size); a canvas that paints by
hand frames it (EmojiPicker::framed, or EmojiPicker::sheet for the
desk’s own wider card), places it with EmojiPicker::open_at, paints it
with Widget::draw and routes the window’s events to
Widget::handle_event while it is open. A framed card is sized by the
viewport it is placed in: on a small display it is narrower, its grid
shorter and its group tabs over several rows, and a display too short for
all of its chrome drops the hint line and then the tabs, so the card
always fits.
Structs§
- Emoji
Picker - The shared emoji picker. See the module docs.
Enums§
- Picker
Event - What the picker asks of its host.