2008-02-14 06:47:12 +01:00
|
|
|
|
|
|
|
/*******************************************************************************/
|
|
|
|
/* Copyright (C) 2008 Jonathan Moore Liles */
|
|
|
|
/* */
|
|
|
|
/* 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 2 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; see the file COPYING. If not,write to the Free Software */
|
|
|
|
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
|
|
/*******************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#include <FL/Fl.H>
|
|
|
|
#include <FL/Fl_Window.H>
|
2008-02-16 05:23:58 +01:00
|
|
|
#include <FL/Fl_Double_Window.H>
|
2008-03-01 05:57:53 +01:00
|
|
|
#include <FL/Fl_Overlay_Window.H>
|
2008-02-14 06:47:12 +01:00
|
|
|
#include <FL/Fl_Scroll.H>
|
2008-02-21 10:35:03 +01:00
|
|
|
// #include <FL/Fl_Scrollbar.H>
|
2008-02-14 08:40:47 +01:00
|
|
|
#include <FL/Fl_Pack.H>
|
|
|
|
#include <FL/Fl_Group.H>
|
2008-02-17 00:12:23 +01:00
|
|
|
#include <FL/Fl_Slider.H>
|
2008-02-25 05:14:19 +01:00
|
|
|
#include <FL/Fl_Button.H>
|
2008-02-21 10:35:03 +01:00
|
|
|
|
|
|
|
#include "Scalebar.H"
|
|
|
|
|
2008-02-20 06:57:14 +01:00
|
|
|
// #include "Waveform.H"
|
2008-02-14 08:40:47 +01:00
|
|
|
#include "Region.H"
|
2008-02-14 06:47:12 +01:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2008-04-19 06:16:21 +02:00
|
|
|
#include "Sequence.H"
|
|
|
|
#include "Audio_Sequence.H"
|
2008-02-16 08:21:15 +01:00
|
|
|
#include "Timeline.H"
|
2008-04-19 06:16:21 +02:00
|
|
|
#include "Tempo_Sequence.H"
|
|
|
|
#include "Time_Sequence.H"
|
|
|
|
#include "Control_Sequence.H"
|
2008-02-21 13:57:33 +01:00
|
|
|
|
2008-02-22 21:20:44 +01:00
|
|
|
#include "Loggable.H"
|
2008-04-19 06:16:21 +02:00
|
|
|
#include "Track.H"
|
2008-03-31 12:00:47 +02:00
|
|
|
// #include "const.h"
|
2008-02-17 22:25:02 +01:00
|
|
|
|
2008-04-09 02:05:15 +02:00
|
|
|
#include "Engine.H"
|
|
|
|
|
|
|
|
Engine *engine;
|
2008-02-21 17:20:36 +01:00
|
|
|
Timeline *timeline;
|
2008-02-21 10:35:03 +01:00
|
|
|
|
2008-02-25 05:14:19 +01:00
|
|
|
void cb_undo ( Fl_Widget *w, void *v )
|
|
|
|
{
|
|
|
|
Loggable::undo();
|
|
|
|
}
|
2008-02-20 07:11:33 +01:00
|
|
|
|
2008-02-14 06:47:12 +01:00
|
|
|
int
|
|
|
|
main ( int argc, char **argv )
|
|
|
|
{
|
2008-02-29 04:14:21 +01:00
|
|
|
Fl_Window *main_window = new Fl_Window( 0, 0, 1024, 768 );
|
2008-02-14 06:47:12 +01:00
|
|
|
|
2008-03-09 06:06:37 +01:00
|
|
|
Fl::visual( FL_RGB8 );
|
|
|
|
|
2008-02-21 13:57:33 +01:00
|
|
|
Fl::get_system_colors();
|
|
|
|
Fl::scheme( "plastic" );
|
2008-03-08 05:31:38 +01:00
|
|
|
// Fl::scheme( "gtk+" );
|
2008-02-21 13:57:33 +01:00
|
|
|
|
2008-03-01 15:23:59 +01:00
|
|
|
/* welcome to C++ */
|
2008-04-21 02:28:59 +02:00
|
|
|
LOG_REGISTER_CREATE( Region );
|
|
|
|
LOG_REGISTER_CREATE( Time_Point );
|
|
|
|
LOG_REGISTER_CREATE( Tempo_Point );
|
|
|
|
LOG_REGISTER_CREATE( Control_Point );
|
|
|
|
LOG_REGISTER_CREATE( Track );
|
|
|
|
LOG_REGISTER_CREATE( Audio_Sequence );
|
|
|
|
LOG_REGISTER_CREATE( Control_Sequence );
|
2008-02-22 21:20:44 +01:00
|
|
|
|
2008-04-19 03:05:57 +02:00
|
|
|
/* TODO: change to seesion dir */
|
|
|
|
|
2008-04-09 02:05:15 +02:00
|
|
|
/* we don't really need a pointer for this */
|
|
|
|
engine = new Engine;
|
|
|
|
engine->init();
|
|
|
|
|
2008-02-29 04:14:21 +01:00
|
|
|
timeline = new Timeline( 0, 24, main_window->w(), main_window->h() - 24, "Timeline" );
|
2008-02-16 04:50:16 +01:00
|
|
|
|
2008-04-19 03:05:57 +02:00
|
|
|
Loggable::open( "history" );
|
|
|
|
|
2008-02-28 21:10:41 +01:00
|
|
|
Fl_Button *o = new Fl_Button( 0, 0, 50, 24, "undo" );
|
|
|
|
o->shortcut( FL_CTRL + 'z' );
|
2008-02-25 05:14:19 +01:00
|
|
|
o->callback( cb_undo, 0 );
|
|
|
|
|
2008-02-14 06:47:12 +01:00
|
|
|
main_window->end();
|
2008-03-08 05:31:38 +01:00
|
|
|
main_window->show( argc, argv );
|
2008-02-14 06:47:12 +01:00
|
|
|
|
|
|
|
Fl::run();
|
|
|
|
}
|