Loopp/src/gui.hxx

111 lines
2.5 KiB
C++
Raw Normal View History

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
#include <vector>
#include <string>
2013-04-20 12:50:30 +02:00
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
2013-04-20 12:50:30 +02:00
#include "goptions.hxx"
#include "config.hxx"
2013-04-20 13:20:46 +02:00
#include "gtrack.hxx"
#include "gunittrack.hxx"
#include "gmastertrack.hxx"
#include "gaudioeditor.hxx"
2013-04-20 13:20:46 +02:00
#include "diskwriter.hxx"
#include "diskreader.hxx"
// non-session-manager integration
#include "nsm.h"
using namespace std;
class AudioBuffer;
2013-04-20 12:50:30 +02:00
class Gui
{
public:
Gui(std::string argZero);
~Gui();
2013-04-20 12:50:30 +02:00
int show();
int quit();
2013-09-21 02:10:01 +02:00
void askQuit();
/// returns the options window
OptionsWindow* getOptionsWindow();
/// open audio editor window with an AudioBuffer
AudioEditor* getAudioEditor();
2013-10-01 17:04:59 +02:00
/// resets the state to "new"
void reset();
GTrack* getTrack(int id);
2013-07-27 17:37:54 +02:00
GMasterTrack* getMasterTrack(){return master;}
2013-07-24 20:09:35 +02:00
DiskWriter* getDiskWriter(){return diskWriter;}
DiskReader* getDiskReader(){return diskReader;}
/// used to load samples into the grid
void selectLoadSample( int track, int clip );
/// allows the user to select a Controller definition
static void selectLoadController(Fl_Widget* w, void*);
2013-09-23 11:53:58 +02:00
int samplerate;
2013-11-02 14:41:26 +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:
Fl_Double_Window window;
Fl_Group* lupppGroup;
OptionsWindow* optionWindow;
AudioEditor* audioEditor;
DiskReader* diskReader;
DiskWriter* diskWriter;
GMasterTrack* master;
vector<GTrack*> tracks;
2013-07-24 20:09:35 +02:00
// FIXME: refactor tooltip code out..?
2013-07-25 00:23:30 +02:00
std::string tooltip;
Fl_Box* tooltipLabel;
// non-session-manager
nsm_client_t* nsm;
2013-04-20 12:50:30 +02:00
};
#endif // LUPPP_GUI