OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Frame.h
1 /*
2  * Copyright 2010-2014 OpenXcom Developers.
3  *
4  * This file is part of OpenXcom.
5  *
6  * OpenXcom 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 3 of the License, or
9  * (at your option) any later version.
10  *
11  * OpenXcom 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 OpenXcom. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef OPENXCOM_FRAME_H
20 #define OPENXCOM_FRAME_H
21 
22 #include "../Engine/Surface.h"
23 
24 namespace OpenXcom
25 {
26 
30 class Frame : public Surface
31 {
32 private:
33  Uint8 _color, _bg;
34  int _thickness;
35  bool _contrast;
36 public:
38  Frame(int width, int height, int x = 0, int y = 0);
40  ~Frame();
42  void setColor(Uint8 color);
44  Uint8 getColor() const;
46  void setBackground(Uint8 bg);
48  Uint8 getBackground() const;
50  void setHighContrast(bool contrast);
52  void setThickness(int thickness);
54  void draw();
55 };
56 
57 }
58 
59 #endif
Uint8 getBackground() const
Gets the background color.
Definition: Frame.cpp:75
Frame(int width, int height, int x=0, int y=0)
Creates a new frame with the specified size and position.
Definition: Frame.cpp:31
void draw()
Draws the frame.
Definition: Frame.cpp:107
void setColor(Uint8 color)
Sets the border color.
Definition: Frame.cpp:46
void setThickness(int thickness)
Sets the border thickness.
Definition: Frame.cpp:95
Element that is blit (rendered) onto the screen.
Definition: Surface.h:39
void setHighContrast(bool contrast)
Sets the high contrast color setting.
Definition: Frame.cpp:85
Fancy frame border thing used for windows and other elements.
Definition: Frame.h:30
~Frame()
Cleans up the frame.
Definition: Frame.cpp:38
void setBackground(Uint8 bg)
Sets the background color.
Definition: Frame.cpp:65
Uint8 getColor() const
Gets the border color.
Definition: Frame.cpp:56