-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: add comment areas to node editor
Closes #228
- Loading branch information
Showing
18 changed files
with
1,787 additions
and
1,115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use crate::{NodeDesigner, NodePath}; | ||
|
||
pub struct NodeCommentArea { | ||
pub parent: Option<NodePath>, | ||
pub designer: NodeDesigner, | ||
pub width: f64, | ||
pub height: f64, | ||
pub label: Option<String>, | ||
pub show_background: bool, | ||
pub show_border: bool, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use crate::commands::StaticNodeDescriptor; | ||
use crate::Pipeline; | ||
use mizer_commander::{Query, Ref}; | ||
use serde::{Deserialize, Serialize}; | ||
use mizer_node::NodeCommentArea; | ||
|
||
#[derive(Debug, Clone, Deserialize, Serialize)] | ||
pub struct ListCommentsQuery; | ||
|
||
impl<'a> Query<'a> for ListCommentsQuery { | ||
type Dependencies = Ref<Pipeline>; | ||
type Result = Vec<NodeCommentArea>; | ||
|
||
#[profiling::function] | ||
fn query(&self, pipeline: &Pipeline) -> anyhow::Result<Self::Result> { | ||
let comments = pipeline.list_comments().cloned().collect(); | ||
|
||
Ok(comments) | ||
} | ||
|
||
fn requires_main_loop(&self) -> bool { | ||
true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.