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

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