mirror of https://codeberg.org/topola/topola.git
refactor: move `Interactor<...>` and friends to new module dir, `interactor`
This commit is contained in:
parent
23d1eaa722
commit
c1df3ba8ad
|
|
@ -1,12 +1,9 @@
|
|||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||
|
||||
mod action;
|
||||
mod activity;
|
||||
mod app;
|
||||
mod config;
|
||||
mod error_dialog;
|
||||
mod interaction;
|
||||
mod interactor;
|
||||
mod layers;
|
||||
mod menu_bar;
|
||||
mod overlay;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ use topola::{
|
|||
autorouter::{
|
||||
execution::Command, invoker::InvokerError, selection::Selection, AutorouterOptions,
|
||||
},
|
||||
interactor::{
|
||||
activity::{ActivityContext, ActivityStepperWithStatus},
|
||||
interaction::InteractionContext,
|
||||
},
|
||||
router::RouterOptions,
|
||||
specctra::design::{LoadingError as SpecctraLoadingError, SpecctraDesign},
|
||||
stepper::Abort,
|
||||
|
|
@ -11,9 +15,7 @@ use topola::{
|
|||
|
||||
use crate::{
|
||||
action::{Action, Switch, Trigger},
|
||||
activity::{ActivityContext, ActivityStepperWithStatus},
|
||||
app::{execute, handle_file},
|
||||
interaction::InteractionContext,
|
||||
translator::Translator,
|
||||
viewport::Viewport,
|
||||
workspace::Workspace,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
use std::ops::ControlFlow;
|
||||
|
||||
use crate::{activity::ActivityStepperWithStatus, translator::Translator, viewport::Viewport};
|
||||
use topola::interactor::activity::ActivityStepperWithStatus;
|
||||
|
||||
use crate::{translator::Translator, viewport::Viewport};
|
||||
|
||||
pub struct StatusBar {}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,19 +5,16 @@ use std::{
|
|||
|
||||
use topola::{
|
||||
autorouter::{history::History, invoker::Invoker, Autorouter},
|
||||
interactor::{
|
||||
activity::{ActivityContext, ActivityStepperWithStatus},
|
||||
interaction::InteractionContext,
|
||||
Interactor,
|
||||
},
|
||||
specctra::{design::SpecctraDesign, mesadata::SpecctraMesadata},
|
||||
stepper::Step,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
activity::{ActivityContext, ActivityStepperWithStatus},
|
||||
error_dialog::ErrorDialog,
|
||||
interaction::InteractionContext,
|
||||
interactor::Interactor,
|
||||
layers::Layers,
|
||||
overlay::Overlay,
|
||||
translator::Translator,
|
||||
};
|
||||
use crate::{error_dialog::ErrorDialog, layers::Layers, overlay::Overlay, translator::Translator};
|
||||
|
||||
/// A loaded design and associated structures
|
||||
pub struct Workspace {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
use std::ops::ControlFlow;
|
||||
|
||||
use thiserror::Error;
|
||||
use topola::{
|
||||
|
||||
use crate::{
|
||||
autorouter::{
|
||||
execution::ExecutionStepper,
|
||||
invoker::{
|
||||
|
|
@ -11,12 +12,11 @@ use topola::{
|
|||
board::mesadata::AccessMesadata,
|
||||
drawing::graph::PrimitiveIndex,
|
||||
geometry::primitive::PrimitiveShape,
|
||||
interactor::interaction::{InteractionContext, InteractionError, InteractionStepper},
|
||||
router::{navcord::NavcordStepper, navmesh::Navmesh},
|
||||
stepper::{Abort, Step},
|
||||
};
|
||||
|
||||
use crate::interaction::{InteractionContext, InteractionError, InteractionStepper};
|
||||
|
||||
pub struct ActivityContext<'a, M: AccessMesadata> {
|
||||
pub interaction: InteractionContext,
|
||||
pub invoker: &'a mut Invoker<M>,
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
use std::ops::ControlFlow;
|
||||
|
||||
use thiserror::Error;
|
||||
use topola::{
|
||||
|
||||
use crate::{
|
||||
autorouter::invoker::{GetGhosts, GetMaybeNavcord, GetMaybeNavmesh, GetObstacles},
|
||||
drawing::graph::PrimitiveIndex,
|
||||
geometry::primitive::PrimitiveShape,
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
use std::ops::ControlFlow;
|
||||
|
||||
use spade::InsertionError;
|
||||
use topola::{
|
||||
|
||||
use crate::{
|
||||
autorouter::{
|
||||
execution::{Command, ExecutionStepper},
|
||||
execution::Command,
|
||||
history::History,
|
||||
invoker::{Invoker, InvokerError},
|
||||
Autorouter,
|
||||
},
|
||||
board::{mesadata::AccessMesadata, Board},
|
||||
stepper::{Abort, Step},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
interactor::{
|
||||
activity::{ActivityContext, ActivityError, ActivityStepperWithStatus},
|
||||
interaction::InteractionContext,
|
||||
},
|
||||
stepper::{Abort, Step},
|
||||
};
|
||||
|
||||
pub struct Interactor<M: AccessMesadata> {
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
pub mod activity;
|
||||
pub mod interaction;
|
||||
mod interactor;
|
||||
|
||||
pub use interactor::*;
|
||||
|
|
@ -12,6 +12,7 @@ pub mod drawing;
|
|||
pub mod autorouter;
|
||||
pub mod board;
|
||||
pub mod geometry;
|
||||
pub mod interactor;
|
||||
pub mod layout;
|
||||
pub mod math;
|
||||
pub mod router;
|
||||
|
|
|
|||
Loading…
Reference in New Issue