Debian Codegraph @

source/sgenwin.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 __SGENWIN_H
22 #define __SGENWIN_H
23
24
25 #include <clxclient.h>
26 #include "impdata.h"
27
28
29
30 class Sgenwin : public X_window , public X_callback
31 {
32 public:
33
34 Sgenwin (X_window *parw, X_resman *resman, X_callback *callb);
35 ~Sgenwin (void);
36
37 void hide (void);
38 void show (void);
39 void set_sess (const char *sess) { _sess = sess; }
40 void set_rate (int rate) { _rate = rate; }
41
42 private:
43
44 enum
45 {
46 XDEF = 420, YDEF = 180,
47 XPOS = 150, YPOS = 150
48 };
49
50 enum { B_LIN, B_LOG, B_CANC, B_SGEN };
51
52 virtual void handle_event (XEvent *xe);
53 virtual void handle_callb (int, X_window*, _XEvent*);
54
55 void xcmesg (XClientMessageEvent *E);
56 void generate (void);
57 void add_text (int xp, int yp, int xs, int ys, const char *text, int align);
58 void askdata (X_textip *T);
59 void gensweep (void);
60 void genlogsweep (void);
61 void genlinsweep (void);
62
63 Atom _xatom;
64 X_callback *_callb;
65
66 X_textip *_ready;
67 X_textip *_tname;
68 X_textip *_trate;
69 X_textip *_ttim1;
70 X_textip *_ttim2;
71 X_textip *_ttim3;
72 X_textip *_tfmin;
73 X_textip *_tfmax;
74 X_tbutton *_blin;
75 X_tbutton *_blog;
76 X_tbutton *_bcanc;
77 X_tbutton *_bsgen;
78
79 const char *_sess;
80 int _rate;
81 int _k0;
82 int _k1;
83 int _k2;
84 float _fmin;
85 float _fmax;
86 Impdata _impd;
87 };
88
89
90 #endif