|
From: | Sebastien Metrot <address@hidden> |
Subject: | [ngl-commits] cleaned up font, theme, reference counter, image/texture. [...] |
Date: | Sun, 09 Nov 2003 08:27:49 -0500 |
Commit from meeloo | 2003-11-09 08:27 EST |
cleaned up font, theme, reference counter, image/texture. fixed moused management pbms in nuiWindow
Module | File name | Revision | |||
---|---|---|---|---|---|
nui | ChangeLog | 1.155 | >>> | 1.156 | |
nui | include/nuiFont.h | 1.1 | >>> | 1.2 | |
nui | include/nuiRefCount.h | 1.4 | >>> | 1.5 | |
nui | include/nuiTexture.h | 1.10 | >>> | 1.11 | |
nui | src/core/nuiDrawContext.cpp | 1.57 | >>> | 1.58 | |
nui | src/core/nuiFont.cpp | 1.1 | >>> | 1.2 | |
nui | src/core/nuiImage.cpp | 1.30 | >>> | 1.31 | |
nui | src/core/nuiTexture.cpp | 1.11 | >>> | 1.12 | |
nui | src/core/nuiTheme.cpp | 1.60 | >>> | 1.61 | |
nui | src/core/nuiTopLevel.cpp | 1.5 | >>> | 1.6 | |
nui | src/widgets/nuiFileList.cpp | 1.18 | >>> | 1.19 | |
nui | src/widgets/nuiStateDummy.cpp | 1.5 | >>> | 1.6 |
nui/ChangeLog 1.155 >>> 1.156 |
---|
Line 1 |
+ 2003/11/9 14:27 meeloo + - updated nuiRefCount to be able to create permanent objects for fonts and textures. + - cleaned up font support + - cleaned up theme support for fonts + |
2003/11/9 05:34 meeloo - Changed the text rendering API to a simpler and better one. - fixed nuiWindow move. |
nui/include/nuiFont.h 1.1 >>> 1.2 |
---|
Line 38 |
static nuiFont* GetFont (nuiXMLNode* pNode); ///< Create a font from an xml description. static nglString GetUniqueID(const nglString& rFace, nuiSize size); ///< Get a text unique id for this font definition. |
- - void Release(); - |
protected: //nuiFont (nglIStream* pInput); ///< Create a font from an input stream. nuiFont (const nglPath& rPath, nuiSize size); ///< Create a font from a path. |
Line 51 |
virtual bool Apply(nuiDrawContext* pContext); ///< Set this Font as the current opengl Font. static std::map<nglString,nuiFont*> mpFonts; |
+ + bool mPermanent; |
}; #endif // __nuiFont_h__ |
nui/include/nuiRefCount.h 1.4 >>> 1.5 |
---|
Line 25 |
class nuiRefCount { public: |
- nuiRefCount() : mCount(0) |
+ nuiRefCount() : mCount(0), mPermanent(false) |
{ } |
Line 34 |
NGL_ASSERT(mCount == 0); } |
- uint AddRef() |
+ uint Acquire() |
{ return ++mCount; } |
- uint FreeRef() |
+ uint Release() |
{ NGL_ASSERTR(mCount > 0, mCount); mCount--; |
Line 55 |
{ return mCount; } |
+ + void SetPermanent(bool Permanent = true) + { + if (Permanent) + { + if (mPermanent) + return; + Acquire(); + mPermanent = true; + } + else + { + if (!mPermanent) + return; + mPermanent = false; + Release(); + } + } + + bool IsPermanent() + { + return mPermanent; + } + |
private: uint mCount; |
+ bool mPermanent; |
}; #endif // __nuiRefCount_h__ |
nui/include/nuiTexture.h 1.10 >>> 1.11 |
---|
Line 41 |
static nuiTexture* GetTexture (nglImage* pImage, bool OwnImage); ///< Create an image from an existing nglImage. If \param OwnImage the nglImage object will be deleted with the nuiTexture. static nuiTexture* GetTexture (nuiXMLNode* pNode); ///< Create an image from an xml description. |
- void Release(); - |
virtual nuiXMLNode* Serialize(nuiXMLNode* pParentNode, bool Recursive); virtual void ForceReload(); ///< This method deletes the texture assiciated with the nuiTexture thus forcing its recreation at the next rendertime. |
[Prev in Thread] | Current Thread | [Next in Thread] |