#include <llalertdialog.h>
Definition at line 46 of file llalertdialog.h.
typedef void(* LLAlertDialog::alert_callback_t)(S32 option, void *user_data) |
typedef void(* LLAlertDialog::alert_text_callback_t)(S32 option, const LLString &text, void *user_data) |
typedef bool(* LLAlertDialog::display_callback_t)(S32 modal) |
typedef std::map<LLString, LLPointer<LLAlertDialogTemplate> > LLAlertDialog::template_map_t |
Definition at line 113 of file llalertdialog.h.
anonymous enum |
Definition at line 52 of file llalertdialog.h.
LLAlertDialog::LLAlertDialog | ( | const LLAlertDialogTemplate * | xml_template, | |
const LLString::format_map_t & | args, | |||
alert_callback_t | callback = NULL , |
|||
void * | user_data = NULL | |||
) |
Definition at line 137 of file llalertdialog.cpp.
References createDialog(), IGNORE_USE_DEFAULT, LLAlertDialogTemplate::mDefaultOption, LLAlertDialogTemplate::mEditLineText, LLAlertDialogTemplate::mIgnorable, LLAlertDialogTemplate::mIgnoreLabel, LLAlertDialogTemplate::mMessage, LLAlertDialogTemplate::mOptions, LLAlertDialogTemplate::mTitle, LLAlertDialogTemplate::mURL, mURL, LLAlertDialogTemplate::mURLOption, mURLOption, setCheckBox(), LLFloater::setTitle(), sStringAlwaysChoose, and sStringSkipNextTime.
Referenced by createXml(), and showCritical().
LLAlertDialog::~LLAlertDialog | ( | ) | [private, virtual] |
Definition at line 453 of file llalertdialog.cpp.
References mButtonData, mLabel, mUnique, and sUniqueActiveMap.
static void LLAlertDialog::setURLLoader | ( | URLLoader * | loader | ) | [inline, static] |
Definition at line 61 of file llalertdialog.h.
References sURLLoader.
Referenced by LLWeb::initClass().
Reimplemented from LLModalDialog.
Definition at line 516 of file llalertdialog.cpp.
References FALSE, LLUICtrl::focusNextItem(), LLUICtrl::focusPrevItem(), LLModalDialog::handleKeyHere(), KEY_LEFT, KEY_RETURN, KEY_RIGHT, KEY_TAB, MASK_NONE, MASK_SHIFT, and TRUE.
void LLAlertDialog::draw | ( | void | ) | [virtual] |
Reimplemented from LLModalDialog.
Definition at line 550 of file llalertdialog.cpp.
References LLModalDialog::draw(), LLControlGroup::getColor(), LLView::getRect(), LLControlGroup::getS32(), LLFrameTimer::getStarted(), gl_drop_shadow(), LLFrameTimer::hasExpired(), mButtonData, mDefaultBtnTimer, mDefaultOption, S32, LLUI::sColorsGroup, LLUI::sConfigGroup, LLPanel::setDefaultBtn(), and LLFrameTimer::stop().
void LLAlertDialog::setVisible | ( | BOOL | visible | ) | [virtual] |
Reimplemented from LLModalDialog.
Definition at line 436 of file llalertdialog.cpp.
References LLModalDialog::centerOnScreen(), make_ui_sound(), and LLModalDialog::setVisible().
void LLAlertDialog::onClose | ( | bool | app_quitting | ) | [virtual] |
Reimplemented from LLModalDialog.
Definition at line 447 of file llalertdialog.cpp.
References handleCallbacks(), and LLModalDialog::onClose().
Definition at line 400 of file llalertdialog.cpp.
References LLView::addChild(), BTN_HEIGHT, FALSE, font_name, LLRectBase< Type >::getHeight(), LLSingleton< LLResMgr >::getInstance(), LLFontGL::getLineHeight(), LLView::getRect(), LLResMgr::getRes(), LLFontGL::getWidth(), LLRectBase< Type >::getWidth(), HPAD, IGNORE_SHOW_AGAIN, LINE_HEIGHT, LLCheckboxCtrl, llfloor(), llmax(), mCheck, mIgnorable, LLModalDialog::reshape(), S32, LLRectBase< Type >::setOriginAndSize(), LLCheckBoxCtrl::setValue(), TRUE, and VPAD.
Referenced by LLAlertDialog().
Definition at line 568 of file llalertdialog.cpp.
References LLAlertDialog::ButtonData::mButton, mButtonData, mNumOptions, and LLView::setEnabled().
void LLAlertDialog::setCaution | ( | BOOL | val = TRUE |
) | [inline] |
void LLAlertDialog::setUnique | ( | BOOL | val = TRUE |
) | [inline] |
void LLAlertDialog::setEditTextCallback | ( | alert_text_callback_t | callback, | |
void * | user_data | |||
) |
Definition at line 576 of file llalertdialog.cpp.
References llendl, llwarns, mLineEditor, mTextCallback, and mUserData.
Referenced by LLViewerWindow::alertXmlEditText().
void LLAlertDialog::setEditTextArgs | ( | const LLString::format_map_t & | edit_args | ) |
Definition at line 589 of file llalertdialog.cpp.
References format(), LLLineEditor::getText(), llendl, llwarns, mLineEditor, and LLLineEditor::setText().
Referenced by LLViewerWindow::alertXmlEditText().
void LLAlertDialog::setDrawAsterixes | ( | BOOL | enable | ) |
Definition at line 603 of file llalertdialog.cpp.
References LLLineEditor::clear(), mLineEditor, and LLLineEditor::setDrawAsterixes().
Referenced by LLViewerWindow::alertXmlEditText().
bool LLAlertDialog::show | ( | ) |
Definition at line 178 of file llalertdialog.cpp.
References LLFloaterView::adjustToFitScreen(), LLFloaterView::bringToFront(), LLFloater::close(), DEFAULT_BUTTON_DELAY, FALSE, LLControlGroup::getS32(), LLControlGroup::getWarning(), gFloaterView, IGNORE_SHOW_AGAIN, IGNORE_USE_DEFAULT, IGNORE_USE_SAVED, LLModalDialog::isModal(), llendl, llinfos, mCaution, mDefaultBtnTimer, mDefaultOption, mIgnorable, mIgnoreLabel, mLabel, mLineEditor, mOptionChosen, mUnique, LLModalDialog::open(), LLUI::sColorsGroup, sDisplayCallback, LLLineEditor::selectAll(), LLPanel::setBackgroundColor(), LLLineEditor::setFocus(), LLFloater::setFocus(), LLFrameTimer::setTimerExpirySec(), sSettings, LLFrameTimer::start(), LLModalDialog::startModal(), sUniqueActiveMap, and TRUE.
Referenced by LLViewerWindow::alertXmlEditText(), showCritical(), and showXml().
void LLAlertDialog::onButtonPressed | ( | void * | userdata | ) | [static] |
Definition at line 616 of file llalertdialog.cpp.
References LLAlertDialog::ButtonData::mOption, mOptionChosen, and LLAlertDialog::ButtonData::mSelf.
Referenced by createDialog().
LLAlertDialog * LLAlertDialog::createXml | ( | const LLString & | xml_desc, | |
alert_callback_t | callback = NULL , |
|||
void * | user_data = NULL | |||
) | [static] |
Definition at line 66 of file llalertdialog.cpp.
Referenced by LLViewerWindow::alertXmlEditText(), and showXml().
LLAlertDialog * LLAlertDialog::createXml | ( | const LLString & | xml_desc, | |
const LLString::format_map_t & | args, | |||
alert_callback_t | callback = NULL , |
|||
void * | user_data = NULL | |||
) | [static] |
Definition at line 74 of file llalertdialog.cpp.
References LLAlertDialog(), llendl, llerrs, llwarns, NULL, sAlertTemplates, and showXml().
LLAlertDialog * LLAlertDialog::showXml | ( | const LLString & | xml_desc, | |
alert_callback_t | callback = NULL , |
|||
void * | user_data = NULL | |||
) | [static] |
Definition at line 101 of file llalertdialog.cpp.
Referenced by LLViewerWindow::alertXml(), LLPanelClassified::canClose(), LLPanel::childDisplayNotFound(), createXml(), LLTrans::getString(), join_group_callback(), LLNotifyBox::onClickButton(), LLFloaterWorldMap::onCopySLURL(), LLLandmarkBridge::openItem(), process_alert_core(), and LLFloaterHUD::show().
LLAlertDialog * LLAlertDialog::showXml | ( | const LLString & | xml_desc, | |
const LLString::format_map_t & | args, | |||
alert_callback_t | callback = NULL , |
|||
void * | user_data = NULL | |||
) | [static] |
Definition at line 109 of file llalertdialog.cpp.
References createXml(), NULL, and show().
LLAlertDialog * LLAlertDialog::showCritical | ( | const LLString & | msg, | |
alert_callback_t | callback = NULL , |
|||
void * | user_data = NULL | |||
) | [static] |
Definition at line 117 of file llalertdialog.cpp.
References LLAlertDialog(), LLAlertDialogTemplate::mMessage, LLAlertDialogTemplate::mModal, LLAlertDialogTemplate::mOptions, LLAlertDialogTemplate::mTitle, NULL, show(), and TRUE.
Referenced by LLAppViewer::earlyExit().
bool LLAlertDialog::parseAlerts | ( | const LLString & | xml_filename, | |
LLControlGroup * | settings = NULL , |
|||
BOOL | settings_only = FALSE | |||
) | [static] |
Definition at line 642 of file llalertdialog.cpp.
References LLAlertDialogTemplate::addOption(), LLControlGroup::addWarning(), LLControlGroup::declareS32(), FALSE, LLUICtrlFactory::getLayeredXMLNode(), IGNORE_USE_DEFAULT, IGNORE_USE_SAVED, LLPointer< Type >::isNull(), llassert, llendl, llerrs, llwarns, LLAlertDialogTemplate::mCaution, LLAlertDialogTemplate::mDefaultOption, LLAlertDialogTemplate::mEditLineText, LLAlertDialogTemplate::mIgnorable, LLAlertDialogTemplate::mIgnoreLabel, LLAlertDialogTemplate::mIgnoreListText, LLAlertDialogTemplate::mLabel, LLAlertDialogTemplate::mMessage, LLAlertDialogTemplate::mModal, LLAlertDialogTemplate::mTitle, LLAlertDialogTemplate::mUnique, LLAlertDialogTemplate::mURL, LLAlertDialogTemplate::mURLOption, NULL, S32, sAlertTemplates, sIgnorableTemplates, sSettings, sStringAlwaysChoose, sStringSkipNextTime, and TRUE.
Referenced by LLAppViewer::initConfiguration(), and LLAppViewer::initWindow().
Definition at line 628 of file llalertdialog.cpp.
References sAlertTemplates.
Referenced by LLTaskInvFVBridge::buyItem(), and LLAppViewer::init().
static void LLAlertDialog::setDisplayCallback | ( | display_callback_t | callback | ) | [inline, static] |
Definition at line 106 of file llalertdialog.h.
References sDisplayCallback.
Referenced by LLViewerWindow::LLViewerWindow().
void LLAlertDialog::format | ( | LLString & | msg, | |
const LLString::format_map_t & | args | |||
) |
Definition at line 257 of file llalertdialog.cpp.
References LLStringBase< char >::format(), and mURL.
Referenced by createDialog(), and setEditTextArgs().
void LLAlertDialog::createDialog | ( | const std::vector< LLString > * | options, | |
S32 | default_option, | |||
const LLString & | msg, | |||
const LLString::format_map_t & | args, | |||
const LLString & | edit_text | |||
) | [private] |
Definition at line 266 of file llalertdialog.cpp.
References LLView::addChild(), BTN_HEIGHT, BTN_HPAD, FALSE, font_name, format(), LLRectBase< Type >::getHeight(), LLSingleton< LLResMgr >::getInstance(), LLFontGL::getLineHeight(), LLView::getRect(), LLResMgr::getRes(), LLRectBase< Type >::getWidth(), LLFontGL::getWidth(), hasTitleBar(), HPAD, i, LINE_HEIGHT, LLBUTTON_H_PAD, llendl, llfloor(), llmax(), llwarns, MAX_ALLOWED_MSG_WIDTH, LLAlertDialog::ButtonData::mButton, mButtonData, mCaution, mLineEditor, mNumOptions, LLAlertDialog::ButtonData::mOption, LLAlertDialog::ButtonData::mSelf, onButtonPressed(), LLModalDialog::reshape(), S32, LLUI::sColorsGroup, LLPanel::setBackgroundOpaque(), LLPanel::setBackgroundVisible(), LLTextBox::setColor(), LLUICtrl::setFocus(), LLRectBase< Type >::setLeftTopAndSize(), LLView::setMouseOpaque(), LLRectBase< Type >::setOriginAndSize(), LLView::setRect(), LLFontGL::sSansSerif, STD_STRING_STR_LEN, TRUE, and VPAD.
Referenced by LLAlertDialog().
void LLAlertDialog::handleCallbacks | ( | ) | [private] |
Definition at line 462 of file llalertdialog.cpp.
References LLLineEditor::getText(), LLCheckBoxCtrl::getValue(), LLControlGroup::getWarning(), IGNORE_SHOW_AGAIN, IGNORE_USE_DEFAULT, IGNORE_USE_SAVED, LLAlertDialog::URLLoader::load(), mCallback, mCheck, mIgnorable, mIgnoreLabel, mLineEditor, mOptionChosen, mTextCallback, mURL, mURLOption, mUserData, NULL, LLControlGroup::setS32(), LLControlGroup::setWarning(), sSettings, and sURLLoader.
Referenced by onClose().
BOOL LLAlertDialog::hasTitleBar | ( | ) | const [private] |
Definition at line 509 of file llalertdialog.cpp.
References LLFloater::getTitle(), LLFloater::isCloseable(), and LLFloater::isMinimizeable().
Referenced by createDialog().
LLControlGroup * LLAlertDialog::sSettings = NULL [static] |
Definition at line 110 of file llalertdialog.h.
Referenced by LLAlertDialogTemplate::getIgnore(), handleCallbacks(), parseAlerts(), LLAlertDialogTemplate::setIgnore(), and show().
Definition at line 114 of file llalertdialog.h.
Referenced by createXml(), getTemplateMessage(), LLPanelMsgs::onClickEnablePopup(), and parseAlerts().
Definition at line 115 of file llalertdialog.h.
Referenced by LLPanelMsgs::buildLists(), parseAlerts(), LLPanelMsgs::resetAllIgnored(), and LLPanelMsgs::setAllIgnored().
std::map< LLString, LLAlertDialog * > LLAlertDialog::sUniqueActiveMap [static, private] |
LLAlertDialog::display_callback_t LLAlertDialog::sDisplayCallback [static, private] |
LLString LLAlertDialog::sStringSkipNextTime [static, private] |
LLString LLAlertDialog::sStringAlwaysChoose [static, private] |
struct LLAlertDialog::ButtonData * LLAlertDialog::mButtonData [private] |
Referenced by createDialog(), draw(), setOptionEnabled(), and ~LLAlertDialog().
alert_callback_t LLAlertDialog::mCallback [private] |
void* LLAlertDialog::mUserData [private] |
Definition at line 145 of file llalertdialog.h.
Referenced by handleCallbacks(), and setEditTextCallback().
S32 LLAlertDialog::mNumOptions [private] |
Definition at line 146 of file llalertdialog.h.
Referenced by createDialog(), and setOptionEnabled().
S32 LLAlertDialog::mDefaultOption [private] |
BOOL LLAlertDialog::mOptionChosen [private] |
Definition at line 148 of file llalertdialog.h.
Referenced by handleCallbacks(), onButtonPressed(), and show().
LLCheckBoxCtrl* LLAlertDialog::mCheck [private] |
BOOL LLAlertDialog::mCaution [private] |
Definition at line 150 of file llalertdialog.h.
Referenced by createDialog(), setCaution(), and show().
BOOL LLAlertDialog::mUnique [private] |
Definition at line 151 of file llalertdialog.h.
Referenced by setUnique(), show(), and ~LLAlertDialog().
S32 LLAlertDialog::mIgnorable [private] |
Definition at line 152 of file llalertdialog.h.
Referenced by handleCallbacks(), setCheckBox(), and show().
LLString LLAlertDialog::mLabel [private] |
Reimplemented from LLPanel.
Definition at line 153 of file llalertdialog.h.
Referenced by show(), and ~LLAlertDialog().
LLString LLAlertDialog::mIgnoreLabel [private] |
LLFrameTimer LLAlertDialog::mDefaultBtnTimer [private] |
LLLineEditor* LLAlertDialog::mLineEditor [private] |
Definition at line 157 of file llalertdialog.h.
Referenced by createDialog(), handleCallbacks(), setDrawAsterixes(), setEditTextArgs(), setEditTextCallback(), and show().
Definition at line 158 of file llalertdialog.h.
Referenced by handleCallbacks(), and setEditTextCallback().
LLString LLAlertDialog::mURL [private] |
Definition at line 160 of file llalertdialog.h.
Referenced by format(), handleCallbacks(), and LLAlertDialog().
S32 LLAlertDialog::mURLOption [private] |
Definition at line 161 of file llalertdialog.h.
Referenced by handleCallbacks(), and LLAlertDialog().
LLAlertDialog::URLLoader * LLAlertDialog::sURLLoader [static, private] |
Definition at line 164 of file llalertdialog.h.
Referenced by handleCallbacks(), and setURLLoader().