summaryrefslogtreecommitdiff
path: root/indra/llui/lluiimage.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lluiimage.h')
-rw-r--r--indra/llui/lluiimage.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llui/lluiimage.h b/indra/llui/lluiimage.h
index 9d734bcfdf..4ea0738026 100644
--- a/indra/llui/lluiimage.h
+++ b/indra/llui/lluiimage.h
@@ -39,6 +39,7 @@
#include "llrefcount.h"
#include "llrect.h"
#include <boost/function.hpp>
+#include <boost/signals2.hpp>
#include "llinitparam.h"
#include "lltexture.h"
@@ -47,6 +48,8 @@ extern const LLColor4 UI_VERTEX_COLOR;
class LLUIImage : public LLRefCount
{
public:
+ typedef boost::signals2::signal<void (void)> image_loaded_signal_t;
+
LLUIImage(const std::string& name, LLPointer<LLTexture> image);
virtual ~LLUIImage();
@@ -77,7 +80,13 @@ public:
S32 getTextureWidth() const;
S32 getTextureHeight() const;
+ boost::signals2::connection addLoadedCallback( const image_loaded_signal_t::slot_type& cb );
+
+ void onImageLoaded();
+
protected:
+ image_loaded_signal_t* mImageLoaded;
+
std::string mName;
LLRectf mScaleRegion;
LLRectf mClipRegion;
@@ -100,9 +109,11 @@ namespace LLInitParam
TypedParam(BlockDescriptor& descriptor, const char* name, super_t::value_assignment_t value, ParamDescriptor::validation_func_t func, S32 min_count, S32 max_count)
: super_t(descriptor, name, value, func, min_count, max_count)
{
+ setBlockFromValue();
}
- LLUIImage* getValueFromBlock() const;
+ void setValueFromBlock() const;
+ void setBlockFromValue();
};
// Need custom comparison function for our test app, which only loads