use std::path::PathBuf;
use crate::graph::NodeKey;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BrowserCommand {
Back,
Forward,
Reload,
StopLoad,
ZoomIn,
ZoomOut,
ZoomReset,
Close,
}
impl BrowserCommand {
pub fn diagnostic_label(self) -> &'static str {
match self {
BrowserCommand::Back => "back",
BrowserCommand::Forward => "forward",
BrowserCommand::Reload => "reload",
BrowserCommand::StopLoad => "stop_load",
BrowserCommand::ZoomIn => "zoom_in",
BrowserCommand::ZoomOut => "zoom_out",
BrowserCommand::ZoomReset => "zoom_reset",
BrowserCommand::Close => "close",
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BrowserCommandTarget {
FocusedInput,
ChromeProjection { fallback_node: Option<NodeKey> },
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct RuntimeUserStylesheetSpec {
pub path: PathBuf,
pub source: String,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum EdgeCommand {
ConnectSelectedPair,
ConnectPair { from: NodeKey, to: NodeKey },
ConnectBothDirections,
ConnectBothDirectionsPair { a: NodeKey, b: NodeKey },
RemoveUserEdge,
RemoveUserEdgePair { a: NodeKey, b: NodeKey },
PinSelected,
UnpinSelected,
}