PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: SPTexturePreview.h * 00003 * 00004 * Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLRENDERER_TEXTURE_SURFACEPAINTER_H__ 00024 #define __PLRENDERER_TEXTURE_SURFACEPAINTER_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLRenderer/SPPreview.h" 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Namespace ] 00036 //[-------------------------------------------------------] 00037 namespace PLRenderer { 00038 00039 00040 //[-------------------------------------------------------] 00041 //[ Classes ] 00042 //[-------------------------------------------------------] 00043 /** 00044 * @brief 00045 * Texture preview surface painter class 00046 */ 00047 class SPTexturePreview : public SPPreview { 00048 00049 00050 //[-------------------------------------------------------] 00051 //[ RTTI interface ] 00052 //[-------------------------------------------------------] 00053 pl_class(PLRENDERER_RTTI_EXPORT, SPTexturePreview, "PLRenderer", PLRenderer::SPPreview, "Texture preview surface painter class") 00054 // Constructors 00055 pl_constructor_1(ParameterConstructor, Renderer&, "Parameter constructor", "") 00056 pl_class_end 00057 00058 00059 //[-------------------------------------------------------] 00060 //[ Public functions ] 00061 //[-------------------------------------------------------] 00062 public: 00063 /** 00064 * @brief 00065 * Constructor 00066 * 00067 * @param[in] cRenderer 00068 * Renderer to use 00069 */ 00070 PLRENDERER_API SPTexturePreview(Renderer &cRenderer); 00071 00072 /** 00073 * @brief 00074 * Destructor 00075 */ 00076 PLRENDERER_API virtual ~SPTexturePreview(); 00077 00078 /** 00079 * @brief 00080 * Returns the name of the used texture 00081 * 00082 * @return 00083 * Name of the used texture 00084 */ 00085 inline PLCore::String GetTexture() const; 00086 00087 /** 00088 * @brief 00089 * Sets the name of the used texture 00090 * 00091 * @param[in] sName 00092 * Name of the used texture 00093 */ 00094 inline void SetTexture(const PLCore::String &sName = ""); 00095 00096 00097 //[-------------------------------------------------------] 00098 //[ Private data ] 00099 //[-------------------------------------------------------] 00100 private: 00101 PLCore::String m_sTexture; /**< Name of the used texture */ 00102 00103 00104 //[-------------------------------------------------------] 00105 //[ Private virtual SurfacePainter functions ] 00106 //[-------------------------------------------------------] 00107 private: 00108 virtual void OnPaint(Surface &cSurface) override; 00109 00110 00111 }; 00112 00113 00114 //[-------------------------------------------------------] 00115 //[ Namespace ] 00116 //[-------------------------------------------------------] 00117 } // PLRenderer 00118 00119 00120 //[-------------------------------------------------------] 00121 //[ Implementation ] 00122 //[-------------------------------------------------------] 00123 #include "PLRenderer/Texture/SPTexturePreview.inl" 00124 00125 00126 #endif // __PLRENDERER_TEXTURE_SURFACEPAINTER_H__
|