From 5128bfab7ddb9504abf17375e910e5bc94af291e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Nov 2020 21:41:26 +0100 Subject: Refresh by emitting events This decouples drivers from the rest of the application, in particular the horrible situation where they were working with the canvas directly, by having them always communicate changes by emitting events. --- src/PatchageCanvas.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/PatchageCanvas.hpp') diff --git a/src/PatchageCanvas.hpp b/src/PatchageCanvas.hpp index 0debcf8..073b3fb 100644 --- a/src/PatchageCanvas.hpp +++ b/src/PatchageCanvas.hpp @@ -36,6 +36,7 @@ PATCHAGE_RESTORE_WARNINGS #include #include +class Patchage; class PatchageModule; class PatchagePort; class Connector; @@ -45,6 +46,13 @@ class PatchageCanvas : public Ganv::Canvas public: PatchageCanvas(Connector& connector, int width, int height); + PatchageModule* create_module(Patchage& patchage, + const ClientID& id, + const ClientInfo& info); + + PatchagePort* + create_port(Patchage& patchage, const PortID& id, const PortInfo& info); + PatchageModule* find_module(const ClientID& id, SignalDirection type); PatchagePort* find_port(const PortID& id); -- cgit v1.2.1