mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
* Massively reorganize and clean up the whole Rust codebase * Additional changes during code review
23 lines
754 B
Rust
23 lines
754 B
Rust
use crate::input::keyboard::{Key, MouseMotion};
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub struct HintData(pub Vec<HintGroup>);
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub struct HintGroup(pub Vec<HintInfo>);
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub struct HintInfo {
|
|
pub key_groups: Vec<KeysGroup>,
|
|
pub mouse: Option<MouseMotion>,
|
|
pub label: String,
|
|
/// Prepend the "+" symbol indicating that this is a refinement upon a previous entry in the group.
|
|
pub plus: bool,
|
|
}
|
|
|
|
/// Only `Key`s that exist on a physical keyboard should be used.
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub struct KeysGroup(pub Vec<Key>);
|