#![allow(dead_code)]
pub mod buffer;
pub mod components;
pub mod events;
pub mod focus;
pub mod layout;
pub mod schedules;
use bevy::prelude::{App, Plugin};
use events::{
command::CommandRequested,
cursor::{CursorMoveRequested, CursorMoved},
edit::{BufferEditRequested, BufferEdited},
focus::FocusRequested,
input::EditorInputEvent,
intent::ViewportIntent,
lifecycle::LifecycleRequested,
status::StatusMessageRequested,
};
use schedules::configure_editor_sets;
pub use buffer::{BufferPlugin, InitialEditorBuffer};
pub use focus::FocusPlugin;
pub use layout::{LayoutPlugin, TextShapePlugin};
#[derive(Clone, Copy, Debug, Default)]
pub struct EditorCorePlugin;
impl Plugin for EditorCorePlugin {
fn build(&self, app: &mut App) {
configure_editor_sets(app);
let _app = app
.add_message::<EditorInputEvent>()
.add_message::<ViewportIntent>()
.add_message::<CommandRequested>()
.add_message::<BufferEditRequested>()
.add_message::<BufferEdited>()
.add_message::<CursorMoveRequested>()
.add_message::<CursorMoved>()
.add_message::<FocusRequested>()
.add_message::<StatusMessageRequested>()
.add_message::<LifecycleRequested>();
}
}