1 // generated by Fast Light User Interface Designer (fluid) version 1.0300
3 #include "mandelbrot_ui.h"
6 void Drawing_Window::cb_x_input_i(Fl_Float_Input
* o
, void*) {
7 d
->X
= atof(o
->value());;
10 void Drawing_Window::cb_x_input(Fl_Float_Input
* o
, void* v
) {
11 ((Drawing_Window
*)(o
->parent()->user_data()))->cb_x_input_i(o
,v
);
14 void Drawing_Window::cb_y_input_i(Fl_Float_Input
* o
, void*) {
15 d
->Y
= atof(o
->value());
18 void Drawing_Window::cb_y_input(Fl_Float_Input
* o
, void* v
) {
19 ((Drawing_Window
*)(o
->parent()->user_data()))->cb_y_input_i(o
,v
);
22 void Drawing_Window::cb_w_input_i(Fl_Float_Input
* o
, void*) {
23 d
->scale
= atof(o
->value());
26 void Drawing_Window::cb_w_input(Fl_Float_Input
* o
, void* v
) {
27 ((Drawing_Window
*)(o
->parent()->user_data()))->cb_w_input_i(o
,v
);
30 void Drawing_Window::cb_brightness_i(Fl_Slider
* o
, void*) {
31 d
->brightness
= int(o
->value());
34 void Drawing_Window::cb_brightness(Fl_Slider
* o
, void* v
) {
35 ((Drawing_Window
*)(o
->parent()->user_data()))->cb_brightness_i(o
,v
);
38 void Drawing_Window::cb_iterations_i(Fl_Slider
* o
, void*) {
39 d
->iterations
= 1<<int(o
->value());
42 void Drawing_Window::cb_iterations(Fl_Slider
* o
, void* v
) {
43 ((Drawing_Window
*)(o
->parent()->user_data()))->cb_iterations_i(o
,v
);
46 void Drawing_Window::make_window() {
47 { Fl_Window
* o
= window
= new Fl_Window(450, 520);
48 window
->user_data((void*)(this));
49 { d
= new Drawing_Area(20, 80, 410, 430);
51 d
->color(FL_FOREGROUND_COLOR
);
52 d
->selection_color(FL_DARK1
);
53 d
->labeltype(FL_NORMAL_LABEL
);
56 d
->labelcolor(FL_FOREGROUND_COLOR
);
57 d
->user_data((void*)(this));
58 d
->align(Fl_Align(FL_ALIGN_CENTER
));
59 d
->when(FL_WHEN_RELEASE
);
60 Fl_Group::current()->resizable(d
);
62 { Fl_Float_Input
* o
= x_input
= new Fl_Float_Input(30, 15, 125, 30, "x:");
64 x_input
->box(FL_THIN_DOWN_BOX
);
65 x_input
->color((Fl_Color
)48);
66 x_input
->selection_color(FL_BACKGROUND2_COLOR
);
67 x_input
->labelfont(11);
68 x_input
->labelsize(20);
69 x_input
->textfont(11);
70 x_input
->textsize(20);
71 x_input
->callback((Fl_Callback
*)cb_x_input
);
72 o
->when(FL_WHEN_ENTER_KEY
|FL_WHEN_RELEASE
);
73 } // Fl_Float_Input* x_input
74 { Fl_Float_Input
* o
= y_input
= new Fl_Float_Input(175, 15, 125, 30, "y:");
76 y_input
->box(FL_THIN_DOWN_BOX
);
77 y_input
->color((Fl_Color
)48);
78 y_input
->selection_color(FL_BACKGROUND2_COLOR
);
79 y_input
->labelfont(11);
80 y_input
->labelsize(20);
81 y_input
->textfont(11);
82 y_input
->textsize(20);
83 y_input
->callback((Fl_Callback
*)cb_y_input
);
84 o
->when(FL_WHEN_ENTER_KEY
|FL_WHEN_RELEASE
);
85 } // Fl_Float_Input* y_input
86 { Fl_Float_Input
* o
= w_input
= new Fl_Float_Input(325, 15, 105, 30, "w:");
88 w_input
->box(FL_THIN_DOWN_BOX
);
89 w_input
->color((Fl_Color
)48);
90 w_input
->selection_color(FL_BACKGROUND2_COLOR
);
91 w_input
->labelfont(11);
92 w_input
->labelsize(20);
93 w_input
->textfont(11);
94 w_input
->textsize(20);
95 w_input
->callback((Fl_Callback
*)cb_w_input
);
96 o
->when(FL_WHEN_ENTER_KEY
|FL_WHEN_RELEASE
);
97 } // Fl_Float_Input* w_input
98 { Fl_Slider
* o
= new Fl_Slider(80, 50, 160, 15, "brightness:");
100 o
->box(FL_THIN_DOWN_BOX
);
104 o
->callback((Fl_Callback
*)cb_brightness
);
105 o
->align(Fl_Align(FL_ALIGN_LEFT
));
106 o
->bounds(0,d
->MAX_BRIGHTNESS
);
107 o
->value(d
->DEFAULT_BRIGHTNESS
);
108 o
->slider(FL_UP_BOX
);
110 { Fl_Box
* o
= new Fl_Box(240, 50, 190, 30, "left: click = zoom out, drag = zoom in\nright click: Julia set, ctrl-P: Print");
112 o
->align(Fl_Align(FL_ALIGN_RIGHT
|FL_ALIGN_INSIDE
));
115 { Fl_Slider
* o
= new Fl_Slider(80, 65, 160, 15, "iterations:");
117 o
->box(FL_THIN_DOWN_BOX
);
121 o
->callback((Fl_Callback
*)cb_iterations
);
122 o
->align(Fl_Align(FL_ALIGN_LEFT
));
123 o
->bounds(1,d
->MAX_ITERATIONS
);
124 o
->value(d
->DEFAULT_ITERATIONS
);
125 o
->slider(FL_UP_BOX
);
127 o
->size_range(220,220);
129 } // Fl_Window* window