mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 13:28:12 +08:00
* initial layout system with tool options * cargo fmt * cargo fmt again * document bar defined on the backend * cargo fmt * removed RC<RefCell> * cargo fmt * - fix increment behavior - removed hashmap from layout message handler - removed no op message from layoutMessage * cargo fmt * only send documentBar when zoom or rotation is updated * ctrl-0 changes zoom properly * Code review changes Co-authored-by: Keavon Chambers <keavon@keavon.com>
31 lines
801 B
Rust
31 lines
801 B
Rust
use crate::layout::widgets::PropertyHolder;
|
|
use crate::message_prelude::*;
|
|
use crate::viewport_tools::tool::ToolActionHandlerData;
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Default)]
|
|
pub struct Crop;
|
|
|
|
#[remain::sorted]
|
|
#[impl_message(Message, ToolMessage, Crop)]
|
|
#[derive(PartialEq, Clone, Debug, Hash, Serialize, Deserialize)]
|
|
pub enum CropMessage {
|
|
// Standard messages
|
|
// #[remain::unsorted]
|
|
// Abort,
|
|
|
|
// Tool-specific messages
|
|
MouseMove,
|
|
}
|
|
|
|
impl<'a> MessageHandler<ToolMessage, ToolActionHandlerData<'a>> for Crop {
|
|
fn process_action(&mut self, action: ToolMessage, data: ToolActionHandlerData<'a>, responses: &mut VecDeque<Message>) {
|
|
todo!("{}::handle_input {:?} {:?} {:?} ", module_path!(), action, data, responses);
|
|
}
|
|
|
|
advertise_actions!();
|
|
}
|
|
|
|
impl PropertyHolder for Crop {}
|