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.

90 lines
3.4KB

  1. /*******************************************************************************/
  2. /* Copyright (C) 2012 Jonathan Moore Liles */
  3. /* Copyright (C) 2001-2005 by Colin Jones */
  4. /* */
  5. /* This program is free software; you can redistribute it and/or modify it */
  6. /* under the terms of the GNU General Public License as published by the */
  7. /* Free Software Foundation; either version 2 of the License, or (at your */
  8. /* option) any later version. */
  9. /* */
  10. /* This program is distributed in the hope that it will be useful, but WITHOUT */
  11. /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
  12. /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for */
  13. /* more details. */
  14. /* */
  15. /* You should have received a copy of the GNU General Public License along */
  16. /* with This program; see the file COPYING. If not,write to the Free Software */
  17. /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  18. /*******************************************************************************/
  19. /* Taken from the "Gleam" FLTK scheme, as modified by prodatum */
  20. #include <FL/Fl.H>
  21. #include <FL/fl_draw.H>
  22. #include "FL/Fl_Theme.H"
  23. /* static void clean_color(Fl_Color c) */
  24. /* { */
  25. /* /\* if (Fl::draw_box_active()) *\/ */
  26. /* /\* fl_color(c); *\/ */
  27. /* /\* else *\/ */
  28. /* /\* fl_color(fl_inactive(c)); *\/ */
  29. /* } */
  30. static void rect(int x, int y, int w, int h, Fl_Color bc)
  31. {
  32. fl_rect( x, y, w, h, bc );
  33. }
  34. static void rectf ( int x, int y,int w, int h, Fl_Color bc )
  35. {
  36. fl_rectf( x, y, w, h, fl_color_average( FL_WHITE, bc, 0.05 ) );
  37. }
  38. static void up_frame(int x, int y, int w, int h, Fl_Color c)
  39. {
  40. rect(x, y, w, h, fl_color_average( FL_WHITE, c, 0.1 ) );
  41. }
  42. static void up_box(int x, int y, int w, int h, Fl_Color c)
  43. {
  44. rectf(x, y, w, h, c );
  45. rect(x, y, w, h, fl_color_average( FL_WHITE, c, 0.1 ) );
  46. }
  47. static void down_frame(int x, int y, int w, int h, Fl_Color c)
  48. {
  49. rect(x, y, w, h, fl_color_average( FL_BLACK, c, 0.1 ) );
  50. }
  51. static void down_box(int x, int y, int w, int h, Fl_Color c)
  52. {
  53. rectf(x, y, w, h, fl_color_average( FL_WHITE, c, 0.2 ) );
  54. rect(x, y, w, h, fl_color_average( FL_BLACK, c, 0.1 ) );
  55. }
  56. static void
  57. init_theme ( void )
  58. {
  59. /* replace the gtk+ boxes... (is there a better way?) */
  60. Fl::set_boxtype( FL_UP_BOX, up_box, 1,1,1,1 );
  61. Fl::set_boxtype( FL_DOWN_BOX, down_box, 1,1,1,1 );
  62. Fl::set_boxtype( FL_THIN_UP_BOX, up_box, 1,1,1,1 );
  63. Fl::set_boxtype( FL_THIN_DOWN_BOX, down_box, 1,1,1,1 );
  64. Fl::set_boxtype( FL_UP_FRAME, up_frame, 1,1,1,1 );
  65. Fl::set_boxtype( FL_DOWN_FRAME, down_frame, 1,1,1,1 );
  66. Fl::set_boxtype( FL_ROUND_UP_BOX, up_box, 1,1,1,1 );
  67. Fl::set_boxtype( FL_ROUND_DOWN_BOX, down_box, 1,1,1,1 );
  68. }
  69. void
  70. init_clean_theme ( void )
  71. {
  72. Fl_Theme *t = new Fl_Theme( "Clean", "", "", init_theme );
  73. Fl_Theme::add( t );
  74. }