diff options
Diffstat (limited to 'indra/llui/llmodaldialog.cpp')
-rw-r--r-- | indra/llui/llmodaldialog.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index eac43900f6..c5c31f7252 100644 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -38,18 +38,18 @@ // static std::list<LLModalDialog*> LLModalDialog::sModalStack; -LLModalDialog::LLModalDialog( const LLSD& key, BOOL modal ) +LLModalDialog::LLModalDialog( const LLSD& key, bool modal ) : LLFloater(key), mModal( modal ) { if (modal) { - setCanMinimize(FALSE); - setCanClose(FALSE); + setCanMinimize(false); + setCanClose(false); } - setVisible( FALSE ); - setBackgroundVisible(TRUE); - setBackgroundOpaque(TRUE); + setVisible( false ); + setBackgroundVisible(true); + setBackgroundOpaque(true); centerOnScreen(); // default position mCloseSignal.connect(boost::bind(&LLModalDialog::stopModal, this)); } @@ -72,7 +72,7 @@ LLModalDialog::~LLModalDialog() } // virtual -BOOL LLModalDialog::postBuild() +bool LLModalDialog::postBuild() { return LLFloater::postBuild(); } @@ -87,7 +87,7 @@ void LLModalDialog::openFloater(const LLSD& key) LLFloater::setFloaterHost(thost); } -void LLModalDialog::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLModalDialog::reshape(S32 width, S32 height, bool called_from_parent) { LLFloater::reshape(width, height, called_from_parent); centerOnScreen(); @@ -104,14 +104,14 @@ void LLModalDialog::onOpen(const LLSD& key) LLModalDialog* front = sModalStack.front(); if (front != this) { - front->setVisible(FALSE); + front->setVisible(false); } } // This is a modal dialog. It sucks up all mouse and keyboard operations. gFocusMgr.setMouseCapture( this ); LLUI::getInstance()->addPopup(this); - setFocus(TRUE); + setFocus(true); std::list<LLModalDialog*>::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this); if (iter != sModalStack.end()) @@ -144,12 +144,12 @@ void LLModalDialog::stopModal() if (!sModalStack.empty()) { LLModalDialog* front = sModalStack.front(); - front->setVisible(TRUE); + front->setVisible(true); } } -void LLModalDialog::setVisible( BOOL visible ) +void LLModalDialog::setVisible( bool visible ) { if (mModal) { @@ -160,7 +160,7 @@ void LLModalDialog::setVisible( BOOL visible ) // The dialog view is a root view LLUI::getInstance()->addPopup(this); - setFocus( TRUE ); + setFocus( true ); } else { @@ -171,7 +171,7 @@ void LLModalDialog::setVisible( BOOL visible ) LLFloater::setVisible( visible ); } -BOOL LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask) +bool LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask) { LLView* popup_menu = LLMenuGL::sMenuContainer->getVisibleMenu(); if (popup_menu != NULL) @@ -199,10 +199,10 @@ BOOL LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask) } - return TRUE; + return true; } -BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask) +bool LLModalDialog::handleHover(S32 x, S32 y, MASK mask) { if( childrenHandleHover(x, y, mask) == NULL ) { @@ -225,60 +225,60 @@ BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask) } } - return TRUE; + return true; } -BOOL LLModalDialog::handleMouseUp(S32 x, S32 y, MASK mask) +bool LLModalDialog::handleMouseUp(S32 x, S32 y, MASK mask) { childrenHandleMouseUp(x, y, mask); - return TRUE; + return true; } -BOOL LLModalDialog::handleScrollWheel(S32 x, S32 y, S32 clicks) +bool LLModalDialog::handleScrollWheel(S32 x, S32 y, S32 clicks) { childrenHandleScrollWheel(x, y, clicks); - return TRUE; + return true; } -BOOL LLModalDialog::handleDoubleClick(S32 x, S32 y, MASK mask) +bool LLModalDialog::handleDoubleClick(S32 x, S32 y, MASK mask) { if (!LLFloater::handleDoubleClick(x, y, mask)) { // Click outside the panel make_ui_sound("UISndInvalidOp"); } - return TRUE; + return true; } -BOOL LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask) +bool LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask) { LLMenuGL::sMenuContainer->hideMenus(); childrenHandleRightMouseDown(x, y, mask); - return TRUE; + return true; } -BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask ) +bool LLModalDialog::handleKeyHere(KEY key, MASK mask ) { LLFloater::handleKeyHere(key, mask ); if (mModal) { // Suck up all keystokes except CTRL-Q. - BOOL is_quit = ('Q' == key) && (MASK_CONTROL == mask); + bool is_quit = ('Q' == key) && (MASK_CONTROL == mask); return !is_quit; } else { // don't process escape key until message box has been on screen a minimal amount of time // to avoid accidentally destroying the message box when user is hitting escape at the time it appears - BOOL enough_time_elapsed = mVisibleTime.getElapsedTimeF32() > 1.0f; + bool enough_time_elapsed = mVisibleTime.getElapsedTimeF32() > 1.0f; if (enough_time_elapsed && key == KEY_ESCAPE) { closeFloater(); - return TRUE; + return true; } - return FALSE; + return false; } } @@ -313,7 +313,7 @@ void LLModalDialog::onAppFocusLost() gFocusMgr.setMouseCapture( NULL ); } - instance->setFocus(FALSE); + instance->setFocus(false); } } @@ -326,7 +326,7 @@ void LLModalDialog::onAppFocusGained() // This is a modal dialog. It sucks up all mouse and keyboard operations. gFocusMgr.setMouseCapture( instance ); - instance->setFocus(TRUE); + instance->setFocus(true); LLUI::getInstance()->addPopup(instance); instance->centerOnScreen(); |