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.

138 lines
3.9KB

  1. /*******************************************************************************/
  2. /* Copyright (C) 2010 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. #pragma once
  19. #include <FL/Fl.H>
  20. #include "DPM.H"
  21. #include "Panner.H"
  22. #include <FL/Fl_Scalepack.H>
  23. #include <FL/Fl_Pack.H>
  24. #include <FL/Fl_Flip_Button.H>
  25. #include <FL/Fl_Arc_Dial.H>
  26. #include <FL/Boxtypes.H>
  27. #include <FL/Fl_Group.H>
  28. #include <FL/Fl_Box.H>
  29. #include <FL/Fl_Button.H>
  30. #include <FL/Fl_Value_Slider.H>
  31. #include <FL/Fl_Counter.H>
  32. #include <FL/Fl_Progress.H>
  33. //#include "Fader.H"
  34. #include <JACK/Port.H>
  35. #include "../FL/Fl_Sometimes_Input.H"
  36. #include "Loggable.H"
  37. class Chain;
  38. class Fl_Flowpack;
  39. class Controller_Module;
  40. class Meter_Indicator_Module;
  41. class Module;
  42. class Fl_Flip_Button;
  43. class Fl_Input;
  44. class Fl_Menu_;
  45. class Fl_Menu_Button;
  46. class Mixer_Strip : public Fl_Group, public Loggable {
  47. public:
  48. static int min_h ( void ) { return 250; }
  49. Mixer_Strip( const char *strip_name );
  50. Mixer_Strip(); /* for log create */
  51. virtual ~Mixer_Strip();
  52. void chain ( Chain *c );
  53. void log_children ( void );
  54. virtual void color ( Fl_Color c );
  55. virtual Fl_Color color ( void ) const;
  56. LOG_CREATE_FUNC( Mixer_Strip );
  57. static void configure_outputs ( Fl_Widget *o, void *v );
  58. void configure_outputs ( void );
  59. bool configure_ports ( int n );
  60. void handle_module_added ( Module *m );
  61. void update ( void );
  62. void name ( const char *name );
  63. const char *name ( void ) const { return label(); }
  64. private:
  65. Fl_Flip_Button *width_button;
  66. Fl_Flip_Button *tab_button;
  67. Fl_Button *close_button;
  68. Fl_Button *left_button;
  69. Fl_Button *right_button;
  70. Fl_Input *name_field;
  71. Fl_Flowpack *controls_pack;
  72. Fl_Group *signal_tab;
  73. Fl_Group *fader_tab;
  74. Fl_Pack *panner_pack;
  75. Chain *_chain;
  76. Controller_Module *gain_controller;
  77. Controller_Module *jack_input_controller;
  78. Meter_Indicator_Module *meter_indicator;
  79. nframes_t nframes;
  80. Fl_Color _color;
  81. void init ( );
  82. void cb_handle(Fl_Widget*);
  83. static void cb_handle(Fl_Widget*, void*);
  84. void set_tab ( void );
  85. void update_port_names ( void );
  86. void menu_cb ( const Fl_Menu_ *m );
  87. static void menu_cb ( Fl_Widget *w, void *v );
  88. Fl_Menu_Button & menu ( void ) const;
  89. protected:
  90. void get ( Log_Entry &e ) const;
  91. void set ( Log_Entry &e );
  92. virtual int handle ( int m );
  93. virtual void draw ( void );
  94. public:
  95. void command_move_left ( void );
  96. void command_move_right ( void );
  97. void command_close ( void );
  98. void command_rename ( const char * s );
  99. void command_width ( bool b );
  100. void command_view ( bool b );
  101. };