1 // generated by Fast Light User Interface Designer (fluid) version 1.0300
2
3 #include "CubeViewUI.h"
4
cb_vrot_i(Fl_Roller * o,void *)5 void CubeViewUI::cb_vrot_i(Fl_Roller* o, void*) {
6 cube->v_angle(((Fl_Roller *)o)->value());
7 cube->redraw();
8 }
cb_vrot(Fl_Roller * o,void * v)9 void CubeViewUI::cb_vrot(Fl_Roller* o, void* v) {
10 ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_vrot_i(o,v);
11 }
12
cb_ypan_i(Fl_Slider * o,void *)13 void CubeViewUI::cb_ypan_i(Fl_Slider* o, void*) {
14 cube->pany(((Fl_Slider *)o)->value());
15 cube->redraw();
16 }
cb_ypan(Fl_Slider * o,void * v)17 void CubeViewUI::cb_ypan(Fl_Slider* o, void* v) {
18 ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_ypan_i(o,v);
19 }
20
cb_xpan_i(Fl_Slider * o,void *)21 void CubeViewUI::cb_xpan_i(Fl_Slider* o, void*) {
22 cube->panx(((Fl_Slider *)o)->value());
23 cube->redraw();
24 }
cb_xpan(Fl_Slider * o,void * v)25 void CubeViewUI::cb_xpan(Fl_Slider* o, void* v) {
26 ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_xpan_i(o,v);
27 }
28
cb_hrot_i(Fl_Roller * o,void *)29 void CubeViewUI::cb_hrot_i(Fl_Roller* o, void*) {
30 cube->h_angle(((Fl_Roller *)o)->value());
31 cube->redraw();
32 }
cb_hrot(Fl_Roller * o,void * v)33 void CubeViewUI::cb_hrot(Fl_Roller* o, void* v) {
34 ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_hrot_i(o,v);
35 }
36
cb_zoom_i(Fl_Value_Slider * o,void *)37 void CubeViewUI::cb_zoom_i(Fl_Value_Slider* o, void*) {
38 cube->size=((Fl_Value_Slider *)o)->value();
39 cube->redraw();
40 }
cb_zoom(Fl_Value_Slider * o,void * v)41 void CubeViewUI::cb_zoom(Fl_Value_Slider* o, void* v) {
42 ((CubeViewUI*)(o->parent()->parent()->user_data()))->cb_zoom_i(o,v);
43 }
44
CubeViewUI()45 CubeViewUI::CubeViewUI() {
46 { mainWindow = new Fl_Double_Window(415, 405, "CubeView");
47 mainWindow->box(FL_UP_BOX);
48 mainWindow->labelsize(12);
49 mainWindow->user_data((void*)(this));
50 { Fl_Group* o = new Fl_Group(5, 3, 374, 399);
51 { VChange = new Fl_Group(5, 100, 37, 192);
52 { vrot = new Fl_Roller(5, 100, 17, 186, "V Rot");
53 vrot->labeltype(FL_NO_LABEL);
54 vrot->labelsize(12);
55 vrot->minimum(-180);
56 vrot->maximum(180);
57 vrot->step(1);
58 vrot->callback((Fl_Callback*)cb_vrot);
59 vrot->align(Fl_Align(FL_ALIGN_WRAP));
60 } // Fl_Roller* vrot
61 { ypan = new Fl_Slider(25, 100, 17, 186, "V Pan");
62 ypan->type(4);
63 ypan->selection_color(FL_DARK_BLUE);
64 ypan->labeltype(FL_NO_LABEL);
65 ypan->labelsize(12);
66 ypan->minimum(-25);
67 ypan->maximum(25);
68 ypan->step(0.1);
69 ypan->callback((Fl_Callback*)cb_ypan);
70 ypan->align(Fl_Align(FL_ALIGN_CENTER));
71 } // Fl_Slider* ypan
72 VChange->end();
73 } // Fl_Group* VChange
74 { HChange = new Fl_Group(120, 362, 190, 40);
75 { xpan = new Fl_Slider(122, 364, 186, 17, "H Pan");
76 xpan->type(5);
77 xpan->selection_color(FL_DARK_BLUE);
78 xpan->labeltype(FL_NO_LABEL);
79 xpan->labelsize(12);
80 xpan->minimum(25);
81 xpan->maximum(-25);
82 xpan->step(0.1);
83 xpan->callback((Fl_Callback*)cb_xpan);
84 xpan->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
85 } // Fl_Slider* xpan
86 { hrot = new Fl_Roller(122, 383, 186, 17, "H Rotation");
87 hrot->type(1);
88 hrot->labeltype(FL_NO_LABEL);
89 hrot->labelsize(12);
90 hrot->minimum(-180);
91 hrot->maximum(180);
92 hrot->step(1);
93 hrot->callback((Fl_Callback*)cb_hrot);
94 hrot->align(Fl_Align(FL_ALIGN_RIGHT));
95 } // Fl_Roller* hrot
96 HChange->end();
97 } // Fl_Group* HChange
98 { MainView = new Fl_Group(46, 27, 333, 333);
99 { cframe = new Fl_Box(46, 27, 333, 333);
100 cframe->box(FL_DOWN_FRAME);
101 cframe->color((Fl_Color)4);
102 cframe->selection_color((Fl_Color)69);
103 } // Fl_Box* cframe
104 { cube = new CubeView(48, 29, 329, 329, "This is the cube_view");
105 cube->box(FL_NO_BOX);
106 cube->color(FL_BACKGROUND_COLOR);
107 cube->selection_color(FL_BACKGROUND_COLOR);
108 cube->labeltype(FL_NORMAL_LABEL);
109 cube->labelfont(0);
110 cube->labelsize(14);
111 cube->labelcolor(FL_FOREGROUND_COLOR);
112 cube->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
113 cube->when(FL_WHEN_RELEASE);
114 Fl_Group::current()->resizable(cube);
115 } // CubeView* cube
116 MainView->end();
117 Fl_Group::current()->resizable(MainView);
118 } // Fl_Group* MainView
119 { zoom = new Fl_Value_Slider(106, 3, 227, 19, "Zoom");
120 zoom->type(5);
121 zoom->selection_color(FL_DARK_BLUE);
122 zoom->labelfont(1);
123 zoom->labelsize(12);
124 zoom->minimum(1);
125 zoom->maximum(50);
126 zoom->step(0.1);
127 zoom->value(10);
128 zoom->textfont(1);
129 zoom->callback((Fl_Callback*)cb_zoom);
130 zoom->align(Fl_Align(FL_ALIGN_LEFT));
131 } // Fl_Value_Slider* zoom
132 o->end();
133 } // Fl_Group* o
134 mainWindow->end();
135 mainWindow->resizable(mainWindow);
136 } // Fl_Double_Window* mainWindow
137 }
138
show(int argc,char ** argv)139 void CubeViewUI::show(int argc, char **argv) {
140 mainWindow->show(argc, argv);
141 }
142