summaryrefslogtreecommitdiff
path: root/test/mandelbrot_ui.fl
blob: 180a6fcb0180641732819906343bd800005e81a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# data file for the Fltk User Interface Designer (fluid)
version 1.0400
header_name {.h}
code_name {.cxx}
snap {
  ver 1
  current_suite FLTK
  current_preset 0
}
decl {\#include "mandelbrot.h"} {public local
}

decl {\#include <stdlib.h>} {private local
}

class Drawing_Window {open
} {
  Function {make_window()} {open return_type void
  } {
    Fl_Window window {open
      xywh {255 66 450 520} type Single resizable
      code0 {o->size_range(220,220);} visible
    } {
      Fl_Box d {
        user_data this user_data_type {void*}
        xywh {20 80 410 430} box DOWN_BOX color 0 selection_color 47 resizable
        class Drawing_Area
      }
      Fl_Input x_input {
        label {x:}
        callback {d->X = atof(o->value());;
d->new_display();}
        xywh {30 15 125 30} type Float box THIN_DOWN_BOX color 48 selection_color 7 labelfont 11 labelsize 16 textfont 11 textsize 12
        code0 {o->when(FL_WHEN_ENTER_KEY|FL_WHEN_RELEASE);}
      }
      Fl_Input y_input {
        label {y:}
        callback {d->Y = atof(o->value());
d->new_display();}
        xywh {175 15 125 30} type Float box THIN_DOWN_BOX color 48 selection_color 7 labelfont 11 labelsize 16 textfont 11 textsize 12
        code0 {o->when(FL_WHEN_ENTER_KEY|FL_WHEN_RELEASE);}
      }
      Fl_Input w_input {
        label {w:}
        callback {d->scale = atof(o->value());
d->new_display();}
        xywh {325 15 105 30} type Float box THIN_DOWN_BOX color 48 selection_color 7 labelfont 11 labelsize 16 textfont 11 textsize 12
        code0 {o->when(FL_WHEN_ENTER_KEY|FL_WHEN_RELEASE);}
      }
      Fl_Slider {} {
        label {brightness:}
        callback {d->brightness = int(o->value());
d->new_display();}
        xywh {80 50 160 15} type Horizontal box THIN_DOWN_BOX labelsize 10 align 4 step 1 slider_size 0.1
        code0 {o->bounds(0,d->MAX_BRIGHTNESS);}
        code2 {o->value(d->brightness);}
        code3 {o->slider(FL_UP_BOX);}
      }
      Fl_Box {} {
        label {left click: zoom out, drag: zoom in
right click: Julia set, ctrl-M: mode, ctrl-P: Print} selected
        xywh {240 50 190 30} labelsize 8 align 24
      }
      Fl_Slider {} {
        label {iterations:}
        callback {d->iterations = 1<<int(o->value());
d->new_display();}
        xywh {80 65 160 15} type Horizontal box THIN_DOWN_BOX labelsize 10 align 4 step 1 slider_size 0.1
        code0 {o->bounds(1,d->MAX_ITERATIONS);}
        code2 {o->value(d->DEFAULT_ITERATIONS);}
        code3 {o->slider(FL_UP_BOX);}
      }
    }
  }
  decl {void update_label();} {public local
  }
}