~ubuntu-branches/ubuntu/vivid/aeolus/vivid

« back to all changes in this revision

Viewing changes to functionwin.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-04-19 19:12:51 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100419191251-hgarjfcdfl7c0ryl
Tags: 0.8.4-3
debian/patches/01-makefile.patch: Drop -march=native flag, it isn't valid
for Debian packages as the results are unpredictable, thanks to
Bastian Blank for reporting this (Closes: #578278).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
    Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
3
 
    
4
 
    This program is free software; you can redistribute it and/or modify
5
 
    it under the terms of the GNU General Public License as published by
6
 
    the Free Software Foundation; either version 2 of the License, or
7
 
    (at your option) any later version.
8
 
 
9
 
    This program is distributed in the hope that it will be useful,
10
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
    GNU General Public License for more details.
13
 
 
14
 
    You should have received a copy of the GNU General Public License
15
 
    along with this program; if not, write to the Free Software
16
 
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
 
*/
18
 
 
19
 
 
20
 
#ifndef __FUNCTIONWIN_H
21
 
#define __FUNCTIONWIN_H
22
 
 
23
 
 
24
 
#include <clxclient.h>
25
 
 
26
 
 
27
 
class Functionwin : public X_window
28
 
{
29
 
public:
30
 
 
31
 
    Functionwin (X_window *parent, X_callback *callb, int xp, int yp, 
32
 
                 unsigned long bgnd, unsigned long grid, unsigned long mark);
33
 
    ~Functionwin (void);
34
 
 
35
 
    void set_xparam (int n, int x0, int dx);
36
 
    void set_yparam (int k, X_scale_style *scale, unsigned long color);
37
 
    void show (void);
38
 
 
39
 
    void reset (int k);
40
 
    void set_point (int k, int i, float v);
41
 
    void upd_point (int k, int i, float v);
42
 
    void clr_point (int k, int i);
43
 
    int   get_ind (void) const { return _ic; }
44
 
    int   get_fun (void) const { return _fc; }
45
 
    float get_val (void) const { return _vc; }   
46
 
    void set_mark (int i);
47
 
    void redraw (void);
48
 
 
49
 
    int xs (void) const { return _xs; }
50
 
    int ys (void) const { return _ys; }
51
 
 
52
 
private:
53
 
 
54
 
    enum { NFUNC = 2 };
55
 
 
56
 
    virtual void handle_event (XEvent *xe);
57
 
 
58
 
    void expose (XExposeEvent *E);
59
 
    void bpress (XButtonEvent *E);
60
 
    void motion (XPointerMovedEvent *E);
61
 
    void brelse (XButtonEvent *E);
62
 
    void plot_grid (void);
63
 
    void plot_mark (void);
64
 
    void plot_line (int);
65
 
    void move_point (int);
66
 
    void move_curve (int);
67
 
    void find_sect (int *);
68
 
    void move_sect (int *);
69
 
 
70
 
    X_callback     *_callb; 
71
 
    unsigned long   _bgnd;
72
 
    unsigned long   _grid;
73
 
    unsigned long   _mark;
74
 
    int             _xs;
75
 
    int             _ys;
76
 
    int             _x0;
77
 
    int             _dx;
78
 
    int             _ymin;
79
 
    int             _ymax;
80
 
    int             _n;
81
 
    unsigned long   _co [NFUNC];
82
 
    X_scale_style  *_sc [NFUNC];
83
 
    int            *_yc [NFUNC];
84
 
    char           *_st [NFUNC];
85
 
    int             _fc;
86
 
    int             _ic;
87
 
    int             _im;
88
 
    float           _vc;
89
 
};
90
 
 
91
 
 
92
 
#endif