mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 00:48:12 +08:00
Improve and clean up panic dialog code and wasm wrapper (#368)
Part of #357
This commit is contained in:
+16
-14
@@ -1,4 +1,4 @@
|
||||
// since our policy is tabs, we want to stop clippy from warning about that
|
||||
// Since our policy is tabs, we want to stop clippy from warning about that
|
||||
#![allow(clippy::tabs_in_doc_comments)]
|
||||
|
||||
extern crate graphite_proc_macros;
|
||||
@@ -6,34 +6,30 @@ extern crate graphite_proc_macros;
|
||||
mod communication;
|
||||
#[macro_use]
|
||||
pub mod misc;
|
||||
pub mod consts;
|
||||
mod document;
|
||||
mod frontend;
|
||||
mod global;
|
||||
pub mod input;
|
||||
pub mod tool;
|
||||
|
||||
pub mod consts;
|
||||
|
||||
#[doc(inline)]
|
||||
pub use graphene::color::Color;
|
||||
#[doc(inline)]
|
||||
pub use graphene::document::Document as SvgDocument;
|
||||
#[doc(inline)]
|
||||
pub use graphene::LayerId;
|
||||
#[doc(inline)]
|
||||
pub use misc::EditorError;
|
||||
|
||||
#[doc(inline)]
|
||||
pub use graphene::color::Color;
|
||||
|
||||
#[doc(inline)]
|
||||
pub use graphene::LayerId;
|
||||
|
||||
#[doc(inline)]
|
||||
pub use graphene::document::Document as SvgDocument;
|
||||
|
||||
use communication::dispatcher::Dispatcher;
|
||||
use message_prelude::*;
|
||||
|
||||
// TODO: serialize with serde to save the current editor state
|
||||
pub struct Editor {
|
||||
dispatcher: Dispatcher,
|
||||
}
|
||||
|
||||
use message_prelude::*;
|
||||
|
||||
impl Editor {
|
||||
pub fn new() -> Self {
|
||||
Self { dispatcher: Dispatcher::new() }
|
||||
@@ -49,6 +45,12 @@ impl Editor {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Editor {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
pub mod message_prelude {
|
||||
pub use crate::communication::generate_uuid;
|
||||
pub use crate::communication::message::{AsMessage, Message, MessageDiscriminant};
|
||||
|
||||
Reference in New Issue
Block a user