2013-12-08 22:44:43 +01:00
|
|
|
/*
|
|
|
|
* Author: Harry van Haaren 2013
|
|
|
|
* harryhaaren@gmail.com
|
|
|
|
*
|
|
|
|
* This program 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 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2013-04-20 12:50:30 +02:00
|
|
|
|
|
|
|
#ifndef LUPPP_GUI
|
|
|
|
#define LUPPP_GUI
|
|
|
|
|
2013-10-23 18:03:54 +02:00
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
2013-04-20 12:50:30 +02:00
|
|
|
#include <FL/Fl.H>
|
2013-05-13 03:43:44 +02:00
|
|
|
#include <FL/Fl_Double_Window.H>
|
2013-04-20 12:50:30 +02:00
|
|
|
|
2013-10-18 14:49:46 +02:00
|
|
|
#include "goptions.hxx"
|
|
|
|
|
2013-05-16 02:38:11 +02:00
|
|
|
#include "config.hxx"
|
2013-04-20 13:20:46 +02:00
|
|
|
#include "gtrack.hxx"
|
2013-07-22 12:53:08 +02:00
|
|
|
#include "gunittrack.hxx"
|
2013-05-16 02:38:11 +02:00
|
|
|
#include "gmastertrack.hxx"
|
2013-10-12 00:21:56 +02:00
|
|
|
#include "gaudioeditor.hxx"
|
2013-04-20 13:20:46 +02:00
|
|
|
|
2013-09-04 23:32:46 +02:00
|
|
|
#include "diskwriter.hxx"
|
|
|
|
#include "diskreader.hxx"
|
|
|
|
|
2013-10-23 18:03:54 +02:00
|
|
|
// non-session-manager integration
|
|
|
|
#include "nsm.h"
|
|
|
|
|
2013-05-13 03:43:44 +02:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2013-10-12 00:21:56 +02:00
|
|
|
class AudioBuffer;
|
|
|
|
|
2013-04-20 12:50:30 +02:00
|
|
|
class Gui
|
|
|
|
{
|
|
|
|
public:
|
2013-11-07 23:42:28 +01:00
|
|
|
Gui(std::string argZero);
|
2013-10-12 00:21:56 +02:00
|
|
|
~Gui();
|
|
|
|
|
2013-04-20 12:50:30 +02:00
|
|
|
int show();
|
2013-09-21 01:52:29 +02:00
|
|
|
|
|
|
|
int quit();
|
2013-09-21 02:10:01 +02:00
|
|
|
void askQuit();
|
2013-09-21 01:52:29 +02:00
|
|
|
|
2013-10-18 14:49:46 +02:00
|
|
|
/// returns the options window
|
|
|
|
OptionsWindow* getOptionsWindow();
|
2013-09-25 15:27:04 +02:00
|
|
|
|
2013-10-12 00:21:56 +02:00
|
|
|
/// open audio editor window with an AudioBuffer
|
2013-10-12 01:06:15 +02:00
|
|
|
AudioEditor* getAudioEditor();
|
2013-10-12 00:21:56 +02:00
|
|
|
|
2013-10-01 17:04:59 +02:00
|
|
|
/// resets the state to "new"
|
|
|
|
void reset();
|
|
|
|
|
2013-05-16 14:38:46 +02:00
|
|
|
GTrack* getTrack(int id);
|
2013-07-27 17:37:54 +02:00
|
|
|
GMasterTrack* getMasterTrack(){return master;}
|
2013-07-24 20:09:35 +02:00
|
|
|
|
2013-09-03 21:06:11 +02:00
|
|
|
DiskWriter* getDiskWriter(){return diskWriter;}
|
2013-09-04 23:32:46 +02:00
|
|
|
DiskReader* getDiskReader(){return diskReader;}
|
2013-09-03 21:06:11 +02:00
|
|
|
|
2013-09-25 20:36:23 +02:00
|
|
|
/// used to load samples into the grid
|
2013-09-05 19:33:16 +02:00
|
|
|
void selectLoadSample( int track, int clip );
|
2013-09-25 20:36:23 +02:00
|
|
|
|
|
|
|
/// allows the user to select a Controller definition
|
|
|
|
static void selectLoadController(Fl_Widget* w, void*);
|
2013-10-18 02:28:00 +02:00
|
|
|
|
|
|
|
|
2013-09-23 11:53:58 +02:00
|
|
|
int samplerate;
|
2013-11-02 14:41:26 +01:00
|
|
|
|
2013-11-19 17:57:57 +01:00
|
|
|
int getWindowWidth(){return window.w();}
|
|
|
|
|
2013-11-02 14:41:26 +01:00
|
|
|
nsm_client_t* getNsm(){return nsm;}
|
2013-09-23 11:53:58 +02:00
|
|
|
|
2013-04-20 12:50:30 +02:00
|
|
|
private:
|
2013-05-16 00:27:31 +02:00
|
|
|
Fl_Double_Window window;
|
2013-10-18 14:49:46 +02:00
|
|
|
|
2013-11-19 16:02:32 +01:00
|
|
|
Fl_Group* lupppGroup;
|
|
|
|
|
2013-10-18 14:49:46 +02:00
|
|
|
OptionsWindow* optionWindow;
|
2013-05-16 02:38:11 +02:00
|
|
|
|
2013-10-12 00:21:56 +02:00
|
|
|
AudioEditor* audioEditor;
|
2013-09-25 15:27:04 +02:00
|
|
|
|
2013-09-04 23:32:46 +02:00
|
|
|
DiskReader* diskReader;
|
2013-09-03 21:06:11 +02:00
|
|
|
DiskWriter* diskWriter;
|
|
|
|
|
2013-05-16 02:38:11 +02:00
|
|
|
GMasterTrack* master;
|
|
|
|
|
2013-05-16 00:27:31 +02:00
|
|
|
vector<GTrack*> tracks;
|
2013-07-24 20:09:35 +02:00
|
|
|
|
2013-10-12 00:21:56 +02:00
|
|
|
// FIXME: refactor tooltip code out..?
|
2013-07-25 00:23:30 +02:00
|
|
|
std::string tooltip;
|
|
|
|
Fl_Box* tooltipLabel;
|
2013-10-23 18:03:54 +02:00
|
|
|
|
|
|
|
// non-session-manager
|
|
|
|
nsm_client_t* nsm;
|
2013-04-20 12:50:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LUPPP_GUI
|