StarTrekV3_Linux  Version3
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Pages
FontManager.h
Go to the documentation of this file.
1 //
2 // ___.--------._____________,------' -----.`----._
3 // \ ` - . _ /\
4 // `.__________ ` - | | __,---"-._
5 // `-----------.______ ,'_/ ________,------'___________`----.___________
6 // `-----.____,' \===========================================/
7 // | :| >--------------.----------.---------------'
8 // / :| _,--' ,--' `--.__.--'
9 // / : |--'______________/_
10 // ,---,' : \__________________`--.
11 // `__________ |/|
12 // `------._ |\|
13 // `--._________,-'
14 //
15 //
16 //
17 // Credits go to Paramount pictures for the star - trek concept and universe.
18 
19 
20 // Copyright (C) 2015 - 2016 E.J.M. Martens
21 //
22 // This program is free software; you can redistribute it and/or
23 // modify it under the terms of the GNU General Public License
24 // as published by the Free Software Foundation; either version 2
25 // of the License, or (at your option) any later version.
26 //
27 // This program is distributed in the hope that it will be useful,
28 // but WITHOUT ANY WARRANTY; without even the implied warranty of
29 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 // GNU General Public License for more details.
31 //
32 // You should have received a copy of the GNU General Public License
33 // along with this program; if not, write to the Free Software
34 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
35 
36 
37 
38 #ifndef _FONTMANAGER
39 #define _FONTMANAGER
40 
41 #include <vector>
42 #include <list>
43 #include <string>
44 #include <allegro5/allegro.h>
45 #include <allegro5/allegro_font.h>
46 #include <allegro5/allegro_ttf.h>
47 
48 using namespace std;
49 
50 
51 namespace FONT
52 {
53  enum FONTNAME
54  {
55 #ifdef DEBUG
56  DBG = 0,
57  MENU,
58 #else
59  MENU =0,
60 #endif // DEBUG
61 
66  };
67 
68 }
69 
70 namespace FontManager
71 {
72 
73 void Init_FontManager();
74 void DeInit_FontManager();
75 void LoadFonts();
76 ALLEGRO_FONT * GetFont(FONT::FONTNAME a_Name);
77 
78 class FontManagerException: public exception
79 {
80  private:
81  string m_strError;
82 
83  public:
84 
85  FontManagerException(string a_strError)
86  {
87  m_strError = a_strError;
88  }
89 
90  virtual const char* what() const throw()
91  {
92  return m_strError.c_str();
93  }
94 
95  virtual ~FontManagerException() throw() { }
96 };
97 
98 }
99 
100 
101 #endif // _SOUNDMANAGER
void LoadFonts()
Definition: FontManager.cpp:30
FontManagerException(string a_strError)
Definition: FontManager.h:85
Definition: FontManager.h:63
Definition: FontManager.h:59
Definition: FontManager.h:64
virtual const char * what() const
Definition: FontManager.h:90
Definition: FontManager.h:65
Definition: FontManager.h:78
virtual ~FontManagerException()
Definition: FontManager.h:95
Definition: FontManager.h:62
ALLEGRO_FONT * GetFont(FONT::FONTNAME a_Name)
Definition: FontManager.cpp:97
FONTNAME
Definition: FontManager.h:53
void DeInit_FontManager()
Definition: FontManager.cpp:20
void Init_FontManager()
Definition: FontManager.cpp:11