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.

75 lines
2.5KB

  1. /*******************************************************************************/
  2. /* Copyright (C) 2012 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 "Sequence_Region.H"
  20. #include "Cursor_Sequence.H"
  21. class Cursor_Region : public Sequence_Region
  22. {
  23. /* not permitted */
  24. Cursor_Region & operator = ( const Cursor_Region &rhs );
  25. char *_type;
  26. protected:
  27. virtual void get ( Log_Entry &e ) const;
  28. virtual void set ( Log_Entry &e );
  29. Cursor_Region ( )
  30. {
  31. _label = NULL;
  32. _type = NULL;
  33. }
  34. Cursor_Region ( const Cursor_Region &rhs );
  35. public:
  36. virtual Fl_Color box_color ( void ) const;
  37. virtual void box_color ( Fl_Color c );
  38. /* for loggable */
  39. LOG_CREATE_FUNC( Cursor_Region );
  40. SEQUENCE_WIDGET_CLONE_FUNC( Cursor_Region );
  41. Cursor_Region ( nframes_t when, nframes_t length, const char *type, const char *label );
  42. virtual ~Cursor_Region ( );
  43. void draw_box ( void );
  44. void draw ( void );
  45. int handle ( int m );
  46. const char * type ( void ) const { return _type; }
  47. void type ( const char *v )
  48. {
  49. if ( _type )
  50. free( _type );
  51. _type = NULL;
  52. if ( v )
  53. _type = strdup( v );
  54. }
  55. };