PageRenderTime 20ms CodeModel.GetById 11ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llinventoryicon.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 102 lines | 62 code | 14 blank | 26 comment | 0 complexity | 996a2fcf4e4cb3351c5b4378a21edd9a MD5 | raw file
  1/** 
  2 * @file llinventoryfunctions.h
  3 * @brief Miscellaneous inventory-related functions and classes
  4 * class definition
  5 *
  6 * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  7 * Second Life Viewer Source Code
  8 * Copyright (C) 2010, Linden Research, Inc.
  9 * 
 10 * This library is free software; you can redistribute it and/or
 11 * modify it under the terms of the GNU Lesser General Public
 12 * License as published by the Free Software Foundation;
 13 * version 2.1 of the License only.
 14 * 
 15 * This library is distributed in the hope that it will be useful,
 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 18 * Lesser General Public License for more details.
 19 * 
 20 * You should have received a copy of the GNU Lesser General Public
 21 * License along with this library; if not, write to the Free Software
 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 23 * 
 24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 25 * $/LicenseInfo$
 26 */
 27
 28#ifndef LL_LLINVENTORYICON_H
 29#define LL_LLINVENTORYICON_H
 30
 31#include "llassettype.h"
 32#include "llinventorytype.h"
 33#include "lluiimage.h"
 34
 35class LLInventoryIcon
 36{
 37public:
 38	enum EIconName
 39	{
 40		ICONNAME_TEXTURE,
 41		ICONNAME_SOUND,
 42		ICONNAME_CALLINGCARD_ONLINE,
 43		ICONNAME_CALLINGCARD_OFFLINE,
 44		ICONNAME_LANDMARK,
 45		ICONNAME_LANDMARK_VISITED,
 46		ICONNAME_SCRIPT,
 47		ICONNAME_CLOTHING,
 48		ICONNAME_OBJECT,
 49		ICONNAME_OBJECT_MULTI,
 50		ICONNAME_NOTECARD,
 51		ICONNAME_BODYPART,
 52		ICONNAME_SNAPSHOT,
 53		
 54		ICONNAME_BODYPART_SHAPE,
 55		ICONNAME_BODYPART_SKIN,
 56		ICONNAME_BODYPART_HAIR,
 57		ICONNAME_BODYPART_EYES,
 58		ICONNAME_CLOTHING_SHIRT,
 59		ICONNAME_CLOTHING_PANTS,
 60		ICONNAME_CLOTHING_SHOES,
 61		ICONNAME_CLOTHING_SOCKS,
 62		ICONNAME_CLOTHING_JACKET,
 63		ICONNAME_CLOTHING_GLOVES,
 64		ICONNAME_CLOTHING_UNDERSHIRT,
 65		ICONNAME_CLOTHING_UNDERPANTS,
 66		ICONNAME_CLOTHING_SKIRT,
 67		ICONNAME_CLOTHING_ALPHA,
 68		ICONNAME_CLOTHING_TATTOO,
 69
 70		ICONNAME_ANIMATION,
 71		ICONNAME_GESTURE,
 72
 73		ICONNAME_CLOTHING_PHYSICS,
 74		
 75		ICONNAME_LINKITEM,
 76		ICONNAME_LINKFOLDER,
 77		ICONNAME_MESH,
 78
 79		ICONNAME_INVALID,
 80		ICONNAME_COUNT,
 81		ICONNAME_NONE = -1
 82	};
 83
 84	static const std::string& getIconName(LLAssetType::EType asset_type,
 85										  LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE,
 86										  U32 misc_flag = 0, // different meanings depending on item type
 87										  BOOL item_is_multi = FALSE);
 88	static const std::string& getIconName(EIconName idx);
 89
 90	static LLUIImagePtr getIcon(LLAssetType::EType asset_type,
 91								LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE,
 92								U32 misc_flag = 0, // different meanings depending on item type
 93								BOOL item_is_multi = FALSE);
 94	static LLUIImagePtr getIcon(EIconName idx);
 95
 96protected:
 97	static EIconName assignWearableIcon(U32 misc_flag);
 98};
 99#endif // LL_LLINVENTORYICON_H
100
101
102