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.

87 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. #pragma once
  19. #include "event.H"
  20. #include <list>
  21. using std::list;
  22. class midievent;
  23. class event_list {
  24. event * _head;
  25. event * _tail;
  26. size_t _size;
  27. void _insert ( event *o, event *n );
  28. void _copy ( const event_list *el );
  29. void _hi_lo ( bool sel, int *hi, int *lo ) const;
  30. public:
  31. event_list ( void );
  32. ~event_list ( void );
  33. event_list ( const event_list &el );
  34. void clear ( void );
  35. void merge ( event_list *el );
  36. void unlink ( event *e );
  37. void remove ( event *e );
  38. void insert ( event *e );
  39. event * first ( void ) const;
  40. event * last ( void ) const;
  41. void select ( tick_t start, tick_t end );
  42. void select_all ( void );
  43. void select_none ( void );
  44. void remove_selected ( void );
  45. void transpose_selected ( int n );
  46. tick_t selection_min ( void );
  47. tick_t selection_max ( void );
  48. void move_selected ( long o );
  49. void push_selection ( void );
  50. void pop_selection ( void );
  51. bool verify ( void ) const;
  52. void link ( event *on );
  53. void insert_time ( tick_t start, tick_t l );
  54. void delete_time ( tick_t start, tick_t end );
  55. void relink ( void );
  56. void sort ( event *e );
  57. void sort ( void );
  58. void move ( event *e, long o );
  59. bool empty ( void ) const;
  60. size_t size ( void ) const;
  61. void append ( event *e );
  62. void mix ( event *ne );
  63. void hi_lo_note ( int *hi, int *lo ) const;
  64. void rewrite_selected ( int from, int to );
  65. void selected_hi_lo_note ( int *hi, int *lo ) const;
  66. event_list & operator= ( const event_list &rhs );
  67. event_list & operator= ( const list <midievent> &rhs );
  68. event *operator[] ( unsigned int index );
  69. // friend class event;
  70. };