Crazy Eddie's GUI System 0.8.7
|
A tiny wrapper to hide some of the dirty work of rect caching. More...
#include <Element.h>
Public Types | |
typedef Rectf(Element::*) | DataGenerator(bool) const |
Function to generate fresh data that might later be cached. | |
Public Member Functions | |
CachedRectf (Element const *element, DataGenerator generator) | |
const Rectf & | get () const |
Retrieves cached Rectf or generated a fresh one and caches it. | |
Rectf | getFresh (bool skipAllPixelAlignment=false) const |
Skips all caching and calls the generator. | |
void | invalidateCache () const |
Invalidates the cached Rectf causing it to be regenerated. | |
bool | isCacheValid () const |
void | regenerateCache () const |
A tiny wrapper to hide some of the dirty work of rect caching.
This is used internally by CEGUI::Element and other classes, it is passed to the user in several methods. In those circumstances you most likely want the result of either the "get()" or "getFresh(..)" methods.
Rectf(Element::*) CEGUI::Element::CachedRectf::DataGenerator(bool) const |
Function to generate fresh data that might later be cached.
If the bool is true all PixelAlignment settings will be overridden and no pixel alignment will take place.
|
inline |
Skips all caching and calls the generator.
This method will cache the result if cache is invalid and alignment is not being skipped.
|
inline |
Invalidates the cached Rectf causing it to be regenerated.
The regeneration will not happen immediately, it will happen when user requests the data.