diff options
Diffstat (limited to 'src/frontend/dialog_filesize.fl')
-rwxr-xr-x | src/frontend/dialog_filesize.fl | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/src/frontend/dialog_filesize.fl b/src/frontend/dialog_filesize.fl new file mode 100755 index 0000000..df67208 --- /dev/null +++ b/src/frontend/dialog_filesize.fl | |||
@@ -0,0 +1,131 @@ | |||
1 | # data file for the Fltk User Interface Designer (fluid) | ||
2 | version 1.0107 | ||
3 | header_name {.h} | ||
4 | code_name {.cxx} | ||
5 | decl {\#include <hd24fs.h>} {public | ||
6 | } | ||
7 | |||
8 | decl {\#include <FL/fl_ask.H>} {public | ||
9 | } | ||
10 | |||
11 | class dialog_filesize {open | ||
12 | } { | ||
13 | decl {int buttonclicked;} {public | ||
14 | } | ||
15 | decl {__uint32 lastsector;} {public | ||
16 | } | ||
17 | Function {make_window()} {open | ||
18 | } { | ||
19 | Fl_Window filesizewindow { | ||
20 | label {Image size} open | ||
21 | xywh {351 357 340 105} type Double color 52 labelsize 12 | ||
22 | code0 {buttonclicked=0;} modal visible | ||
23 | } { | ||
24 | Fl_Button button_ok { | ||
25 | label OK | ||
26 | callback {buttonclicked=1; //OK | ||
27 | //char dest[66]; | ||
28 | //strncpy(&dest[0],currname->value(),64); | ||
29 | //dest[64]='\\0'; | ||
30 | //itemname=new string(dest); | ||
31 | __uint64 sizeval=strtol(filesize->value(),0,10); | ||
32 | switch (sizeunit->value()) { | ||
33 | case 0: | ||
34 | sizeval*=2048; | ||
35 | break; | ||
36 | case 1: | ||
37 | sizeval*=1024*2048; | ||
38 | break; | ||
39 | default: | ||
40 | break; | ||
41 | } | ||
42 | sizeval--; | ||
43 | if (sizeval>0xFFFFFFFF) { | ||
44 | sizeval=0xFFFFFFFF; | ||
45 | } | ||
46 | this->lastsector=(__uint32)(sizeval & 0xFFFFFFFF); | ||
47 | Fl_Window * x = Fl::first_window(); | ||
48 | x->~Fl_Window();} | ||
49 | xywh {185 80 70 20} labelsize 12 | ||
50 | } | ||
51 | Fl_Button button_cancel { | ||
52 | label Cancel | ||
53 | callback {buttonclicked=2; //Cancel | ||
54 | Fl_Window * x = Fl::first_window(); | ||
55 | x->~Fl_Window();} | ||
56 | xywh {260 80 70 20} labelsize 12 | ||
57 | } | ||
58 | Fl_Input filesize { | ||
59 | label {Enter size:} | ||
60 | xywh {120 55 120 20} labelsize 12 textsize 12 | ||
61 | code0 {o->maximum_size(16);} | ||
62 | code1 {o->take_focus();} | ||
63 | } | ||
64 | Fl_Choice preset { | ||
65 | label {Select preset size} open selected | ||
66 | xywh {120 10 210 20} down_box BORDER_BOX labelsize 12 textsize 12 | ||
67 | code0 {o->value(0);} | ||
68 | } { | ||
69 | MenuItem {} { | ||
70 | label {Specified below} | ||
71 | callback {sizeunit->activate(); | ||
72 | filesize->activate();} | ||
73 | xywh {0 0 34 21} labelsize 12 | ||
74 | } | ||
75 | MenuItem {} { | ||
76 | label {DVD+R (Single layer)} | ||
77 | callback {sizeunit->value(2); | ||
78 | filesize->value("9180416"); | ||
79 | sizeunit->deactivate(); | ||
80 | filesize->deactivate();} | ||
81 | xywh {10 10 34 21} labelsize 12 | ||
82 | } | ||
83 | MenuItem {} { | ||
84 | label {DVD-R (Single layer)} | ||
85 | callback {sizeunit->value(2); | ||
86 | filesize->value("9193984"); | ||
87 | sizeunit->deactivate(); | ||
88 | filesize->deactivate();} | ||
89 | xywh {20 20 34 21} labelsize 12 | ||
90 | } | ||
91 | MenuItem {} { | ||
92 | label {DVD+R (Dual Layer)} | ||
93 | callback {sizeunit->value(2); | ||
94 | filesize->value("16695296"); | ||
95 | sizeunit->deactivate(); | ||
96 | filesize->deactivate();} | ||
97 | xywh {20 20 34 21} labelsize 12 | ||
98 | } | ||
99 | MenuItem {} { | ||
100 | label {DVD-R (Dual layer)} | ||
101 | callback {sizeunit->value(2); | ||
102 | filesize->value("16686848"); | ||
103 | sizeunit->deactivate(); | ||
104 | filesize->deactivate();} | ||
105 | xywh {30 30 34 21} labelsize 12 | ||
106 | } | ||
107 | } | ||
108 | Fl_Choice sizeunit {open | ||
109 | xywh {245 55 85 20} down_box BORDER_BOX labelsize 12 | ||
110 | code0 {o->value(1);} | ||
111 | } { | ||
112 | MenuItem {} { | ||
113 | label MB | ||
114 | xywh {10 10 34 21} | ||
115 | } | ||
116 | MenuItem {} { | ||
117 | label GB | ||
118 | xywh {20 20 34 21} | ||
119 | } | ||
120 | MenuItem {} { | ||
121 | label Sectors | ||
122 | xywh {20 20 34 21} | ||
123 | } | ||
124 | } | ||
125 | Fl_Box {} { | ||
126 | label {- OR -} | ||
127 | xywh {85 33 35 17} labelsize 12 | ||
128 | } | ||
129 | } | ||
130 | } | ||
131 | } | ||