]> git.vomp.tv Git - vompclient.git/blob - box.h
Initial import
[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 "surface.h"
28
29 // Abstract ???????
30 class Box
31 {
32   public:
33     Box();
34     virtual ~Box();
35
36     void setScreenPos(int x, int y);
37     void setDimensions(int h, int w);
38     void show();
39
40     virtual void draw();
41
42     // Drawing functions level 1
43     void fillColour(int r, int g, int b, int a);
44     void drawPara(char* text, int x, int y, int r, int g, int b);
45
46     // Drawing functions level 0
47     void rectangle(int x1, int y1, int x2, int y2, int r, int g, int b, int a);
48     void drawText(char* text, int x, int y, int r, int g, int b);
49     void drawTextRJ(char* text, int x, int y, int r, int g, int b);
50     void drawPixel(int x, int y, int c);
51
52     int getScreenX();
53     int getScreenY();
54     int getWidth();
55     int getHeight();
56
57     static void showAll();
58
59   private:
60
61   protected:
62     Surface* surface;
63     int width;
64     int height;
65
66     int screenX;
67     int screenY;
68
69     static char numBoxes;
70
71     static const int paraMargin = 10;
72
73 };
74
75 #endif