aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterassetbrowser.h
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-09-06 23:08:02 -0700
committerMcCabe Maxsted2009-09-06 23:08:02 -0700
commit4bbb219eb78fc5d77c86fb7b13f123b52fbef3bc (patch)
tree88da6f4312c01dc07938166f58b913425a76583a /linden/indra/newview/llfloaterassetbrowser.h
parentAdded Emerald viewer's animation list (diff)
downloadmeta-impy-4bbb219eb78fc5d77c86fb7b13f123b52fbef3bc.zip
meta-impy-4bbb219eb78fc5d77c86fb7b13f123b52fbef3bc.tar.gz
meta-impy-4bbb219eb78fc5d77c86fb7b13f123b52fbef3bc.tar.bz2
meta-impy-4bbb219eb78fc5d77c86fb7b13f123b52fbef3bc.tar.xz
Added Emerald viewer's asset browser
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterassetbrowser.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloaterassetbrowser.h b/linden/indra/newview/llfloaterassetbrowser.h
new file mode 100644
index 0000000..76eb3ba
--- /dev/null
+++ b/linden/indra/newview/llfloaterassetbrowser.h
@@ -0,0 +1,84 @@
1/**
2 * @file llfloaterassetbrowser.h
3 * @brief LLFloaterAssetBrowser class implementation
4 * Phox wuz hurr
5 */
6
7#ifndef LL_LLFLOATERASSETBROWSERVIEW_H
8#define LL_LLFLOATERASSETBROWSERVIEW_H
9
10#include "llfloater.h"
11#include "llinventorymodel.h"
12#include "llview.h"
13#include "llviewerimage.h"
14
15class LLInventoryPanel;
16
17struct LLAssetSelection
18{
19 LLUUID mUUID;
20 LLUUID mAssetUUID;
21 std::string mName;
22 std::string mAssetInfo;
23 S32 mWidth;
24 S32 mHeight;
25 LLTextBox* mAssetInfoTextBox;
26 LLPointer<LLViewerImage> mTexturep;
27 LLRect mAssetRect;
28};
29
30class LLFloaterAssetBrowser : public LLFloater
31{
32public:
33 LLFloaterAssetBrowser();
34
35 virtual ~LLFloaterAssetBrowser();
36
37 static void show(void*);
38
39 virtual BOOL handleHover(S32 x, S32 y, MASK mask);
40 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
41 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
42 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
43 virtual void draw();
44
45 static LLFloaterAssetBrowser* getInstance(){ return sInstance; }
46
47private:
48 void initialize();
49 void createThumbnails();
50 void clearAssetInfoTexts();
51 void clearNoAssetsText();
52
53 static void onClickNext(void *userdata);
54 static void onClickPrevious(void *userdata);
55 static void onClickRefresh(void *userdata);
56
57 static LLFloaterAssetBrowser* sInstance;
58
59protected:
60 LLInventoryPanel* mInventoryPanel;
61 LLUUID mImageAssetID;
62 LLUUID mMouseOverUUID;
63 LLUUID mMouseOverAssetUUID;
64 LLPointer<LLViewerImage> mTexturep;
65 std::vector<LLAssetSelection> mTextureAssets;
66 std::vector<LLTextBox*> mAssetInfoLabelList;
67 U32 mLastIndex;
68 U32 mMaxIndex;
69 U32 mFirstIndex;
70 U32 mAssetInfoIndex;
71 S32 mFloaterHeight;
72 S32 mFloaterWidth;
73 S32 mMouseOverIndex;
74 LLTextBox* mNoAssetsLabel;
75 LLTextBox* mAssetInfoLabel;
76 std::string mFloaterTitle;
77};
78
79static const S32 HPAD = 4;
80static const S32 BORDER_PAD = HPAD;
81static const U32 ITEMS_PER_PAGE = 16;
82static const S32 START_POS = 250;
83
84#endif