2012-04-07 16:04:13 +00:00
|
|
|
#include "ardour/debug.h"
|
2008-06-02 21:41:35 +00:00
|
|
|
#include "surface.h"
|
|
|
|
|
|
|
|
|
|
#include <sstream>
|
|
|
|
|
#include <iomanip>
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
using namespace std;
|
2012-04-07 16:04:13 +00:00
|
|
|
using namespace PBD;
|
2008-06-02 21:41:35 +00:00
|
|
|
using namespace Mackie;
|
|
|
|
|
|
|
|
|
|
Surface::Surface( uint32_t max_strips, uint32_t unit_strips )
|
2012-04-07 18:43:06 +00:00
|
|
|
: _max_strips (max_strips)
|
|
|
|
|
, _unit_strips( unit_strips )
|
2008-06-02 21:41:35 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Surface::init()
|
|
|
|
|
{
|
2012-04-07 16:04:13 +00:00
|
|
|
DEBUG_TRACE (DEBUG::MackieControl, "Surface::init\n");
|
2012-04-07 18:43:06 +00:00
|
|
|
init_controls ();
|
|
|
|
|
init_strips ();
|
2012-04-07 16:04:13 +00:00
|
|
|
DEBUG_TRACE (DEBUG::MackieControl, "Surface::init finish\n");
|
2008-06-02 21:41:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Surface::~Surface()
|
|
|
|
|
{
|
|
|
|
|
// delete groups
|
|
|
|
|
for( Groups::iterator it = groups.begin(); it != groups.end(); ++it )
|
|
|
|
|
{
|
|
|
|
|
delete it->second;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// delete controls
|
|
|
|
|
for( Controls::iterator it = controls.begin(); it != controls.end(); ++it )
|
|
|
|
|
{
|
|
|
|
|
delete *it;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|