llmodaldialog.h

Go to the documentation of this file.
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 // By default, a ModalDialog is modal, i.e. no other window can have focus
00041 // However, for the sake of code reuse and simplicity, if mModal == false,
00042 // the dialog behaves like a normal floater
00043 
00044 class LLModalDialog : public LLFloater
00045 {
00046 public:
00047         LLModalDialog( const LLString& title, S32 width, S32 height, BOOL modal = true );
00048         /*virtual*/ ~LLModalDialog();
00049 
00050         /*virtual*/ void        reshape(S32 width, S32 height, BOOL called_from_parent = 1);
00051         
00052         /*virtual*/ void        startModal();
00053         /*virtual*/ void        stopModal();
00054 
00055         /*virtual*/ BOOL        handleMouseDown(S32 x, S32 y, MASK mask);
00056         /*virtual*/ BOOL        handleMouseUp(S32 x, S32 y, MASK mask);
00057         /*virtual*/ BOOL        handleHover(S32 x, S32 y, MASK mask);
00058         /*virtual*/ BOOL        handleScrollWheel(S32 x, S32 y, S32 clicks);
00059         /*virtual*/ BOOL        handleDoubleClick(S32 x, S32 y, MASK mask);
00060         /*virtual*/ BOOL        handleRightMouseDown(S32 x, S32 y, MASK mask);
00061         /*virtual*/ BOOL        handleKeyHere(KEY key, MASK mask, BOOL called_from_parent );
00062 
00063         /*virtual*/ void        onClose(bool app_quitting);
00064 
00065         /*virtual*/ void        setVisible(BOOL visible);
00066         /*virtual*/ void        draw();
00067 
00068         static void             onAppFocusLost();
00069         static void             onAppFocusGained();
00070 
00071         static S32              activeCount() { return sModalStack.size(); }
00072         
00073 protected:
00074         void                    centerOnScreen();
00075 
00076 protected:
00077         LLFrameTimer    mVisibleTime;
00078         BOOL                    mModal; // do not change this after creation!
00079 
00080         static std::list<LLModalDialog*> sModalStack;  // Top of stack is currently being displayed
00081 };
00082 
00083 #endif  // LL_LLMODALDIALOG_H

Generated on Thu Jul 1 06:08:54 2010 for Second Life Viewer by  doxygen 1.4.7