summaryrefslogtreecommitdiff
path: root/calculator.h
blob: 233266999493ab15cda5b9445ad1195c3c893221 (plain)
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
#include <gui/ApplicationWindow.h>
#include <gui/Application.h>
#include <gui/TextView.h>

using namespace SkyGI;

#define BUTTON_ZERO		0
#define BUTTON_ONE		1
#define BUTTON_TWO		2
#define BUTTON_THREE		3
#define BUTTON_FOUR		4
#define BUTTON_FIVE		5
#define BUTTON_SIX			6
#define BUTTON_SEVEN		7
#define BUTTON_EIGHT		8
#define BUTTON_NINE		9
#define BUTTON_PLUS		10
#define BUTTON_MINUS		11
#define BUTTON_TIMES		12
#define BUTTON_DIVIDE		13
#define BUTTON_EQUALS	14
#define BUTTON_POINT		15
#define BUTTON_SIGN		16
#define BUTTON_CLEAR		17

class Calculator : public Application {
	public:
		Calculator(int argc, char *argv[]);
};

class CalculatorWindow : public ApplicationWindow {
	public:
		CalculatorWindow(	const Rect &rFrame,
					const String& szTitle,
					unsigned int nWindowLayoutFlags,
					unsigned int uiFlags = 0);
		void    OnCommand(	const MessageCommand *pMessage);

		TextView * pText;
};