diff options
Diffstat (limited to 'src/frontend/dialog_options.fl')
-rwxr-xr-x | src/frontend/dialog_options.fl | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/src/frontend/dialog_options.fl b/src/frontend/dialog_options.fl new file mode 100755 index 0000000..39a3a54 --- /dev/null +++ b/src/frontend/dialog_options.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_options {open | ||
12 | } { | ||
13 | decl {int buttonclicked;} {public | ||
14 | } | ||
15 | decl {hd24song* currsong;} {} | ||
16 | decl {string* itemname;} {public | ||
17 | } | ||
18 | Function {~dialog_options()} {open | ||
19 | } { | ||
20 | code {if (itemname!=NULL) delete itemname;} {} | ||
21 | } | ||
22 | decl {int locnum;} {} | ||
23 | Function {make_window()} {open | ||
24 | } { | ||
25 | Fl_Window optionswindow { | ||
26 | label options open | ||
27 | xywh {420 519 565 145} type Double color 52 hide | ||
28 | code0 {buttonclicked=0;} modal | ||
29 | } { | ||
30 | Fl_Tabs {} {open | ||
31 | xywh {0 0 565 145} | ||
32 | } { | ||
33 | Fl_Group {} { | ||
34 | label Catalog open | ||
35 | xywh {0 20 565 125} labelsize 12 hide | ||
36 | } { | ||
37 | Fl_Check_Button {} { | ||
38 | label {Include locate point information in drive catalog} | ||
39 | xywh {5 25 550 15} down_box DOWN_BOX labelsize 12 deactivate | ||
40 | } | ||
41 | Fl_Button button_catalogapply { | ||
42 | label Apply | ||
43 | callback {buttonclicked=1; //OK | ||
44 | char dest[66]; | ||
45 | strncpy(&dest[0],currname->value(),64); | ||
46 | dest[64]='\\0'; | ||
47 | itemname=new string(dest); | ||
48 | Fl_Window * x = Fl::first_window(); | ||
49 | x->~Fl_Window();} | ||
50 | xywh {480 110 70 20} labelsize 12 | ||
51 | } | ||
52 | Fl_Check_Button {} { | ||
53 | label {Keep catalog sorted alphabetically} | ||
54 | xywh {5 45 550 15} down_box DOWN_BOX labelsize 12 deactivate | ||
55 | } | ||
56 | } | ||
57 | Fl_Group {} { | ||
58 | label Transfers open | ||
59 | xywh {0 20 565 125} labelsize 12 | ||
60 | } { | ||
61 | Fl_Button button_ok { | ||
62 | label Apply | ||
63 | callback {buttonclicked=1; //OK | ||
64 | char dest[66]; | ||
65 | strncpy(&dest[0],currname->value(),64); | ||
66 | dest[64]='\\0'; | ||
67 | itemname=new string(dest); | ||
68 | Fl_Window * x = Fl::first_window(); | ||
69 | x->~Fl_Window();} | ||
70 | xywh {480 110 70 20} labelsize 12 | ||
71 | } | ||
72 | Fl_Input currname { | ||
73 | label {Output file name:} | ||
74 | callback {char filteredname[65]; | ||
75 | int x=strlen(o->value()); | ||
76 | if (x>64) { x=64; } | ||
77 | int src=0; | ||
78 | int filtered=0; | ||
79 | for (int i=0;i<x;i++) { | ||
80 | if ( | ||
81 | (o->value()[i]=='\\\\') | ||
82 | || (o->value()[i]=='/') | ||
83 | || (o->value()[i]==':') | ||
84 | || (o->value()[i]=='*') | ||
85 | || (o->value()[i]=='?') | ||
86 | || (o->value()[i]=='"') | ||
87 | || (o->value()[i]=='<') | ||
88 | || (o->value()[i]=='>') | ||
89 | || (o->value()[i]=='\\\\') | ||
90 | || (o->value()[i]=='|')) | ||
91 | { | ||
92 | filtered=1; | ||
93 | continue; | ||
94 | } | ||
95 | filteredname[src]=o->value()[i]; | ||
96 | src++; | ||
97 | } | ||
98 | filteredname[src]='\\0'; | ||
99 | if (filtered==1) { | ||
100 | int pos=o->position()-1; | ||
101 | if (pos<0) pos=0; | ||
102 | o->value(filteredname); | ||
103 | o->position(pos,pos); | ||
104 | }} | ||
105 | xywh {120 25 435 20} labelsize 12 when 1 textsize 12 | ||
106 | code0 {o->maximum_size(64);} | ||
107 | code1 {o->take_focus();} | ||
108 | } | ||
109 | Fl_Button button_transferhelp { | ||
110 | label Help | ||
111 | callback {fl_message("The following special sequences can be used:\\n" | ||
112 | "<drivename>\\t\\tThe volume label of the drive\\n" | ||
113 | "<projname>\\t\\tThe name of the project\\n" | ||
114 | "<songname>\\t\\tThe name of the song\\n" | ||
115 | "<projnum>\\t\\tThe sequence number of the project on disk\\n" | ||
116 | "<songnum>\\t\\tThe sequence number of the song within the project\\n" | ||
117 | "<tracknum>\\t\\tThe track number being transferred\\n" | ||
118 | "<tracknum+offset>\\tLikewise, prompt for offset before transfer\\n" | ||
119 | "<timestamp>\\t\\tCurrent date/time (YYYY-MM-DD HH:MI:SS)\\n" | ||
120 | );} selected | ||
121 | xywh {405 110 70 20} labelsize 12 | ||
122 | } | ||
123 | } | ||
124 | } | ||
125 | } | ||
126 | } | ||
127 | Function {dialog_options()} {open | ||
128 | } { | ||
129 | code {itemname=NULL;} {} | ||
130 | } | ||
131 | } | ||