]> git.vomp.tv Git - vompclient.git/blob - box.h
Un-hardcoded all the colours
[vompclient.git] / box.h
1 /*
2     Copyright 2004-2005 Chris Tallon
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20
21 #ifndef BOX_H
22 #define BOX_H
23
24 #include <stdio.h>
25
26 #include "log.h"
27 #include "colour.h"
28 #include "surface.h"
29
30 // Abstract ???????
31 class Box
32 {
33   public:
34     Box();
35     virtual ~Box();
36
37     void setScreenPos(int x, int y);
38     void setDimensions(int h, int w);
39     void show();
40
41     virtual void draw();
42
43     // Drawing functions level 1
44     void fillColour(Colour& colour);
45     void drawPara(char* text, int x, int y, Colour& colour);
46
47     // Drawing functions level 0
48     void rectangle(int x1, int y1, int x2, int y2, Colour& colour);
49     void drawText(char* text, int x, int y, Colour& colour);
50     void drawTextRJ(char* text, int x, int y, Colour& colour);
51     void drawPixel(int x, int y, Colour& colour);
52
53     int getScreenX();
54     int getScreenY();
55     int getWidth();
56     int getHeight();
57
58     static void showAll();
59
60   private:
61
62   protected:
63     Surface* surface;
64     int width;
65     int height;
66
67     int screenX;
68     int screenY;
69
70     static char numBoxes;
71
72     static const int paraMargin = 10;
73
74 };
75
76 #endif