-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFl_Scope.H
137 lines (96 loc) · 3.34 KB
/
Fl_Scope.H
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
132
133
134
135
#ifndef Fl_Scope_H
#define Fl_Scope_H
/***********************************************************
* Fl_Scope.h
*
* Author: Michael Pearce
*
* Started: 1 August 2003
*
* Copyright: Copyright 2003 Michael Pearce All Rights reserved.
*
* Licence: GNU/GPL
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (GNU.txt); if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* or visit http://www.gnu.org/licenses/licenses.html
*
************************************************************
* See Fl_Scope.cxx for Version Information
***********************************************************/
#ifndef Fl_Widget_H
#include <FL/Fl_Widget.H>
#endif
#define FL_SCOPE_TRACE_SCROLL 0
#define FL_SCOPE_TRACE_LOOP 1
#define FL_SCOPE_TRACE_LOOP_CLEAR 2
#define FL_SCOPE_REDRAW_OFF 0
#define FL_SCOPE_REDRAW_FULL 1
#define FL_SCOPE_REDRAW_ALWAYS 2
#define FL_SCOPE_DOT 0
#define FL_SCOPE_LINE 1
#define FL_SCOPE_SIGNED 0
#define FL_SCOPE_UNSIGNED 1
class FL_EXPORT Fl_Scope : public Fl_Widget
{
int _x,_y,_w,_h; /* The draw position */
//unsigned char *ScopeData; /* Pointer to dynamic array of track info */
int *ScopeData; /* Pointer to dynamic array of track info */
int ScopeDataSize;
int ScopeDataPos;
Fl_Color _TraceColour; /* Trace Colour */
Fl_Color _BackColour; /* Background Colour */
int TraceType;
int RedrawMode;
int LineType;
int DataType;
protected:
void draw(int,int,int,int);
int handle(int,int,int,int,int);
void draw();
/* These are protected because changing the size screws up the buffer */
/* May Fix this problem later */
void x(int X){ _x=X;};
void y(int Y){ _y=Y;};
void w(int W){ _w=W;};
void h(int H){ _h=H;};
public:
int x(){return _x;};
//void x(int X){ _x=X;};
int y(){return _y;};
//void y(int Y){ _y=Y;};
int w(){return _w;};
//void w(int W){ _w=W;};
int h(){return _h;};
//void h(int H){ _h=H;};
int tracetype(){return TraceType;};
void tracetype(int t){TraceType=t;};
int redrawmode(){return RedrawMode;};
void redrawmode(int t){RedrawMode=t;};
int linetype(){return LineType;};
void linetype(int t){LineType=t;};
int datatype(){return DataType;};
void datatype(int t){DataType=t;};
//int Add(unsigned char); /* Add Data to Scope */
int Add(int); /* Add Data to Scope */
Fl_Color TraceColour(){return _TraceColour;};
void TraceColour(Fl_Color c){_TraceColour=c;};
Fl_Color BackColour(){return _BackColour;};
void BackColour(Fl_Color c){_BackColour=c;};
virtual int handle(int);
Fl_Scope(int,int,int,int,const char * = 0);
~Fl_Scope();
};
/**************** END OF FILE ******************************/
#endif