00001 00032 #ifndef LL_LLOVERLAYBAR_H 00033 #define LL_LLOVERLAYBAR_H 00034 00035 #include "llpanel.h" 00036 00037 // "Constants" loaded from settings.xml at start time 00038 extern S32 STATUS_BAR_HEIGHT; 00039 00040 class LLButton; 00041 class LLLineEditor; 00042 class LLMediaRemoteCtrl; 00043 class LLMessageSystem; 00044 class LLTextBox; 00045 class LLTextEditor; 00046 class LLUICtrl; 00047 class LLUUID; 00048 class LLFrameTimer; 00049 class LLStatGraph; 00050 class LLSlider; 00051 class LLVoiceRemoteCtrl; 00052 00053 class LLOverlayBar 00054 : public LLPanel 00055 { 00056 public: 00057 LLOverlayBar(const std::string& name, const LLRect& rect ); 00058 ~LLOverlayBar(); 00059 00060 virtual EWidgetType getWidgetType() const; 00061 virtual LLString getWidgetTag() const; 00062 00063 /*virtual*/ void refresh(); 00064 /*virtual*/ void draw(); 00065 /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); 00066 00067 void layoutButtons(); 00068 00069 // helpers for returning desired state 00070 BOOL mediaPlaying() { return mMediaState == PLAYING; } 00071 BOOL musicPlaying() { return mMusicState == PLAYING; } 00072 00073 static void onClickIMReceived(void* data); 00074 static void onClickSetNotBusy(void* data); 00075 static void onClickReleaseKeys(void* data); 00076 static void onClickMouselook(void* data); 00077 static void onClickStandUp(void* data); 00078 static void onClickResetView(void* data); 00079 00080 //static media helper functions 00081 static void mediaPlay(void*); 00082 static void mediaPause(void*); 00083 static void mediaStop(void*); 00084 00085 static void musicPlay(void*); 00086 static void musicPause(void*); 00087 static void musicStop(void*); 00088 00089 static void toggleAudioVolumeFloater(void*); 00090 00091 static void enableMediaButtons(LLPanel* panel); 00092 static void enableMusicButtons(LLPanel* panel); 00093 00094 protected: 00095 static void* createMasterRemote(void* userdata); 00096 static void* createMusicRemote(void* userdata); 00097 static void* createMediaRemote(void* userdata); 00098 static void* createVoiceRemote(void* userdata); 00099 00100 protected: 00101 LLMediaRemoteCtrl* mMasterRemote; 00102 LLMediaRemoteCtrl* mMusicRemote; 00103 LLMediaRemoteCtrl* mMediaRemote; 00104 LLVoiceRemoteCtrl* mVoiceRemote; 00105 bool mBuilt; // dialog constructed yet? 00106 enum { STOPPED=0, PLAYING=1, PAUSED=2 }; 00107 BOOL mMediaState; 00108 BOOL mMusicState; 00109 }; 00110 00111 extern LLOverlayBar* gOverlayBar; 00112 00113 #endif