flatland.utils.editor_controller module#

class flatland.utils.editor_controller.Controller(model: AbstractModel, view: AbstractView)[source]#

Bases: AbstractController

Controller to handle incoming events from the ipywidgets Updates the editor/model. Calls the View directly for things which do not directly effect the model (this means the mouse drag path before it is interpreted as transitions)

clear(event)[source]#
clear_stroke(msg: str = '')[source]#
debug(*args, **kwargs)[source]#
debug_event(event)[source]#
getBoundingRectYX()[source]#
getModKeys(event: dict)[source]#
handle_event(event: Event)[source]#
load(event)[source]#
log(*args, **kwargs)[source]#
on_click(event)[source]#
on_mouse_move(event: dict)[source]#

Mouse motion event handler for drawing.

refresh(event)[source]#
regenerate(event)[source]#
reset(event)[source]#
reset_agents(event)[source]#
rotate_agent(event)[source]#
save(event)[source]#
save_image(event)[source]#
set_debug(event)[source]#
set_debug_move(event)[source]#
set_draw_mode(event)[source]#
set_filename(event)[source]#
set_model(model)[source]#
set_regen_height(event)[source]#
set_regen_width(event)[source]#
step(event)[source]#