Back to index

unity  6.0.0
unity-mt-texture.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2011 Canonical Ltd
00003  *
00004  * This program is free software: you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License version 3 as
00006  * published by the Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  * GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00015  *
00016  * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
00017  */
00018 
00019 #ifndef _UNITY_MT_GRAB_HANDLES_TEXTURE_H
00020 #define _UNITY_MT_GRAB_HANDLES_TEXTURE_H
00021 
00022 #include <Nux/Nux.h>
00023 #include <boost/noncopyable.hpp>
00024 #include <boost/shared_ptr.hpp>
00025 
00026 namespace unity
00027 {
00028 namespace MT
00029 {
00030 class Texture
00031 {
00032   public:
00033 
00034     typedef boost::shared_ptr <Texture> Ptr;
00035 
00036     virtual ~Texture ();
00037 
00038     class Factory :
00039       boost::noncopyable
00040     {
00041     public:
00042 
00043       virtual ~Factory ();
00044 
00045       virtual unity::MT::Texture::Ptr
00046       create () = 0;
00047 
00048       static void
00049       SetDefault (Factory *);
00050 
00051       static boost::shared_ptr <Factory>
00052       Default ();
00053 
00054     protected:
00055 
00056       Factory ();
00057 
00058     private:
00059 
00060       static boost::shared_ptr <unity::MT::Texture::Factory> mDefault;
00061     };
00062 
00063   protected:
00064 
00065     Texture ();
00066 };
00067 
00068 
00069 typedef std::pair <Texture::Ptr, nux::Geometry> TextureSize;
00070 typedef std::pair <Texture::Ptr, nux::Geometry> TextureLayout;
00071 
00072 };
00073 };
00074 
00075 #endif