ede/ewmconf/ewmconf.fl

221 lines
6.8 KiB
Plaintext
Raw Normal View History

# data file for the FLTK User Interface Designer (FLUID)
version 2.0100
images_dir ./
header_name {.h}
code_name {.cpp}
gridx 5
gridy 5
snap 3
decl {// Window manager settings for EDE is (C) Copyright 2001-2002 by Martin Pekar, this program is provided under the terms of GNU GPL v.2, see file COPYING for more information.} {}
decl {\#include "ewm.h"} {}
decl {\#include <fltk/file_chooser.h>} {}
Function {} {open
} {
code {//fl_init_locale_support("ewmconf", PREFIX"/share/locale");
readConfiguration();} {}
{fltk::Window} {} {
label {Window manager settings} open
xywh {348 192 325 370} visible
} {
{fltk::TabGroup} {} {open
xywh {0 5 330 320} color 16
} {
{fltk::Group} {} {
label {&Titlebar} open
private xywh {0 20 325 300} align 5
} {
{fltk::Choice} {} {
label {Text align:}
callback {title_align = (int)o->value();} open
xywh {82 23 105 22}
extra_code {o->value(title_align);}
} {
{fltk::Item} {} {
label Left
}
{fltk::Item} {} {
label Right
}
{fltk::Item} {} {
label Center
}
}
{fltk::ValueInput} {} {
label {Height:}
callback {title_height = (int)o->value();}
xywh {242 23 60 22} minimum 10 maximum 50 step 1 value 20
extra_code {o->value(title_height);}
}
{fltk::Button} titlebarLabelColorButton {
label {Titlebar label color: }
callback {changeBoxColor(titlebarLabelColorButton);
title_normal_color_text = (int) titlebarLabelColorButton->color();}
xywh {84 65 60 20} align 132
extra_code {o->color((fltk::Color)title_normal_color_text);}
}
{fltk::Button} titlebarColorButton {
label {Titlebar color: }
callback {changeBoxColor(titlebarColorButton);
title_normal_color = (int) titlebarColorButton->color();}
xywh {84 130 60 20} align 132
extra_code {o->color((fltk::Color) title_normal_color);}
}
{fltk::Group} {} {open
xywh {150 65 156 145}
} {
{fltk::Button} titlebarActiveLabelColorButton {
label {Titlebar active label color: }
callback {changeBoxColor(titlebarActiveLabelColorButton);
title_active_color_text = (int) titlebarActiveLabelColorButton->color();}
xywh {90 0 60 20} align 132
extra_code {o->color((fltk::Color) title_active_color_text);}
}
{fltk::Button} titlebarActiveColorButton {
label {Titlebar active color: }
callback {changeBoxColor(titlebarActiveColorButton);
title_active_color = (int) titlebarActiveColorButton->color();}
xywh {90 65 60 20} align 132
extra_code {o->color((fltk::Color)title_active_color);}
}
}
{fltk::Choice} titlebarDrawGrad {
label {Box type:}
callback {title_draw_grad = titlebarDrawGrad->value();} open
xywh {84 167 163 23} align 132
extra_code {o->value(title_draw_grad);}
} {
{fltk::Item} {} {
label Flat
}
{fltk::Item} {} {
label {Horizontal shade}
}
{fltk::Item} {} {
label {Thin down}
}
{fltk::Item} {} {
label {Up box}
}
{fltk::Item} {} {
label {Down box}
}
{fltk::Item} {} {
label Plastic
}
}
{fltk::CheckButton} useThemeButton {
label {&Use theme}
callback {if (useThemeButton->value()) {
themePathInput->activate();
browse_btn->activate();
titlebarDrawGrad->deactivate();
titlebarColorButton->deactivate();
titlebarActiveColorButton->deactivate();
}
else
{
themePathInput->deactivate();
browse_btn->deactivate();
titlebarDrawGrad->activate();
titlebarColorButton->activate();
titlebarActiveColorButton->activate();
}
use_theme = useThemeButton->value();}
xywh {7 230 300 20}
extra_code {o->value(use_theme);}
}
{fltk::Input} themePathInput {
label {Path:}
callback {theme_path = themePathInput->value();}
xywh {64 257 210 23} deactivate
extra_code {themePathInput->value(theme_path);}
}
{fltk::Button} browse_btn {
label {...}
callback {char *file_types = _("Themes (*.theme), *.theme, All files (*.*), *");
const char *fileName = fltk::file_chooser( "Themes...", themePathInput->value(), file_types);
if (fileName) {
themePathInput->value(fileName);
theme_path = fileName;
}} selected
xywh {279 257 25 23} deactivate
}
{fltk::Divider} {} {
extra_code {o->resize(10,100,300,2);}
}
{fltk::Divider} {} {
extra_code {o->resize(10,210,300,2);}
}
}
{fltk::Group} {} {
label {&Resizing} open
xywh {0 20 325 300} align 5 hide
} {
{fltk::CheckButton} animateButton {
label {Animate size changes}
callback {if(animateButton->value()) animateSlider->activate();
else animateSlider->deactivate();
animate = animateButton->value();}
xywh {7 15 300 20} value 1
extra_code {o->value(animate);}
}
{fltk::ValueSlider} animateSlider {
label {Speed:}
callback {animate_speed = (int)animateSlider->value();}
xywh {67 40 235 20} type TICK_ABOVE align 4 box DOWN_BOX textsize 10 minimum 5 maximum 20 step 1 value 14 slider_size 8
extra_code {o->value(animate_speed);
if(animate) o->activate(); else o->deactivate();}
}
{fltk::Divider} {} {
extra_code {o->resize(10,75,300,2);}
}
{fltk::CheckButton} opaqueResize {
label {Show window content while resizing}
callback {opaque_resize = opaqueResize->value()}
xywh {7 90 290 20}
extra_code {o->value(opaque_resize);}
}
}
}
{fltk::Button} {} {
label {&OK}
callback {writeConfiguration();
applyConfiguration();
exit(0);}
private xywh {67 337 80 25} shortcut 0xff0d
}
{fltk::Button} {} {
label {&Apply}
callback {writeConfiguration();
applyConfiguration();}
private xywh {152 337 80 25}
}
{fltk::Button} {} {
label {&Cancel}
callback {exit(0);}
private xywh {237 337 80 25} shortcut 0xff1b
}
}
code {//useThemeButton->do_callback(FL_DIALOG_BTN);} {}
}
Function {changeBoxColor(fltk::Button *box)} {open return_type void
} {
code {fltk::Button *colorBox = box;
fltk::Color oldColor = colorBox->color();
fltk::Color defColor = oldColor;
fltk::color_chooser("Choose color", defColor);
if ( defColor != oldColor ) {
colorBox->color(defColor);
colorBox->redraw();
}} {}
}