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.

110 lines
3.2KB

  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 "Sequence.H"
  37. #include "Audio_Sequence.H"
  38. #include "Timeline.H"
  39. #include "Tempo_Sequence.H"
  40. #include "Time_Sequence.H"
  41. #include "Control_Sequence.H"
  42. #include "Transport.H"
  43. #include "Loggable.H"
  44. #include "Track.H"
  45. #include "Engine.H"
  46. Engine *engine;
  47. Timeline *timeline;
  48. Transport *transport;
  49. void cb_undo ( Fl_Widget *w, void *v )
  50. {
  51. Loggable::undo();
  52. }
  53. int
  54. main ( int argc, char **argv )
  55. {
  56. Fl_Window *main_window = new Fl_Window( 0, 0, 1024, 768 );
  57. Fl::visual( FL_RGB8 );
  58. Fl::visible_focus( 0 );
  59. Fl::get_system_colors();
  60. Fl::scheme( "plastic" );
  61. // Fl::scheme( "gtk+" );
  62. /* welcome to C++ */
  63. LOG_REGISTER_CREATE( Region );
  64. LOG_REGISTER_CREATE( Time_Point );
  65. LOG_REGISTER_CREATE( Tempo_Point );
  66. LOG_REGISTER_CREATE( Control_Point );
  67. LOG_REGISTER_CREATE( Track );
  68. LOG_REGISTER_CREATE( Audio_Sequence );
  69. LOG_REGISTER_CREATE( Control_Sequence );
  70. /* TODO: change to seesion dir */
  71. transport = new Transport( 0, 0, 300, 24 );
  72. main_window->add( transport );
  73. /* we don't really need a pointer for this */
  74. engine = new Engine;
  75. engine->init();
  76. timeline = new Timeline( 0, 24, main_window->w(), main_window->h() - 24, "Timeline" );
  77. Loggable::open( "history" );
  78. Fl_Button *o = new Fl_Button( 0, 0, 50, 24, "undo" );
  79. o->shortcut( FL_CTRL + 'z' );
  80. o->callback( cb_undo, 0 );
  81. main_window->end();
  82. main_window->show( argc, argv );
  83. Fl::run();
  84. }