aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/dialog_filesize.fl
blob: df67208c46e8f23d2c5f26333d37ef358700f11d (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# data file for the Fltk User Interface Designer (fluid)
version 1.0107 
header_name {.h} 
code_name {.cxx}
decl {\#include <hd24fs.h>} {public
} 

decl {\#include <FL/fl_ask.H>} {public
} 

class dialog_filesize {open
} {
  decl {int buttonclicked;} {public
  }
  decl {__uint32 lastsector;} {public
  }
  Function {make_window()} {open
  } {
    Fl_Window filesizewindow {
      label {Image size} open
      xywh {351 357 340 105} type Double color 52 labelsize 12
      code0 {buttonclicked=0;} modal visible
    } {
      Fl_Button button_ok {
        label OK
        callback {buttonclicked=1; //OK
//char dest[66];
//strncpy(&dest[0],currname->value(),64);
//dest[64]='\\0';
//itemname=new string(dest);
__uint64 sizeval=strtol(filesize->value(),0,10);
switch (sizeunit->value()) {
	case 0:
		sizeval*=2048; 
		break;
	case 1:
		sizeval*=1024*2048; 
		break;
	default:	
		break;
}
sizeval--;
if (sizeval>0xFFFFFFFF) {
	sizeval=0xFFFFFFFF;
}
this->lastsector=(__uint32)(sizeval & 0xFFFFFFFF);
Fl_Window * x = Fl::first_window();
x->~Fl_Window();}
        xywh {185 80 70 20} labelsize 12
      }
      Fl_Button button_cancel {
        label Cancel
        callback {buttonclicked=2; //Cancel
Fl_Window * x = Fl::first_window();
x->~Fl_Window();}
        xywh {260 80 70 20} labelsize 12
      }
      Fl_Input filesize {
        label {Enter size:}
        xywh {120 55 120 20} labelsize 12 textsize 12
        code0 {o->maximum_size(16);}
        code1 {o->take_focus();}
      }
      Fl_Choice preset {
        label {Select preset size} open selected
        xywh {120 10 210 20} down_box BORDER_BOX labelsize 12 textsize 12
        code0 {o->value(0);}
      } {
        MenuItem {} {
          label {Specified below}
          callback {sizeunit->activate();
filesize->activate();}
          xywh {0 0 34 21} labelsize 12
        }
        MenuItem {} {
          label {DVD+R (Single layer)}
          callback {sizeunit->value(2);
filesize->value("9180416");
sizeunit->deactivate();
filesize->deactivate();}
          xywh {10 10 34 21} labelsize 12
        }
        MenuItem {} {
          label {DVD-R (Single layer)}
          callback {sizeunit->value(2);
filesize->value("9193984");
sizeunit->deactivate();
filesize->deactivate();}
          xywh {20 20 34 21} labelsize 12
        }
        MenuItem {} {
          label {DVD+R (Dual Layer)}
          callback {sizeunit->value(2);
filesize->value("16695296");
sizeunit->deactivate();
filesize->deactivate();}
          xywh {20 20 34 21} labelsize 12
        }
        MenuItem {} {
          label {DVD-R (Dual layer)}
          callback {sizeunit->value(2);
filesize->value("16686848");
sizeunit->deactivate();
filesize->deactivate();}
          xywh {30 30 34 21} labelsize 12
        }
      }
      Fl_Choice sizeunit {open
        xywh {245 55 85 20} down_box BORDER_BOX labelsize 12
        code0 {o->value(1);}
      } {
        MenuItem {} {
          label MB
          xywh {10 10 34 21}
        }
        MenuItem {} {
          label GB
          xywh {20 20 34 21}
        }
        MenuItem {} {
          label Sectors
          xywh {20 20 34 21}
        }
      }
      Fl_Box {} {
        label {- OR -}
        xywh {85 33 35 17} labelsize 12
      }
    }
  }
}