aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/dialog_options.fl
blob: 39a3a5493151455074d67c52c11c8aee755fb2df (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_options {open
} {
  decl {int buttonclicked;} {public
  }
  decl {hd24song* currsong;} {}
  decl {string* itemname;} {public
  }
  Function {~dialog_options()} {open
  } {
    code {if (itemname!=NULL) delete itemname;} {}
  }
  decl {int locnum;} {}
  Function {make_window()} {open
  } {
    Fl_Window optionswindow {
      label options open
      xywh {420 519 565 145} type Double color 52 hide
      code0 {buttonclicked=0;} modal
    } {
      Fl_Tabs {} {open
        xywh {0 0 565 145}
      } {
        Fl_Group {} {
          label Catalog open
          xywh {0 20 565 125} labelsize 12 hide
        } {
          Fl_Check_Button {} {
            label {Include locate point information in drive catalog}
            xywh {5 25 550 15} down_box DOWN_BOX labelsize 12 deactivate
          }
          Fl_Button button_catalogapply {
            label Apply
            callback {buttonclicked=1; //OK
char dest[66];
strncpy(&dest[0],currname->value(),64);
dest[64]='\\0';
itemname=new string(dest);
Fl_Window * x = Fl::first_window();
x->~Fl_Window();}
            xywh {480 110 70 20} labelsize 12
          }
          Fl_Check_Button {} {
            label {Keep catalog sorted alphabetically}
            xywh {5 45 550 15} down_box DOWN_BOX labelsize 12 deactivate
          }
        }
        Fl_Group {} {
          label Transfers open
          xywh {0 20 565 125} labelsize 12
        } {
          Fl_Button button_ok {
            label Apply
            callback {buttonclicked=1; //OK
char dest[66];
strncpy(&dest[0],currname->value(),64);
dest[64]='\\0';
itemname=new string(dest);
Fl_Window * x = Fl::first_window();
x->~Fl_Window();}
            xywh {480 110 70 20} labelsize 12
          }
          Fl_Input currname {
            label {Output file name:}
            callback {char filteredname[65];
int x=strlen(o->value());
if (x>64) { x=64; }
int src=0;
int filtered=0;
for (int i=0;i<x;i++) {
 	if (
 	   (o->value()[i]=='\\\\') 
 	|| (o->value()[i]=='/') 
 	|| (o->value()[i]==':') 
 	|| (o->value()[i]=='*') 
 	|| (o->value()[i]=='?') 
 	|| (o->value()[i]=='"') 
 	|| (o->value()[i]=='<') 
 	|| (o->value()[i]=='>') 
 	|| (o->value()[i]=='\\\\') 
 	|| (o->value()[i]=='|'))
 	{
 		filtered=1;
 		continue; 	
 	}
	filteredname[src]=o->value()[i];
	src++;
}
filteredname[src]='\\0';
if (filtered==1) {
 	int pos=o->position()-1;
 	if (pos<0) pos=0;
	o->value(filteredname);
	o->position(pos,pos);
}}
            xywh {120 25 435 20} labelsize 12 when 1 textsize 12
            code0 {o->maximum_size(64);}
            code1 {o->take_focus();}
          }
          Fl_Button button_transferhelp {
            label Help
            callback {fl_message("The following special sequences can be used:\\n"
	   "<drivename>\\t\\tThe volume label of the drive\\n"
   	   "<projname>\\t\\tThe name of the project\\n"
       	   "<songname>\\t\\tThe name of the song\\n"
   	   "<projnum>\\t\\tThe sequence number of the project on disk\\n"
   	   "<songnum>\\t\\tThe sequence number of the song within the project\\n" 
       	   "<tracknum>\\t\\tThe track number being transferred\\n" 
    	   "<tracknum+offset>\\tLikewise, prompt for offset before transfer\\n" 
           "<timestamp>\\t\\tCurrent date/time (YYYY-MM-DD HH:MI:SS)\\n"           
);} selected
            xywh {405 110 70 20} labelsize 12
          }
        }
      }
    }
  }
  Function {dialog_options()} {open
  } {
    code {itemname=NULL;} {}
  }
}