aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/dialog_choosedevice.fl
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/dialog_choosedevice.fl')
-rwxr-xr-xsrc/frontend/dialog_choosedevice.fl99
1 files changed, 99 insertions, 0 deletions
diff --git a/src/frontend/dialog_choosedevice.fl b/src/frontend/dialog_choosedevice.fl
new file mode 100755
index 0000000..142b5f5
--- /dev/null
+++ b/src/frontend/dialog_choosedevice.fl
@@ -0,0 +1,99 @@
1# data file for the Fltk User Interface Designer (fluid)
2version 1.0109
3header_name {.h}
4code_name {.cxx}
5decl {\#include <hd24fs.h>} {public
6}
7
8decl {\#include <hd24devicenamegenerator.h>} {public
9}
10
11decl {\#include <vector>} {public
12}
13
14class dialog_choosedevice {open
15} {
16 decl {int buttonclicked;} {public
17 }
18 decl {int choice_startloc;} {public
19 }
20 decl {hd24fs* currfs;} {public
21 }
22 decl {int devnums[10000];} {}
23 decl {string* devicename;} {public
24 }
25 Function {fill_devices()} {open return_type void
26 } {
27 code {hd24devicenamegenerator* dng=new hd24devicenamegenerator();
28
29__uint32 totnames=dng->getnumberofnames();
30device->add("--Use other device--",0,NULL,(void*)this);
31int n=0;
32for (__uint32 i=0;i<totnames;i++)
33{
34 string* devname=dng->getdevicename(i);
35 if (currfs->isexistingdevice(devname))
36 {
37 device->add(devname->c_str(),0,NULL,(void*)this);
38 n++;
39 devnums[n]=i;
40 }
41 delete(devname);
42}
43device->value(1);} {}
44 }
45 Function {make_window(hd24fs* p_currfs)} {open
46 } {
47 Fl_Window {} {
48 label {Choose HD24 device} open selected
49 xywh {389 296 590 115} type Double color 52 labelsize 12
50 code0 {buttonclicked=0;}
51 code1 {currfs=p_currfs;}
52 code2 {currdev->value(currfs->getdevicename()->c_str());} modal visible
53 } {
54 Fl_Button button_ok {
55 label OK
56 callback {buttonclicked=1; //OK
57if (device->value()==0) {
58 devicename=new string(otherdevice->value());
59} else {
60 hd24devicenamegenerator* dng=new hd24devicenamegenerator();
61 devicename=dng->getdevicename((__uint32)devnums[device->value()]);
62 delete dng;
63}
64//choice_startloc=fromloc->value();
65//choice_endloc=toloc->value();
66Fl_Window * x = Fl::first_window();
67x->~Fl_Window();}
68 xywh {430 85 70 25}
69 }
70 Fl_Button button_cancel {
71 label Cancel
72 callback {buttonclicked=2; //Cancel
73Fl_Window * x = Fl::first_window();
74x->~Fl_Window();}
75 xywh {505 85 70 25}
76 }
77 Fl_Choice device {
78 label {Choose device:}
79 callback {if (device->value()!=0) {
80 otherdevice->deactivate();
81} else {
82 otherdevice->activate();
83 otherdevice->take_focus();
84}} open
85 xywh {115 30 460 20} down_box BORDER_BOX labelsize 12 textsize 12
86 code0 {fill_devices();}
87 } {}
88 Fl_Input otherdevice {
89 label {Other device:}
90 xywh {115 55 460 20} labelsize 12 textsize 12 deactivate
91 code0 {o->maximum_size(64);}
92 }
93 Fl_Output currdev {
94 label {Current device:}
95 xywh {115 5 240 20} box FLAT_BOX color 53 labelsize 12 textsize 12
96 }
97 }
98 }
99}