Fix css style order when using external css files
[ryzomcore.git] / ryzom / client / src / interfaces_manager / bitmap_base.h
blob627c05e832f59796e0ca45b84624834aa371f175
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef NL_BITMAP_BASE_H
20 #define NL_BITMAP_BASE_H
23 /////////////
24 // Include //
25 /////////////
26 // Misc.
27 #include "nel/misc/types_nl.h"
28 #include "nel/misc/rgba.h"
29 // 3D Interface.
30 #include "nel/3d/u_driver.h"
32 ///////////
33 // Using //
34 ///////////
35 using NLMISC::CRGBA;
38 /**
39 * <Class description>
40 * \author Guillaume PUZIN
41 * \author Nevrax France
42 * \date 2001
44 class CBitmapBase
46 protected:
47 uint _TextureId;
48 NL3D::UTextureFile * _Texture;
49 CRGBA _RGBA;
51 public:
52 /// Constructor
53 CBitmapBase();
54 CBitmapBase(uint texture, const CRGBA &rgba);
56 /// Set the texture.
57 void texture(uint texture);
59 /// get the texture.
60 uint textureId() const;
62 /// Set the rgba.
63 void rgba(const CRGBA &rgba);
65 /// get the rgba.
66 const CRGBA &rgba() const;
68 /// set the mode of the bitmap, either tiled (true) or stretched (false)
69 inline void tiled(bool tiled = true) { _Tiled = tiled; }
71 private:
72 inline void init(uint texture, const CRGBA &rgba);
74 // variables used to store internal datas
75 protected:
76 /// bool indicating if the bitmap is to be displayed tiled or stretched (default = false = stretched)
77 bool _Tiled;
79 mutable std::string _TexturePath;
80 mutable uint32 _TextureWidth;
81 mutable uint32 _TextureHeight;
85 #endif // NL_BITMAP_BASE_H
87 /* End of bitmap_base.h */