/indra/newview/llprogressview.h
C Header | 101 lines | 49 code | 20 blank | 32 comment | 0 complexity | c434636df73122f0aa0e037cb3abbe2b MD5 | raw file
Possible License(s): LGPL-2.1
1/** 2 * @file llprogressview.h 3 * @brief LLProgressView class definition 4 * 5 * $LicenseInfo:firstyear=2002&license=viewerlgpl$ 6 * Second Life Viewer Source Code 7 * Copyright (C) 2010, Linden Research, Inc. 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License as published by the Free Software Foundation; 12 * version 2.1 of the License only. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 * 23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA 24 * $/LicenseInfo$ 25 */ 26 27#ifndef LL_LLPROGRESSVIEW_H 28#define LL_LLPROGRESSVIEW_H 29 30#include "llpanel.h" 31#include "llmediactrl.h" 32#include "llframetimer.h" 33#include "llevents.h" 34 35class LLImageRaw; 36class LLButton; 37class LLProgressBar; 38 39class LLProgressView : 40 public LLPanel, 41 public LLViewerMediaObserver 42 43{ 44public: 45 LLProgressView(); 46 virtual ~LLProgressView(); 47 48 BOOL postBuild(); 49 50 /*virtual*/ void draw(); 51 void drawStartTexture(F32 alpha); 52 53 /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); 54 /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); 55 /*virtual*/ void setVisible(BOOL visible); 56 57 // inherited from LLViewerMediaObserver 58 /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); 59 60 void setText(const std::string& text); 61 void setPercent(const F32 percent); 62 63 // Set it to NULL when you want to eliminate the message. 64 void setMessage(const std::string& msg); 65 66 // turns on (under certain circumstances) the into video after login 67 void revealIntroPanel(); 68 69 void setStartupComplete(); 70 71 void setCancelButtonVisible(BOOL b, const std::string& label); 72 73 static void onCancelButtonClicked( void* ); 74 static void onClickMessage(void*); 75 bool onAlertModal(const LLSD& sd); 76 77 // note - this is not just hiding the intro panel - it also hides the parent panel 78 // and is used when the intro is finished and we want to show the world 79 void removeIntroPanel(); 80 81protected: 82 LLProgressBar* mProgressBar; 83 LLMediaCtrl* mMediaCtrl; 84 F32 mPercentDone; 85 std::string mMessage; 86 LLButton* mCancelBtn; 87 LLFrameTimer mFadeToWorldTimer; 88 LLFrameTimer mFadeFromLoginTimer; 89 LLRect mOutlineRect; 90 bool mMouseDownInActiveArea; 91 bool mStartupComplete; 92 93 // The LLEventStream mUpdateEvents depends upon this class being a singleton 94 // to avoid pump name conflicts. 95 static LLProgressView* sInstance; 96 LLEventStream mUpdateEvents; 97 98 bool handleUpdate(const LLSD& event_data); 99}; 100 101#endif // LL_LLPROGRESSVIEW_H