1 # data file for the Fltk User Interface Designer (fluid)
3 header_name {../FL/Fl_Theme_Chooser.H}
5 decl {\#include "FL/Fl_Theme.H"} {public global
8 decl {\#include <FL/Fl_Button.H>} {public global
11 decl {\#include <FL/Fl_Color_Chooser.H>} {private local
14 decl {\#include <FL/Fl_Double_Window.H>} {private local
17 class Fl_Color_Button {open : {public Fl_Button}
19 Function {Fl_Color_Button( int X, int Y, int W, int H, const char *L = 0 ) : Fl_Button( X, Y, W, H, L )} {open
23 Function {handle( int m )} {open return_type int
31 Fl::get_color( color(), r, g, b );
33 fl_color_chooser( label(), r, g, b );
35 color( fl_rgb_color( r, g, b ) );
43 return Fl_Button::handle( m );} {}
47 widget_class Fl_Theme_Chooser {
49 xywh {560 246 435 380} type Double
50 class Fl_Double_Window visible
52 Fl_Choice theme_choice {
54 callback {Fl_Theme::set( o->mvalue()->label() );
57 xywh {120 20 300 25} down_box BORDER_BOX
59 Fl_Choice color_scheme_choice {
61 callback {Fl_Color_Scheme::set( o->mvalue()->label() );
64 xywh {120 48 300 25} down_box BORDER_BOX
68 callback {hide();} selected
73 xywh {5 215 425 120} box ENGRAVED_FRAME
77 xywh {155 240 265 25} type Horizontal align 1
81 xywh {15 230 120 15} down_box DOWN_BOX
90 code0 {o->value( 0.50 );}
97 Fl_Button background_color_button {
99 callback {uchar r,g,b;
101 Fl::get_color( o->color(), r,g,b );
103 Fl::background( r,g,b );
105 o->window()->redraw();
107 Fl_Color_Scheme::save();}
108 xywh {120 76 300 25} box BORDER_BOX align 4 when 6
109 code0 {\#include <FL/fl_ask.H>}
110 code1 {o->color( FL_BACKGROUND_COLOR );}
111 class Fl_Color_Button
113 Fl_Button background2_color_button {
114 label {Background 2:}
115 callback {uchar r,g,b;
117 Fl::get_color( o->color(), r,g,b );
119 Fl::background2( r,g,b );
121 o->window()->redraw();
123 Fl_Color_Scheme::save();}
124 xywh {120 104 300 25} box BORDER_BOX align 4
125 code1 {o->color( FL_BACKGROUND2_COLOR );}
126 class Fl_Color_Button
128 Fl_Button foreground_color_button {
130 callback {uchar r,g,b;
132 Fl::get_color( o->color(), r,g,b );
134 Fl::foreground( r,g,b );
136 o->window()->redraw();
138 Fl_Color_Scheme::save();}
139 xywh {120 132 300 25} box BORDER_BOX align 4
140 code1 {o->color( FL_FOREGROUND_COLOR );}
141 class Fl_Color_Button
143 Fl_Button selection_color_button {
145 xywh {120 160 300 25} box BORDER_BOX align 4 hide
146 class Fl_Color_Button
149 Fl_Theme **ta = Fl_Theme::get();
151 for ( Fl_Theme **t = ta; *t; t++ )
152 theme_choice->add( (*t)->name() );
156 const Fl_Menu_Item *item = theme_choice->find_item( Fl_Theme::current()->name() );
158 theme_choice->value( item );
162 Fl_Color_Scheme **ta = Fl_Color_Scheme::get();
164 for ( Fl_Color_Scheme **t = ta; *t; t++ )
165 color_scheme_choice->add( (*t)->name() );
171 Function {fl_theme_chooser()} {open C return_type void
173 code {Fl_Window *w = new Fl_Theme_Chooser();