Work around the fact that Fl::get_system_colors() only works once.

This commit is contained in:
Jonathan Moore Liles 2008-04-26 05:11:19 -05:00
parent d178a08152
commit 155b9464c2
1 changed files with 22 additions and 4 deletions

View File

@ -23,8 +23,7 @@ decl {\#include "Audio_File.H" // for supported formats} {}
decl {\#include "Waveform.H" // for options} {}
decl {\#include "Region.H" // for options} {selected
}
decl {\#include "Region.H" // for options} {}
decl {\#include "Control_Sequence.H" // for options} {}
@ -37,6 +36,8 @@ decl {extern char *user_config_dir;} {global
class TLE {open
} {
decl {Fl_Color system_colors[3];} {selected public
}
decl {static void menubar_cb ( void *v )} {}
decl {void menubar_cb ( void )} {}
Function {menu_picked_value( const Fl_Menu_ *m )} {open return_type {static int}
@ -79,6 +80,9 @@ Fl::visible_focus( 0 );
Fl::get_system_colors();
Fl::scheme( "plastic" );
system_colors[ 0 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND_COLOR );
system_colors[ 1 ] = (Fl_Color)Fl::get_color( FL_FOREGROUND_COLOR );
system_colors[ 2 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND2_COLOR );
Fl::add_timeout( STATUS_UPDATE_FREQ, update_cb, this );
@ -108,7 +112,7 @@ free( path );} {}
} {
Fl_Window main_window {
label {Non-DAW - Timeline} open
xywh {577 27 1024 768} type Double resizable xclass {Non-DAW} visible
xywh {577 50 1024 768} type Double resizable xclass {Non-DAW} visible
} {
Fl_Menu_Bar menubar {open
xywh {0 0 1024 25}
@ -373,7 +377,21 @@ timeline->redraw();}
} {
MenuItem {} {
label System
callback {Fl::get_system_colors();
callback {//Fl::get_system_colors();
unsigned char r, g, b;
Fl::get_color( system_colors[ 0 ], r, g, b );
Fl::background( r, g, b );
Fl::get_color( system_colors[ 1 ], r, g, b );
Fl::foreground( r, g, b );
Fl::get_color( system_colors[ 2 ], r, g, b );
Fl::background2( r, g, b );
Fl::scheme( Fl::scheme() );}
xywh {0 0 40 25} type Radio