2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
7 #ifndef CAFU_GUISYS_GUI_RESOURCES_HPP_INCLUDED
8 #define CAFU_GUISYS_GUI_RESOURCES_HPP_INCLUDED
10 #include "Templates/Array.hpp"
15 namespace cf
{ class TrueTypeFontT
; }
24 /// This class manages and provides resources (fonts and models) for GuiImplT instances.
25 /// One GuiResourcesT can be commonly used for several GuiImplT instances at once.
31 GuiResourcesT(ModelManagerT
& ModelMan
);
36 /// Returns (a pointer to) a font instance for the given filename.
37 /// The returned font instance is possibly shared with other users, and must not be deleted.
38 /// @param FontName The name of the font to return.
39 /// @returns A pointer to the specified font, or NULL if there was an error (e.g. the font could not be loaded).
40 TrueTypeFontT
* GetFont(const std::string
& FontName
);
42 /// Returns (a pointer to) a model instance for the given filename.
43 /// @see ModelManagerT::GetModel() for more details.
44 const CafuModelT
* GetModel(const std::string
& FileName
, std::string
& ErrorMsg
);
49 GuiResourcesT(const GuiResourcesT
&); ///< Use of the Copy Constructor is not allowed.
50 void operator = (const GuiResourcesT
&); ///< Use of the Assignment Operator is not allowed.
52 ArrayT
<TrueTypeFontT
*> m_Fonts
; ///< The fonts that are used within the GUIs.
53 ModelManagerT
& m_ModelMan
; ///< The model manager from which any models that occur in the GUIs are aquired.