llpreviewtexture.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLPREVIEWTEXTURE_H
00033 #define LL_LLPREVIEWTEXTURE_H
00034 
00035 #include "llpreview.h"
00036 #include "llbutton.h"
00037 #include "llframetimer.h"
00038 #include "llviewerimage.h"
00039 
00040 class LLImageRaw;
00041 
00042 class LLPreviewTexture : public LLPreview
00043 {
00044 public:
00045         LLPreviewTexture(
00046                 const std::string& name,
00047                 const LLRect& rect,
00048                 const std::string& title,
00049                 const LLUUID& item_uuid,
00050                 const LLUUID& object_id,
00051                 BOOL show_keep_discard = FALSE);
00052         LLPreviewTexture(
00053                 const std::string& name,
00054                 const LLRect& rect,
00055                 const std::string& title,
00056                 const LLUUID& asset_id,
00057                 BOOL copy_to_inv = FALSE);
00058         ~LLPreviewTexture();
00059 
00060         virtual void            draw();
00061 
00062         virtual BOOL            canSaveAs();
00063         virtual void            saveAs();
00064 
00065         virtual void            loadAsset();
00066         virtual EAssetStatus    getAssetStatus();
00067 
00068         static void                     saveToFile(void* userdata);
00069         static void                     onFileLoadedForSave( 
00070                                                         BOOL success,
00071                                                         LLViewerImage *src_vi,
00072                                                         LLImageRaw* src, 
00073                                                         LLImageRaw* aux_src,
00074                                                         S32 discard_level, 
00075                                                         BOOL final,
00076                                                         void* userdata );
00077 
00078 
00079 protected:
00080         void                            init();
00081         void                            updateAspectRatio();
00082 
00083 protected:
00084         LLUUID                                          mImageID;
00085         LLPointer<LLViewerImage>                mImage;
00086         BOOL                            mLoadingFullImage;
00087         LLString                        mSaveFileName;
00088         LLFrameTimer            mSavedFileTimer;
00089         BOOL                mShowKeepDiscard;
00090         BOOL                mCopyToInv;
00091 
00092         // This is stored off in a member variable, because the save-as
00093         // button and drag and drop functionality need to know.
00094         BOOL mIsCopyable;
00095 
00096         S32 mLastHeight;
00097         S32 mLastWidth;
00098 };
00099 
00100 
00101 #endif  // LL_LLPREVIEWTEXTURE_H

Generated on Thu Jul 1 06:09:02 2010 for Second Life Viewer by  doxygen 1.4.7