Debian Codegraph @

source/exptwin.h

raw
1 // ----------------------------------------------------------------------------
2 //
3 // Copyright (C) 2003-2013 Fons Adriaensen <[email protected]>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 // ----------------------------------------------------------------------------
19
20
21 #ifndef __EXPTWIN_H
22 #define __EXPTWIN_H
23
24
25 #include <sndfile.h>
26 #include "guiclass.h"
27 #include "extproc.h"
28 #include "filewin.h"
29 #include "impdata.h"
30
31
32 class Exptwin : public X_window, public X_callback
33 {
34 public:
35
36 Exptwin (X_window *parent, X_resman *resman, X_callback *callb);
37 ~Exptwin (void);
38
39 void show (void);
40 void hide (int cbarg);
41 int type (void) const { return _rtype.stat (); }
42 int chan (void) const { return _rchan.stat (); }
43 int form (void) const { return _rform.stat (); }
44 int sect (void) const { return _rsect.stat (); }
45 const char *file (void) const { return _tfile->text (); }
46
47
48 private:
49
50 enum { XPOS = 130, YPOS = 130, XDEF = 500, YDEF = 250 };
51 enum { B_FILE, B_EXPT, B_CANC };
52
53 virtual void handle_event (XEvent *);
54 virtual void handle_callb (int, X_window *, XEvent *);
55
56 void xcmesg (XClientMessageEvent *);
57 void makewin (void);
58 void add_text (int xp, int yp, int xs, int ys, const char *text, int align);
59
60 Atom _xatom;
61 X_callback *_callb;
62 Radiosel _rtype;
63 Radiosel _rchan;
64 Radiosel _rsect;
65 Radiosel _rform;
66 X_ibutton *_bfile;
67 X_tbutton *_bexpt;
68 X_tbutton *_bcanc;
69 X_textip *_tfile;
70
71
72 static const char * _rtype_text [4];
73 static const char * _rchan_text [2];
74 static const char * _rsect_text [3];
75 static const char * _rform_text [3];
76 };
77
78
79 #endif