int main (int argc, char **argv) { Fl_Window* w; fl_init_locale_support("ewmconf", PREFIX"/share/locale"); readConfiguration(); {Fl_Window* o = new Fl_Window(320, 370, _("Window manager settings")); w = o; {Fl_Tabs* o = new Fl_Tabs(2, 5, 318, 325); o->color((Fl_Color)16); {Fl_Group* o = new Fl_Group(1, 29, 316, 295, _("&Titlebar")); o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT); {Fl_Choice* o = new Fl_Choice(83, 13, 105, 22, _("Text align:")); o->begin(); o->callback((Fl_Callback*)cb_Text); new Fl_Item(_("Left")); new Fl_Item(_("Right")); new Fl_Item(_("Center")); o->value(title_align); o->end(); } {Fl_Value_Input* o = new Fl_Value_Input(243, 13, 60, 22, _("Height:")); o->minimum(10); o->maximum(50); o->step(1); o->value(20); o->callback((Fl_Callback*)cb_Height); o->value(title_height); } {Fl_Button* o = titlebarLabelColorButton = new Fl_Button(85, 55, 60, 20, _("Titlebar label color: ")); o->box(FL_DOWN_BOX); o->callback((Fl_Callback*)cb_titlebarLabelColorButton); o->align(132); o->color((Fl_Color)title_normal_color_text); } {Fl_Button* o = titlebarColorButton = new Fl_Button(85, 120, 60, 20, _("Titlebar color: ")); o->box(FL_DOWN_BOX); o->callback((Fl_Callback*)cb_titlebarColorButton); o->align(132); o->color((Fl_Color) title_normal_color); } {Fl_Group* o = new Fl_Group(153, 45, 160, 110); {Fl_Button* o = titlebarActiveLabelColorButton = new Fl_Button(90, 10, 60, 20, _("Titlebar active label color: ")); o->box(FL_DOWN_BOX); o->callback((Fl_Callback*)cb_titlebarActiveLabelColorButton); o->align(132); o->color((Fl_Color) title_active_color_text); } {Fl_Button* o = titlebarActiveColorButton = new Fl_Button(90, 75, 60, 20, _("Titlebar active color: ")); o->box(FL_DOWN_BOX); o->callback((Fl_Callback*)cb_titlebarActiveColorButton); o->align(132); o->color((Fl_Color)title_active_color); } o->end(); } {Fl_Choice* o = titlebarDrawGrad = new Fl_Choice(85, 157, 163, 23, _("Box type:")); o->begin(); o->callback((Fl_Callback*)cb_titlebarDrawGrad); o->align(132); new Fl_Item(_("Flat")); new Fl_Item(_("Horizontal shade")); new Fl_Item(_("Thin down")); new Fl_Item(_("Up box")); new Fl_Item(_("Down box")); new Fl_Item(_("Plastic")); o->value(title_draw_grad); o->end(); } {Fl_Check_Button* o = useThemeButton = new Fl_Check_Button(8, 220, 300, 20, _("&Use theme")); o->callback((Fl_Callback*)cb_useThemeButton); o->value(use_theme); } {Fl_Input* o = themePathInput = new Fl_Input(65, 247, 210, 23, _("Path:")); o->callback((Fl_Callback*)cb_themePathInput); o->deactivate(); themePathInput->value(theme_path); } {Fl_Button* o = browse_btn = new Fl_Button(280, 247, 25, 23, _("...")); o->callback((Fl_Callback*)cb_browse_btn); o->deactivate(); } {Fl_Divider* o = new Fl_Divider(8, 190, 300, 25, _("label")); o->color((Fl_Color)16); } {Fl_Divider* o = new Fl_Divider(8, 85, 297, 25, _("label")); o->color((Fl_Color)16); } o->end(); } {Fl_Group* o = new Fl_Group(3, 20, 310, 305, _("&Resizing")); o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT); o->hide(); {Fl_Check_Button* o = animateButton = new Fl_Check_Button(10, 10, 300, 20, _("Animate size changes")); o->value(1); o->callback((Fl_Callback*)cb_animateButton); o->value(animate); } {Fl_Value_Slider* o = animateSlider = new Fl_Value_Slider(70, 35, 235, 20, _("Speed:")); o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE); o->box(FL_DOWN_BOX); o->text_size(10); o->minimum(5); o->maximum(20); o->step(2); o->value(14); o->slider_size(8); o->callback((Fl_Callback*)cb_animateSlider); o->align(FL_ALIGN_LEFT); o->value(animate_speed); if(animate) o->activate(); else o->deactivate(); } new Fl_Divider(0, 60, 300, 25, _("label")); {Fl_Check_Button* o = opaqueResize = new Fl_Check_Button(10, 85, 290, 20, _("Show window content while resizing")); o->callback((Fl_Callback*)cb_opaqueResize); o->value(opaque_resize); } o->end(); } o->end(); } {Fl_Button* o = new Fl_Button(67, 337, 80, 25, _("&OK")); o->shortcut(0xff0d); o->callback((Fl_Callback*)cb_OK); } {Fl_Button* o = new Fl_Button(152, 337, 80, 25, _("&Apply")); o->callback((Fl_Callback*)cb_Apply); } {Fl_Button* o = new Fl_Button(237, 337, 80, 25, _("&Cancel")); o->shortcut(0xff1b); o->callback((Fl_Callback*)cb_Cancel); } o->end(); } useThemeButton->do_callback(); w->show(argc, argv); return Fl::run(); }
Fl_Double_Window* make_window() { Fl_Double_Window* w; {Fl_Double_Window* o = new Fl_Double_Window(560, 489); w = o; o->type(241); {Fl_Box* o = imbox = new Fl_Box(5, 30, 385, 455); o->box(FL_ENGRAVED_BOX); o->align(FL_ALIGN_CLIP); Fl_Group::current()->resizable(o); } {Fl_Box* o = filename_box = new Fl_Box(5, 5, 385, 20, "No file loaded..."); o->box(FL_THIN_DOWN_BOX); o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); } {Fl_Group* o = new Fl_Group(395, 5, 160, 480); o->box(FL_THIN_DOWN_BOX); {Fl_Button* o = new Fl_Button(10, 10, 140, 25, "Load File"); o->box(FL_THIN_UP_BOX); o->callback((Fl_Callback*)cb_Load); } {Fl_Button* o = new Fl_Button(10, 40, 140, 25, "Exit"); o->box(FL_THIN_UP_BOX); o->callback((Fl_Callback*)cb_Exit); } new Fl_Divider(10, 75, 140, 15, "label"); {Fl_Button* o = new Fl_Button(10, 100, 140, 25, "Fit To Box"); o->type(Fl_Button::TOGGLE); o->box(FL_THIN_UP_BOX); o->callback((Fl_Callback*)cb_Fit); } {Fl_Button* o = new Fl_Button(10, 130, 140, 25, "Tile"); o->type(Fl_Button::TOGGLE); o->box(FL_THIN_UP_BOX); o->callback((Fl_Callback*)cb_Tile); } {Fl_Choice* o = filter_choice = new Fl_Choice(10, 335, 140, 25, "Filter:"); o->begin(); o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT); o->tooltip("Choose filter"); {Fl_Item* o = new Fl_Item("None"); o->user_data((void*)(0)); } {Fl_Item* o = new Fl_Item("Brightness"); o->user_data((void*)(FILTER_BRIGHTNESS)); } {Fl_Item* o = new Fl_Item("Contrast"); o->user_data((void*)(FILTER_CONTRAST)); } {Fl_Item* o = new Fl_Item("Grayscale"); o->user_data((void*)(FILTER_GRAYSCALE)); } {Fl_Item* o = new Fl_Item("Gamma"); o->user_data((void*)(FILTER_GAMMA)); } {Fl_Item* o = new Fl_Item("Fore Blend"); o->user_data((void*)(FILTER_FOREBLEND)); } {Fl_Item* o = new Fl_Item("Back Blend"); o->user_data((void*)(FILTER_BACKBLEND)); } o->end(); } {Fl_Box* o = new Fl_Box(10, 160, 140, 160); o->parent()->resizable(o); } {Fl_Value_Slider* o = Rslider = new Fl_Value_Slider(25, 380, 125, 15, "R"); o->type(Fl_Value_Slider::HORIZONTAL); o->label_size(10); o->text_size(10); o->minimum(-3); o->maximum(3); o->value(1); o->slider_size(5); o->align(FL_ALIGN_LEFT); o->tooltip("Red value for filter"); } {Fl_Value_Slider* o = Gslider = new Fl_Value_Slider(25, 400, 125, 15, "G"); o->type(Fl_Value_Slider::HORIZONTAL); o->label_size(10); o->text_size(10); o->minimum(-3); o->maximum(3); o->value(1); o->slider_size(5); o->align(FL_ALIGN_LEFT); o->tooltip("Green value for filter"); } {Fl_Value_Slider* o = Bslider = new Fl_Value_Slider(25, 420, 125, 15, "B"); o->type(Fl_Value_Slider::HORIZONTAL); o->label_size(10); o->text_size(10); o->minimum(-3); o->maximum(3); o->value(1); o->slider_size(5); o->align(FL_ALIGN_LEFT); o->tooltip("Blue value for filter"); } {Fl_Button* o = new Fl_Button(10, 445, 140, 25, "Apply"); o->box(FL_THIN_UP_BOX); o->callback((Fl_Callback*)cb_Apply); o->tooltip("Apply current selected filter"); } {Fl_Check_Button* o = lock = new Fl_Check_Button(10, 365, 140, 15, "Lock sliders"); o->label_size(10); o->callback((Fl_Callback*)cb_lock); o->tooltip("Lock slider, RGB values taken from R slider "); } o->end(); } o->end(); } return w; }
int main (int argc, char **argv) { Fl_Window* w; fl_init_locale_support("eiconsconf", PREFIX"/share/locale"); readIconsConfiguration(); {Fl_Window* o = iconsConfWindow = new Fl_Window(265, 314, _("Icons settings")); w = o; o->shortcut(0xff1b); {Fl_Button* o = new Fl_Button(25, 280, 75, 25, _("&OK")); o->callback((Fl_Callback*)cb_OK); } {Fl_Button* o = new Fl_Button(185, 280, 75, 25, _("&Cancel")); o->callback((Fl_Callback*)cb_Cancel); } {Fl_Button* o = new Fl_Button(105, 280, 75, 25, _("&Apply")); o->callback((Fl_Callback*)cb_Apply); } {Fl_Tabs* o = new Fl_Tabs(3, 5, 257, 265); o->color((Fl_Color)0xfffffffe); {Fl_Group* o = new Fl_Group(1, 23, 255, 241, _("Look&&feel")); o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT); {Fl_Button* o = colorButton = new Fl_Button(165, 17, 60, 18, _("Background color: ")); o->box(FL_DOWN_BOX); o->callback((Fl_Callback*)cb_colorButton); o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP); o->color((Fl_Color) label_background); if(label_trans) o->deactivate(); } {Fl_Button* o = colorButton1 = new Fl_Button(165, 47, 60, 18, _("Label color: ")); o->box(FL_DOWN_BOX); o->callback((Fl_Callback*)cb_colorButton1); o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP); o->color((Fl_Color) label_foreground); } {Fl_Value_Slider* o = maxWidthSlider = new Fl_Value_Slider(115, 95, 125, 20, _("Maximum width: ")); o->type(Fl_Value_Slider::HORIZONTAL); o->minimum(48); o->maximum(200); o->step(1); o->value(50); o->slider_size(10); o->callback((Fl_Callback*)cb_maxWidthSlider); o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP); o->value(label_maxwidth); } {Fl_Value_Slider* o = fontsizeSlider = new Fl_Value_Slider(115, 125, 125, 20, _("Font height: ")); o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE); o->minimum(8); o->maximum(48); o->step(1); o->value(10); o->slider_size(10); o->callback((Fl_Callback*)cb_fontsizeSlider); o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP); o->value(label_fontsize); } {Fl_Value_Slider* o = gridspaceSlider = new Fl_Value_Slider(115, 155, 125, 20, _("Grid spacing: ")); o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE); o->minimum(1); o->maximum(50); o->step(1); o->value(10); o->slider_size(10); o->callback((Fl_Callback*)cb_gridspaceSlider); o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP); o->value(label_gridspacing); } {Fl_Check_Button* o = autoArrButton = new Fl_Check_Button(25, 215, 222, 20, _("Auto arrange icons")); o->callback((Fl_Callback*)cb_autoArrButton); o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP); o->value(auto_arr); } {Fl_Check_Button* o = engageButton = new Fl_Check_Button(25, 190, 222, 20, _("Engage with just one click")); o->callback((Fl_Callback*)cb_engageButton); o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP); o->value(label_engage_1click); } {Fl_Check_Button* o = bg_color_check = new Fl_Check_Button(227, 17, 20, 18); o->callback((Fl_Callback*)cb_bg_color_check); o->tooltip(_("Clear this, to get transparent background.")); if(!label_trans) o->set_value(); } o->end(); } o->end(); } o->end(); o->resizable(o); } w->show(argc, argv); return Fl::run(); }