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.

121 lines
4.6KB

  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 <FL/Fl.H>
  20. /* class Fl_Theme */
  21. /* { */
  22. /* public: */
  23. /* virtual const char *name ( void ) const = 0; */
  24. /* virtual const char *author ( void ) const = 0; */
  25. /* virtual const char *description ( void ) const = 0; */
  26. /* virtual void up_box ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  27. /* virtual void down_box ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  28. /* virtual void thin_up_box ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  29. /* virtual void thin_down_box ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  30. /* virtual void round_up_box ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  31. /* virtual void round_down_box ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  32. /* virtual void rounded_box ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  33. /* virtual void oval_box ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  34. /* virtual void shadow_box ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  35. /* virtual void rshadow_box ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  36. /* virtual void diamond_box ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  37. /* virtual void check_on ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  38. /* virtual void check_off ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  39. /* virtual void radio_on ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  40. /* virtual void radio_off ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  41. /* virtual void up_frame ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  42. /* virtual void down_frame ( int X, int Y, int W, int H, Fl_Color c ) = 0; */
  43. /* }; */
  44. class Fl_Color_Scheme
  45. {
  46. Fl_Color_Scheme *next;
  47. static int total;
  48. static Fl_Color_Scheme *first;
  49. Fl_Color _bg;
  50. Fl_Color _bg2;
  51. Fl_Color _fg;
  52. Fl_Color _sel;
  53. const char *_name;
  54. public:
  55. const char *name ( void ) const { return _name; }
  56. Fl_Color_Scheme ( const char *name, Fl_Color background, Fl_Color background2, Fl_Color foreground, Fl_Color selection )
  57. {
  58. _bg = background;
  59. _bg2 = background2;
  60. _fg = foreground;
  61. _sel = selection;
  62. _name = name;
  63. }
  64. static void add ( Fl_Color_Scheme *td );
  65. static Fl_Color_Scheme **get ( void );
  66. static int set ( const char *name );
  67. static void save ( void );
  68. };
  69. class Fl_Theme
  70. {
  71. Fl_Theme *next;
  72. static int total;
  73. static Fl_Theme *first;
  74. static Fl_Theme *_current;
  75. const char *_name;
  76. const char *_description;
  77. const char *_author;
  78. void (*_init_func)(void);
  79. public:
  80. const char *name ( void ) const { return _name; }
  81. const char *description ( void ) { return _description; }
  82. const char *author ( void ) { return _author; }
  83. Fl_Theme( const char *name, const char *description, const char *author, void (*init_func)(void) )
  84. {
  85. _name = name;
  86. _description = description;
  87. _author = author;
  88. _init_func = init_func;
  89. }
  90. static void add ( Fl_Theme *td );
  91. static Fl_Theme **get ( void );
  92. static int set ( void );
  93. static int set ( const char *name );
  94. static const Fl_Theme *current ( void ) { return _current; }
  95. };