mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 11:28:30 +08:00
Build the node graph frontend with placeholder graph info (#581)
* Build the node graph frontend * Graph pan and zoom * Graph's dot grid now pans/zooms also * Interactive horisontal to vertical curves * Data types and zooming on wires * Icon definitions code beautification * Add a visibility toggle Co-authored-by: 0hypercube <0hypercube@gmail.com>
This commit is contained in:
co-authored by
0hypercube
parent
5571f39b41
commit
19b2d3f859
@@ -4,6 +4,7 @@ use crate::input::{InputMapperMessageHandler, InputPreprocessorMessageHandler};
|
||||
use crate::layout::layout_message_handler::LayoutMessageHandler;
|
||||
use crate::message_prelude::*;
|
||||
use crate::viewport_tools::tool_message_handler::ToolMessageHandler;
|
||||
use crate::workspace::WorkspaceMessageHandler;
|
||||
|
||||
use std::collections::VecDeque;
|
||||
|
||||
@@ -27,6 +28,7 @@ struct DispatcherMessageHandlers {
|
||||
layout_message_handler: LayoutMessageHandler,
|
||||
portfolio_message_handler: PortfolioMessageHandler,
|
||||
tool_message_handler: ToolMessageHandler,
|
||||
workspace_message_handler: WorkspaceMessageHandler,
|
||||
}
|
||||
|
||||
/// For optimization, these are messages guaranteed to be redundant when repeated.
|
||||
@@ -40,7 +42,7 @@ const SIDE_EFFECT_FREE_MESSAGES: &[MessageDiscriminant] = &[
|
||||
))),
|
||||
MessageDiscriminant::Portfolio(PortfolioMessageDiscriminant::Document(DocumentMessageDiscriminant::FolderChanged)),
|
||||
MessageDiscriminant::Frontend(FrontendMessageDiscriminant::UpdateDocumentLayer),
|
||||
MessageDiscriminant::Frontend(FrontendMessageDiscriminant::DisplayDocumentLayerTreeStructure),
|
||||
MessageDiscriminant::Frontend(FrontendMessageDiscriminant::UpdateDocumentLayerTreeStructure),
|
||||
MessageDiscriminant::Frontend(FrontendMessageDiscriminant::UpdateOpenDocumentsList),
|
||||
MessageDiscriminant::Tool(ToolMessageDiscriminant::DocumentIsDirty),
|
||||
];
|
||||
@@ -113,6 +115,11 @@ impl Dispatcher {
|
||||
&mut self.message_queue,
|
||||
);
|
||||
}
|
||||
Workspace(message) => {
|
||||
self.message_handlers
|
||||
.workspace_message_handler
|
||||
.process_action(message, &self.message_handlers.input_preprocessor_message_handler, &mut self.message_queue);
|
||||
}
|
||||
|
||||
#[remain::unsorted]
|
||||
PopulateBuildMetadata { new } => self.build_metadata = new,
|
||||
|
||||
@@ -39,6 +39,8 @@ pub enum Message {
|
||||
Portfolio(PortfolioMessage),
|
||||
#[child]
|
||||
Tool(ToolMessage),
|
||||
#[child]
|
||||
Workspace(WorkspaceMessage),
|
||||
|
||||
#[remain::unsorted]
|
||||
PopulateBuildMetadata { new: BuildMetadata },
|
||||
|
||||
Reference in New Issue
Block a user