OgreFontManager.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2This source file is a part of OGRE
3(Object-oriented Graphics Rendering Engine)
4
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2013 Torus Knot Software Ltd
8Permission is hereby granted, free of charge, to any person obtaining a copy
9of this software and associated documentation files (the "Software"), to deal
10in the Software without restriction, including without limitation the rights
11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12copies of the Software, and to permit persons to whom the Software is
13furnished to do so, subject to the following conditions:
14
15The above copyright notice and this permission notice shall be included in
16all copies or substantial portions of the Software.
17
18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24THE SOFTWARE
25-------------------------------------------------------------------------*/
26
27#ifndef _FontManager_H__
28#define _FontManager_H__
29
31#include "OgreSingleton.h"
32#include "OgreResourceManager.h"
33#include "OgreFont.h"
34
35namespace Ogre
36{
44 class _OgreOverlayExport FontManager : public ResourceManager, public Singleton< FontManager >
45 {
46 public:
47
50
53 FontPtr create (const String& name, const String& group,
54 bool isManual = false, ManualResourceLoader* loader = 0,
55 const NameValuePairList* createParams = 0);
56
60
61
63 void parseScript(DataStreamPtr& stream, const String& groupName);
96
97 protected:
98
101 const String& group, bool isManual, ManualResourceLoader* loader,
102 const NameValuePairList* params);
103 void parseAttribute(const String& line, FontPtr& pFont);
104
105 void logBadAttrib(const String& line, FontPtr& pFont);
106
107
108 };
111}
112
113#endif
#define _OgreOverlayExport
Manages Font resources, parsing .fontdef files and generally organising them.
void parseAttribute(const String &line, FontPtr &pFont)
void logBadAttrib(const String &line, FontPtr &pFont)
static FontManager & getSingleton(void)
Override standard Singleton retrieval.
FontPtr getByName(const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
Get a resource by name.
Resource * createImpl(const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, const NameValuePairList *params)
Internal methods.
FontPtr create(const String &name, const String &group, bool isManual=false, ManualResourceLoader *loader=0, const NameValuePairList *createParams=0)
Create a new font.
void parseScript(DataStreamPtr &stream, const String &groupName)
Parse a script file.
static FontManager * getSingletonPtr(void)
Override standard Singleton retrieval.
Interface describing a manual resource loader.
Definition: OgreResource.h:515
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
Defines a generic resource handler.
Abstract class representing a loadable resource (e.g.
Definition: OgreResource.h:80
Template class for creating single-instance global classes.
Definition: OgreSingleton.h:65
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
unsigned long long int ResourceHandle
Definition: OgreResource.h:41
_StringBase String

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.