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.

68 lines
2.5KB

  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. #include "Boxtypes.H"
  19. #include <FL/fl_draw.H>
  20. /** This simple box is suitable for use with knob-type widgets. It
  21. * comprises a border with shadow, and a cap with glare-lines akin
  22. * to those seen on burnished aluminum knobs. */
  23. static void
  24. draw_burnished_oval_box ( int x, int y, int w, int h, Fl_Color c )
  25. {
  26. /* draw background */
  27. fl_color( fl_darker( c ) );
  28. fl_pie( x, y, w, h, 0, 360 );
  29. fl_color( fl_darker( fl_darker( c ) ) );
  30. fl_pie( x, y, w, h, 180 + 215, 180 + 45 );
  31. /* shrink */
  32. x += 4;
  33. y += 4;
  34. w -= 7;
  35. h -= 7;
  36. /* draw cap */
  37. fl_color( c );
  38. fl_pie( x, y, w, h, 0, 360 );
  39. /* draw glare */
  40. const int a1 = 10;
  41. const int a2 = 90;
  42. fl_color( fl_lighter( c ) );
  43. fl_pie( x, y, w, h, a1, a2 );
  44. fl_pie( x, y, w, h, 180 + a1, 180 + a2 );
  45. fl_color( fl_lighter( fl_lighter( c ) ) );
  46. const int d = (a2 - a1) / 2;
  47. fl_pie( x, y, w, h, a1 + (d / 2), a2 - (d / 2) );
  48. fl_pie( x, y, w, h, 180 + a1 + (d / 2), 180 + a2 - (d / 2) );
  49. }
  50. void
  51. init_boxtypes ( void )
  52. {
  53. Fl::set_boxtype( FL_BURNISHED_OVAL_BOX, draw_burnished_oval_box, 4, 4, 7, 7 );
  54. }