/indra/newview/llprogressview.h

https://bitbucket.org/lindenlab/viewer-beta/ · C Header · 101 lines · 49 code · 20 blank · 32 comment · 0 complexity · c434636df73122f0aa0e037cb3abbe2b MD5 · raw file

  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. #ifndef LL_LLPROGRESSVIEW_H
  27. #define LL_LLPROGRESSVIEW_H
  28. #include "llpanel.h"
  29. #include "llmediactrl.h"
  30. #include "llframetimer.h"
  31. #include "llevents.h"
  32. class LLImageRaw;
  33. class LLButton;
  34. class LLProgressBar;
  35. class LLProgressView :
  36. public LLPanel,
  37. public LLViewerMediaObserver
  38. {
  39. public:
  40. LLProgressView();
  41. virtual ~LLProgressView();
  42. BOOL postBuild();
  43. /*virtual*/ void draw();
  44. void drawStartTexture(F32 alpha);
  45. /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
  46. /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
  47. /*virtual*/ void setVisible(BOOL visible);
  48. // inherited from LLViewerMediaObserver
  49. /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
  50. void setText(const std::string& text);
  51. void setPercent(const F32 percent);
  52. // Set it to NULL when you want to eliminate the message.
  53. void setMessage(const std::string& msg);
  54. // turns on (under certain circumstances) the into video after login
  55. void revealIntroPanel();
  56. void setStartupComplete();
  57. void setCancelButtonVisible(BOOL b, const std::string& label);
  58. static void onCancelButtonClicked( void* );
  59. static void onClickMessage(void*);
  60. bool onAlertModal(const LLSD& sd);
  61. // note - this is not just hiding the intro panel - it also hides the parent panel
  62. // and is used when the intro is finished and we want to show the world
  63. void removeIntroPanel();
  64. protected:
  65. LLProgressBar* mProgressBar;
  66. LLMediaCtrl* mMediaCtrl;
  67. F32 mPercentDone;
  68. std::string mMessage;
  69. LLButton* mCancelBtn;
  70. LLFrameTimer mFadeToWorldTimer;
  71. LLFrameTimer mFadeFromLoginTimer;
  72. LLRect mOutlineRect;
  73. bool mMouseDownInActiveArea;
  74. bool mStartupComplete;
  75. // The LLEventStream mUpdateEvents depends upon this class being a singleton
  76. // to avoid pump name conflicts.
  77. static LLProgressView* sInstance;
  78. LLEventStream mUpdateEvents;
  79. bool handleUpdate(const LLSD& event_data);
  80. };
  81. #endif // LL_LLPROGRESSVIEW_H