Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
FontMgr.cpp
Go to the documentation of this file.
1
/* Project nGenEx
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: nGenEx.lib
6
FILE: FontMgr.cpp
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Font Resource Manager class implementation
13
*/
14
15
#include "
MemDebug.h
"
16
#include "
FontMgr.h
"
17
18
// +--------------------------------------------------------------------+
19
20
List<FontItem>
FontMgr::fonts;
21
22
// +--------------------------------------------------------------------+
23
24
void
25
FontMgr::Close
()
26
{
27
fonts.
destroy
();
28
}
29
30
// +--------------------------------------------------------------------+
31
32
void
33
FontMgr::Register
(
const
char
* name,
Font
* font)
34
{
35
FontItem
* item =
new
(__FILE__,__LINE__)
FontItem
;
36
37
if
(item) {
38
item->
name
= name;
39
item->
size
= 0;
40
item->
font
= font;
41
42
fonts.
append
(item);
43
}
44
}
45
46
// +--------------------------------------------------------------------+
47
48
Font
*
49
FontMgr::Find
(
const
char
* name)
50
{
51
ListIter<FontItem>
item = fonts;
52
while
(++item) {
53
if
(item->
name
== name)
54
return
item->
font
;
55
}
56
57
return
0;
58
}
nGenEx
FontMgr.cpp
Generated on Tue Jun 5 2012 20:46:22 for Starshatter_Open by
1.8.1