2
Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
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.
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.
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.
20
#ifndef __FUNCTIONWIN_H
21
#define __FUNCTIONWIN_H
24
#include <clxclient.h>
27
class Functionwin : public X_window
31
Functionwin (X_window *parent, X_callback *callb, int xp, int yp,
32
unsigned long bgnd, unsigned long grid, unsigned long mark);
35
void set_xparam (int n, int x0, int dx);
36
void set_yparam (int k, X_scale_style *scale, unsigned long color);
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);
49
int xs (void) const { return _xs; }
50
int ys (void) const { return _ys; }
56
virtual void handle_event (XEvent *xe);
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);
65
void move_point (int);
66
void move_curve (int);
67
void find_sect (int *);
68
void move_sect (int *);
81
unsigned long _co [NFUNC];
82
X_scale_style *_sc [NFUNC];