![[]](/images/special/trans.gif)
LibN2L-4 Library Code ReferenceClassesCompounds Files Members Method Index Full Reference cGuiFill.hGo to the documentation of this file.00001 /************************************************************************ 00002 Nova-2 Library (libN2L, or simply n2l) Game development C++ Library 00003 Copyright (C) 2002 Aaron Cameron 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 A copy of the GNU Lesser General Public License has been provided with 00020 this library in the file 'COPYING'. 00021 00022 Contact information for the author of this library has been provided 00023 with this library in the file 'AUTHOR'. 00024 ************************************************************************/ 00025 #ifndef _n2l4_cGuiFill_H 00026 #define _n2l4_cGuiFill_H 00027 00028 #include "n2l/n2l.h" 00029 00030 #include "gui/types.h" 00031 00032 namespace n2l 00033 { 00034 class cDynVar; 00035 class cVfsNodeInterface; 00036 class cGLTexture; 00037 00043 class cGuiFill 00044 { 00045 public: 00046 cGuiFill(); 00047 cGuiFill( const cGuiFill &iFill ); 00048 cGuiFill( const cVfsNodeInterface &iNode ); 00049 cGuiFill( const cDynVar &iDefinition ); 00050 ~cGuiFill(); 00051 00052 void load( const cVfsNodeInterface &iNode ); 00053 void load( const cDynVar &iDefinition ); 00054 00059 void texture( const cAutoPtr<const cGLTexture> &i_iTexture, 00060 const tGuiPos &iTexSize = tGuiPos(1.0f,1.0f) ); 00061 00062 void textureSize( const tGuiPos &iTexSize ); 00063 00064 const tGuiColour &colour() const { return mColour; } 00065 void colour( const tGuiColour &iColour ); 00066 void colour( const tGuiColour & iTLColour, 00067 const tGuiColour &iTRColour, const tGuiColour &iBRColour, 00068 const tGuiColour &iBLColour ); 00069 00070 void colourInherit( const tBool iValue ); 00071 void hRepeat( const tBool iRepeat ); 00072 void vRepeat( const tBool iRepeat ); 00073 00074 void hInvert( const tBool iInvert ); 00075 void vInvert( const tBool iInvert ); 00076 00080 void padding( const tGuiPos &iTLPad, const tGuiPos &iBRPad ); 00081 00082 void draw( const tGuiPos &iPos, const tGuiPos &iSize ) const; 00083 00084 cGuiFill & operator =( const cGuiFill & iFill ); 00085 00086 void prop( const tString &iName, const cDynVar &iVal ); 00087 const cDynVar prop( const tString &iName ) const; 00088 00089 private: 00090 typedef enum { 00091 Blending_Inherit, 00092 Blending_Enable, 00093 Blending_Disable 00094 } tBlending; 00095 00096 tBool mHRepeat; 00097 tBool mVRepeat; 00098 tBool mHInvert; 00099 tBool mVInvert; 00100 00101 tBool mColourInherit; 00102 tBlending mBlending; 00103 00104 tGuiColour mColour; 00105 tGuiColour *mCornerColours; 00106 cAutoPtr<const cGLTexture> mTexture; 00107 tGuiPos mTexSize; 00108 00109 tGuiPos mTLPad; 00110 tGuiPos mBRPad; 00111 00112 void testBlending(); 00113 00114 00115 00116 }; // class 00117 00118 } // namespace n2l 00119 00120 #endif |