Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

CSC112 Spring 2016 Examples

2370 views
1
#ifndef Widget_h
2
#define Widget_h
3
4
class Widget {
5
6
public:
7
Widget(int _x, int _y, int _width, int _height);
8
Widget();
9
10
11
//drawing functions
12
virtual void display()=0;
13
virtual void clear();
14
15
//set our parameters
16
virtual int x();
17
virtual void x(int _x);
18
virtual int y();
19
virtual void y(int _y);
20
virtual int width();
21
virtual void width(int _width);
22
virtual int height();
23
virtual void height(int _height);
24
25
protected:
26
int _x;
27
int _y;
28
int _width;
29
int _height;
30
};
31
32
#endif // Widget_h
33
34