2007-02-07 07:57:53 +02:00
|
|
|
/* This file is part of Patchage.
|
|
|
|
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
|
2006-06-09 05:18:57 +03:00
|
|
|
*
|
|
|
|
* Patchage is free software; you can redistribute it and/or modify it under the
|
|
|
|
* terms of the GNU General Public License as published by the Free Software
|
|
|
|
* Foundation; either version 2 of the License, or (at your option) any later
|
|
|
|
* version.
|
|
|
|
*
|
|
|
|
* Patchage is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
2007-04-06 07:29:27 +03:00
|
|
|
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2006-06-09 05:18:57 +03:00
|
|
|
*/
|
|
|
|
|
2008-03-16 19:08:02 +02:00
|
|
|
#ifndef PATCHAGE_PATCHAGECANVAS_HPP
|
|
|
|
#define PATCHAGE_PATCHAGECANVAS_HPP
|
2006-06-09 05:18:57 +03:00
|
|
|
|
2008-10-03 04:10:58 +03:00
|
|
|
#include "config.h"
|
2006-06-09 05:18:57 +03:00
|
|
|
#include <string>
|
2007-07-24 22:26:47 +03:00
|
|
|
#include <flowcanvas/Canvas.hpp>
|
|
|
|
#include "StateManager.hpp"
|
2006-11-11 03:00:47 +02:00
|
|
|
|
2006-06-09 05:18:57 +03:00
|
|
|
class Patchage;
|
|
|
|
class PatchageModule;
|
|
|
|
class PatchagePort;
|
|
|
|
|
|
|
|
using std::string;
|
2007-06-06 05:51:08 +03:00
|
|
|
using namespace FlowCanvas;
|
2006-06-09 05:18:57 +03:00
|
|
|
|
2008-01-02 06:14:26 +02:00
|
|
|
class PatchageCanvas : public Canvas {
|
2006-06-09 05:18:57 +03:00
|
|
|
public:
|
2007-06-06 05:51:08 +03:00
|
|
|
PatchageCanvas(Patchage* _app, int width, int height);
|
2006-06-09 05:18:57 +03:00
|
|
|
|
2006-10-02 23:56:28 +03:00
|
|
|
boost::shared_ptr<PatchageModule> find_module(const string& name, ModuleType type);
|
2008-02-23 20:48:59 +02:00
|
|
|
|
2007-02-07 07:31:08 +02:00
|
|
|
void connect(boost::shared_ptr<Connectable> port1, boost::shared_ptr<Connectable> port2);
|
|
|
|
void disconnect(boost::shared_ptr<Connectable> port1, boost::shared_ptr<Connectable> port2);
|
2006-06-09 05:18:57 +03:00
|
|
|
|
|
|
|
void status_message(const string& msg);
|
2007-03-12 20:13:03 +02:00
|
|
|
|
|
|
|
boost::shared_ptr<Item> get_item(const string& name);
|
2008-08-02 20:07:04 +03:00
|
|
|
|
|
|
|
boost::shared_ptr<PatchagePort>
|
|
|
|
get_port(
|
|
|
|
const string& module_name,
|
|
|
|
const string& port_name);
|
|
|
|
|
|
|
|
boost::shared_ptr<PatchagePort>
|
|
|
|
lookup_port_by_a2j_jack_port_name(
|
|
|
|
const char * a2j_jack_port_name);
|
2006-06-09 05:18:57 +03:00
|
|
|
|
|
|
|
private:
|
2007-02-07 05:22:42 +02:00
|
|
|
Patchage* _app;
|
2006-06-09 05:18:57 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-16 19:08:02 +02:00
|
|
|
#endif // PATCHAGE_PATCHAGECANVAS_HPP
|