-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWidget.cpp
More file actions
38 lines (33 loc) · 842 Bytes
/
Widget.cpp
File metadata and controls
38 lines (33 loc) · 842 Bytes
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
/*
*Widget.cpp
*Created By: Jacob Regan
*Date of Creation: 4/23/12
*Date of last edit: 4/25/12
*/
#include "WProgram.h"
#include "Widget.h"
#include "WidgetShield.h"
// declares a basic constructor which sets x, y, and type to starting values. Automatically sets id to null
Widget::Widget(uint16_t x, uint16_t y, char type){
this->x = x;
this->y = y;
this->type = type;
id = NULL;
}
//Blank initialization of graphics allows the widgetShield class to call it with no consequence.
//Overridden in specific widget class as needed
void Widget::initGraphics(){
}
//Standard get and set functions for type and ID
char Widget::getType(){
return (type);
}
void Widget::setType(char type){
this->type = type;
}
char Widget::getID(){
return(id);
}
void Widget::setID(char id){
this->id = id;
}