00001
00032 #ifndef LL_LLMODALDIALOG_H
00033 #define LL_LLMODALDIALOG_H
00034
00035 #include "llfloater.h"
00036 #include "llframetimer.h"
00037
00038 class LLModalDialog;
00039
00040
00041
00042
00043
00044 class LLModalDialog : public LLFloater
00045 {
00046 public:
00047 LLModalDialog( const LLString& title, S32 width, S32 height, BOOL modal = true );
00048 ~LLModalDialog();
00049
00050 void open();
00051
00052 void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
00053
00054 void startModal();
00055 void stopModal();
00056
00057 BOOL handleMouseDown(S32 x, S32 y, MASK mask);
00058 BOOL handleMouseUp(S32 x, S32 y, MASK mask);
00059 BOOL handleHover(S32 x, S32 y, MASK mask);
00060 BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
00061 BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
00062 BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
00063 BOOL handleKeyHere(KEY key, MASK mask );
00064
00065 void onClose(bool app_quitting);
00066
00067 void setVisible(BOOL visible);
00068 void draw();
00069
00070 BOOL isModal() const { return mModal; }
00071
00072 static void onAppFocusLost();
00073 static void onAppFocusGained();
00074
00075 static S32 activeCount() { return sModalStack.size(); }
00076
00077 protected:
00078 void centerOnScreen();
00079
00080 private:
00081 LLFrameTimer mVisibleTime;
00082 const BOOL mModal;
00083
00084 static std::list<LLModalDialog*> sModalStack;
00085 };
00086
00087 #endif // LL_LLMODALDIALOG_H