# data file for the Fltk User Interface Designer (fluid)
version 1.0300 
header_name {../FL/Fl_Theme_Chooser.H} 
code_name {.cxx}
decl {\#include "FL/Fl_Theme.H"} {public global
} 

decl {\#include <FL/Fl_Button.H>} {public global
} 

decl {\#include <FL/Fl_Color_Chooser.H>} {private local
} 

decl {\#include <FL/Fl_Double_Window.H>} {private local
} 

class Fl_Color_Button {open : {public Fl_Button}
} {
  Function {Fl_Color_Button( int X, int Y, int W, int H, const char *L = 0 ) : Fl_Button( X, Y, W, H, L )} {open
  } {
    code {} {}
  }
  Function {handle( int m )} {open return_type int
  } {
    code {switch ( m )
{
	case FL_PUSH:
	{
		uchar r, g, b;

		Fl::get_color( color(), r, g, b );

		fl_color_chooser( label(), r, g, b );

		color( fl_rgb_color( r, g, b ) );
		
		do_callback();
			
		return 1;
	}
}

return Fl_Button::handle( m );} {}
  }
} 

widget_class Fl_Theme_Chooser {
  label Theme open
  xywh {560 246 435 380} type Double
  class Fl_Double_Window visible
} {
  Fl_Choice theme_choice {
    label {Theme:}
    callback {Fl_Theme::set( o->mvalue()->label() );

redraw();} open
    xywh {120 20 300 25} down_box BORDER_BOX
  } {}
  Fl_Choice color_scheme_choice {
    label {Color Scheme:}
    callback {Fl_Color_Scheme::set( o->mvalue()->label() );

redraw();} open
    xywh {120 48 300 25} down_box BORDER_BOX
  } {}
  Fl_Return_Button {} {
    label OK
    callback {Fl_Theme::save(); Fl_Color_Scheme::save(); hide();} selected
    xywh {355 345 75 25}
  }
  Fl_Group {} {
    label Example open
    xywh {5 215 425 120} box ENGRAVED_FRAME
  } {
    Fl_Scrollbar {} {
      label {Scroll Bar}
      xywh {155 240 265 25} type Horizontal align 1
    }
    Fl_Check_Button {} {
      label {Check Button}
      xywh {15 230 120 15} down_box DOWN_BOX
    }
    Fl_Dial {} {
      label Dial
      xywh {155 275 35 35}
    }
    Fl_Progress {} {
      label Progress
      xywh {240 300 185 30}
      code0 {o->value( 0.50 );}
    }
    Fl_Light_Button {} {
      label {Light Button}
      xywh {15 285 120 35}
    }
  }
  Fl_Button background_color_button {
    label {Background 1:}
    callback {uchar r,g,b;

Fl::get_color( o->color(), r,g,b );

Fl::background( r,g,b );

o->window()->redraw();

}
    xywh {120 76 300 25} box BORDER_BOX align 4 when 6
    code0 {\#include <FL/fl_ask.H>}
    code1 {o->color( FL_BACKGROUND_COLOR );}
    class Fl_Color_Button
  }
  Fl_Button background2_color_button {
    label {Background 2:}
    callback {uchar r,g,b;

Fl::get_color( o->color(), r,g,b );

Fl::background2( r,g,b );

o->window()->redraw();
}
    xywh {120 104 300 25} box BORDER_BOX align 4
    code1 {o->color( FL_BACKGROUND2_COLOR );}
    class Fl_Color_Button
  }
  Fl_Button foreground_color_button {
    label {Foreground:}
    callback {uchar r,g,b;

Fl::get_color( o->color(), r,g,b );

Fl::foreground( r,g,b );

o->window()->redraw();

}
    xywh {120 132 300 25} box BORDER_BOX align 4
    code1 {o->color( FL_FOREGROUND_COLOR );}
    class Fl_Color_Button
  }
  Fl_Button selection_color_button {
    label {Selection:}
    xywh {120 160 300 25} box BORDER_BOX align 4 hide
    class Fl_Color_Button
  }
  code {{
Fl_Theme **ta = Fl_Theme::get();

for ( Fl_Theme **t = ta; *t; t++ )
    theme_choice->add( (*t)->name() );

free( ta );

const Fl_Menu_Item *item = theme_choice->find_item( Fl_Theme::current()->name() );

theme_choice->value( item );
}

{
Fl_Color_Scheme **ta = Fl_Color_Scheme::get();

for ( Fl_Color_Scheme **t = ta; *t; t++ )
    color_scheme_choice->add( (*t)->name() );

free( ta );
}} {}
} 

Function {fl_theme_chooser()} {open C return_type void
} {
  code {Fl_Window *w = new Fl_Theme_Chooser();

w->end();
w->show();

while( w->shown() )
  Fl::wait();} {}
} 
