Crazy Eddies GUI System: CEGUIImagesetManager.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

# CEGUIImagesetManager.h

    00001 /************************************************************************
    00002         filename:       CEGUIImagesetManager.h
    00003         created:        21/2/2004
    00004         author:         Paul D Turner
    00005
    00006         purpose:        Defines interface for ImagesetManager object
    00007 *************************************************************************/
    00008 /*************************************************************************
    00009     Crazy Eddie's GUI System (http://www.cegui.org.uk)
    00010     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
    00011
    00012     This library is free software; you can redistribute it and/or
    00013     modify it under the terms of the GNU Lesser General Public
    00014     License as published by the Free Software Foundation; either
    00015     version 2.1 of the License, or (at your option) any later version.
    00016
    00017     This library is distributed in the hope that it will be useful,
    00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00020     Lesser General Public License for more details.
    00021
    00022     You should have received a copy of the GNU Lesser General Public
    00023     License along with this library; if not, write to the Free Software
    00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00025 *************************************************************************/
    00026 #ifndef _CEGUIImagesetManager_h_
    00027 #define _CEGUIImagesetManager_h_
    00028
    00029 #include "CEGUIBase.h"
    00030 #include "CEGUIString.h"
    00031 #include "CEGUISingleton.h"
    00032 #include "CEGUIIteratorBase.h"
    00033 #include <map>
    00034
    00035
    00036 #if defined(_MSC_VER)
    00037 #       pragma warning(push)
    00038 #       pragma warning(disable : 4275)
    00039 #       pragma warning(disable : 4251)
    00040 #endif
    00041
    00042
    00043 // Start of CEGUI namespace section
    00044 namespace CEGUI
    00045 {
    00054 class CEGUIEXPORT ImagesetManager : public Singleton<ImagesetManager>
    00055 {
    00056 public:
    00061         ImagesetManager(void);
    00062
    00063
    00068         ~ImagesetManager(void);
    00069
    00070
    00078         static  ImagesetManager&        getSingleton(void);
    00079
    00080
    00088         static  ImagesetManager*        getSingletonPtr(void);
    00089
    00090
    00108         Imageset*       createImageset(const String& name, Texture* texture);
    00109
    00127         Imageset*       createImageset(const String& filename, const String& resourceGroup = "");
    00128
    00129
    00150     Imageset* createImagesetFromImageFile(const String& name, const String& filename, const String& resourceGroup = "");
    00151
    00152
    00163         void    destroyImageset(const String& name);
    00164
    00175         void    destroyImageset(Imageset* imageset);
    00176
    00177
    00185         void    destroyAllImagesets(void);
    00186
    00187
    00200         Imageset*       getImageset(const String& name) const;
    00201
    00202
    00213         bool    isImagesetPresent(const String& name) const                     {return d_imagesets.find(name) != d_imagesets.end();}
    00214
    00215
    00226         void    notifyScreenResolution(const Size& size);
    00227
    00228
    00242     void writeImagesetToStream(const String& imageset, OutStream& out_stream) const;
    00243
    00244
    00245 private:
    00246         /*************************************************************************
    00247                 Implementation Data
    00248         *************************************************************************/
    00249         typedef std::map<String, Imageset*>             ImagesetRegistry;
    00250         ImagesetRegistry        d_imagesets;
    00251
    00252 public:
    00253         /*************************************************************************
    00254                 Iterator stuff
    00255         *************************************************************************/
    00256         typedef ConstBaseIterator<ImagesetRegistry>     ImagesetIterator;
    00257
    00262         ImagesetIterator        getIterator(void) const;
    00263 };
    00264
    00265 } // End of  CEGUI namespace section
    00266
    00267 #if defined(_MSC_VER)
    00268 #       pragma warning(pop)
    00269 #endif
    00270
    00271 #endif  // end of guard _CEGUIImageSetManager_h_