Assists music production by grouping standalone programs into sessions. Community version of "Non Session Manager".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
3.0KB

  1. /*******************************************************************************/
  2. /* Copyright (C) 2008 Jonathan Moore Liles */
  3. /* */
  4. /* This program is free software; you can redistribute it and/or modify it */
  5. /* under the terms of the GNU General Public License as published by the */
  6. /* Free Software Foundation; either version 2 of the License, or (at your */
  7. /* option) any later version. */
  8. /* */
  9. /* This program is distributed in the hope that it will be useful, but WITHOUT */
  10. /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
  11. /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for */
  12. /* more details. */
  13. /* */
  14. /* You should have received a copy of the GNU General Public License along */
  15. /* with This program; see the file COPYING. If not,write to the Free Software */
  16. /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  17. /*******************************************************************************/
  18. #include <FL/Fl.H>
  19. #include <FL/Fl_Window.H>
  20. #include <FL/Fl_Double_Window.H>
  21. #include <FL/Fl_Overlay_Window.H>
  22. #include <FL/Fl_Scroll.H>
  23. // #include <FL/Fl_Scrollbar.H>
  24. #include <FL/Fl_Pack.H>
  25. #include <FL/Fl_Group.H>
  26. #include <FL/Fl_Slider.H>
  27. #include <FL/Fl_Button.H>
  28. #include "Scalebar.H"
  29. // #include "Waveform.H"
  30. #include "Region.H"
  31. #include <stdio.h>
  32. #include <unistd.h>
  33. #include <sys/stat.h>
  34. #include <stdlib.h>
  35. #include <string.h>
  36. #include "Track.H"
  37. #include "Audio_Track.H"
  38. #include "Timeline.H"
  39. #include "Tempo_Track.H"
  40. #include "Time_Track.H"
  41. #include "Control_Track.H"
  42. #include "Loggable.H"
  43. #include "Track_Header.H"
  44. #include "const.h"
  45. Timeline *timeline;
  46. void cb_undo ( Fl_Widget *w, void *v )
  47. {
  48. Loggable::undo();
  49. }
  50. int
  51. main ( int argc, char **argv )
  52. {
  53. Fl_Window *main_window = new Fl_Window( 0, 0, 1024, 768 );
  54. Fl::visual( FL_RGB8 );
  55. Fl::get_system_colors();
  56. Fl::scheme( "plastic" );
  57. // Fl::scheme( "gtk+" );
  58. Loggable::open( "history" );
  59. /* welcome to C++ */
  60. Loggable::register_create( "Region", &Region::create );
  61. Loggable::register_create( "Tempo_Point", &Tempo_Point::create );
  62. Loggable::register_create( "Time_Point", &Time_Point::create );
  63. Loggable::register_create( "Control_Point", &Control_Point::create );
  64. Loggable::register_create( "Track_Header", &Track_Header::create );
  65. timeline = new Timeline( 0, 24, main_window->w(), main_window->h() - 24, "Timeline" );
  66. Fl_Button *o = new Fl_Button( 0, 0, 50, 24, "undo" );
  67. o->shortcut( FL_CTRL + 'z' );
  68. o->callback( cb_undo, 0 );
  69. main_window->end();
  70. main_window->show( argc, argv );
  71. Fl::run();
  72. }