#include <llnotify.h>
Public Types | |
typedef void(* | notify_callback_t )(S32 option, void *data) |
typedef std::vector< LLString > | option_list_t |
Public Member Functions | |
BOOL | isTip () const |
BOOL | isCaution () const |
void | setVisible (BOOL visible) |
void | stopAnimation () |
notify_callback_t | getNotifyCallback () |
void * | getUserData () |
void | close () |
Static Public Member Functions | |
static LLNotifyBox * | showXml (const LLString &xml_desc, notify_callback_t callback=NULL, void *user_data=NULL) |
static LLNotifyBox * | showXml (const LLString &xml_desc, const LLString::format_map_t &args, BOOL is_caution, notify_callback_t callback=NULL, void *user_data=NULL) |
static LLNotifyBox * | showXml (const LLString &xml_desc, const LLString::format_map_t &args, notify_callback_t callback=NULL, void *user_data=NULL) |
static LLNotifyBox * | showXml (const LLString &xml_desc, const LLString::format_map_t &args, notify_callback_t callback, void *user_data, const option_list_t &options, BOOL layout_script_dialog=FALSE) |
static bool | parseNotify (const LLString &xml_filename) |
static const LLString | getTemplateMessage (const LLString &xml_desc, const LLString::format_map_t &args) |
static const LLString | getTemplateMessage (const LLString &xml_desc) |
static BOOL | getTemplateIsCaution (const LLString &xml_desc) |
static void | cleanup () |
static void | format (LLString &msg, const LLString::format_map_t &args) |
Protected Types | |
typedef std::map< LLString, LLPointer< LLNotifyBoxTemplate > > | template_map_t |
typedef std::map< LLString, LLNotifyBox * > | unique_map_t |
Protected Member Functions | |
LLNotifyBox (LLPointer< LLNotifyBoxTemplate > notify_template, const LLString::format_map_t &args, notify_callback_t callback, void *user_data, BOOL is_caution=FALSE, const option_list_t &extra_options=option_list_t(), BOOL layout_script_dialog=FALSE) | |
~LLNotifyBox () | |
BOOL | handleMouseUp (S32 x, S32 y, MASK mask) |
BOOL | handleRightMouseDown (S32 x, S32 y, MASK mask) |
void | draw () |
BOOL | tick () |
void | moveToBack (bool getfocus=false) |
Static Protected Member Functions | |
static LLRect | getNotifyRect (S32 num_options, BOOL layout_script_dialog, BOOL is_caution) |
static LLRect | getNotifyTipRect (const LLString &message) |
static void | onClickButton (void *data) |
static void | onClickNext (void *data) |
static LLPointer < LLNotifyBoxTemplate > | getTemplate (const LLString &xml_desc) |
static LLNotifyBox * | findExistingNotify (LLPointer< LLNotifyBoxTemplate > notify_template, const LLString::format_map_t &args) |
Protected Attributes | |
LLString | mMessage |
BOOL | mIsTip |
BOOL | mIsCaution |
BOOL | mAnimating |
BOOL | mUnique |
LLTimer | mAnimateTimer |
LLButton * | mNextBtn |
LLNotifyBehavior * | mBehavior |
S32 | mNumOptions |
S32 | mDefaultOption |
std::vector< InstanceAndS32 * > | mBtnCallbackData |
Static Protected Attributes | |
static template_map_t | sNotifyTemplates |
static S32 | sNotifyBoxCount = 0 |
static const LLFontGL * | sFont = NULL |
static const LLFontGL * | sFontSmall = NULL |
static unique_map_t | sOpenUniqueNotifyBoxes |
Private Member Functions | |
void | drawBackground () const |
Static Private Attributes | |
static LLPointer < LLNotifyBoxTemplate > | sDefaultTemplate |
Classes | |
struct | InstanceAndS32 |
struct | LLNotifyBehavior |
Definition at line 44 of file llnotify.h.
typedef void(* LLNotifyBox::notify_callback_t)(S32 option, void *data) |
typedef std::vector<LLString> LLNotifyBox::option_list_t |
Definition at line 48 of file llnotify.h.
typedef std::map<LLString, LLPointer<LLNotifyBoxTemplate> > LLNotifyBox::template_map_t [protected] |
Definition at line 153 of file llnotify.h.
typedef std::map<LLString, LLNotifyBox*> LLNotifyBox::unique_map_t [protected] |
Definition at line 160 of file llnotify.h.
LLNotifyBox::LLNotifyBox | ( | LLPointer< LLNotifyBoxTemplate > | notify_template, | |
const LLString::format_map_t & | args, | |||
notify_callback_t | callback, | |||
void * | user_data, | |||
BOOL | is_caution = FALSE , |
|||
const option_list_t & | extra_options = option_list_t() , |
|||
BOOL | layout_script_dialog = FALSE | |||
) | [protected] |
Definition at line 175 of file llnotify.cpp.
References LLFloaterChat::addChatHistory(), LLView::addChild(), LLFontGL::BOLD, BOTTOM, BTN_HEIGHT, BTN_HEIGHT_SMALL, CHAT_SOURCE_SYSTEM, DB_FIRST_NAME_BUF_SIZE, DB_INV_ITEM_NAME_BUF_SIZE, DB_LAST_NAME_BUF_SIZE, FALSE, FOLLOWS_BOTTOM, FOLLOWS_RIGHT, FOLLOWS_TOP, format(), gColors, LLView::getChildCount(), LLControlGroup::getColor(), LLRectBase< Type >::getHeight(), LLUIFactory< LLFloaterChat, LLUISingleton< LLFloaterChat, LLFloaterChat >, LLFloaterChat >::getInstance(), LLFontGL::getLineHeight(), getNotifyRect(), getNotifyTipRect(), LLView::getRect(), getTemplateMessage(), HPAD, i, mAnimating, mBtnCallbackData, LLNotifyBox::InstanceAndS32::mButton, mDefaultOption, mIsCaution, mIsTip, mMessage, mNextBtn, mNumOptions, LLNotifyBox::InstanceAndS32::mSelf, LLChat::mSourceType, mUnique, NULL, onClickButton(), onClickNext(), S32, LLUI::sColorsGroup, LLTextBox::setBackgroundColor(), LLPanel::setBackgroundOpaque(), LLPanel::setBackgroundVisible(), LLTextEditor::setBorderVisible(), LLTextBox::setBorderVisible(), LLTextBox::setColor(), LLPanel::setDefaultBtn(), LLButton::setDisabledImageColor(), LLTextEditor::setEnabled(), LLView::setFocusRoot(), LLView::setFollows(), LLButton::setFont(), LLTextBox::setFontStyle(), LLTextEditor::setHideScrollbarForShortDocs(), LLButton::setImageColor(), LLUICtrl::setIsChrome(), LLView::setMouseOpaque(), LLRectBase< Type >::setOriginAndSize(), LLTextEditor::setReadOnlyBgColor(), LLTextEditor::setReadOnlyFgColor(), LLView::setRect(), LLButton::setScaleImage(), LLUICtrl::setTabStop(), LLTextEditor::setTakesNonScrollClicks(), LLView::setToolTip(), LLView::setVisible(), LLTextEditor::setWordWrap(), LLTextBox::setWrappedText(), sFont, sFontSmall, sNotifyBoxCount, sOpenUniqueNotifyBoxes, LLFontGL::sSansSerif, LLFontGL::sSansSerifSmall, TOP, LLColor4::transparent, TRUE, and VPAD.
Referenced by showXml().
LLNotifyBox::~LLNotifyBox | ( | ) | [protected] |
Definition at line 414 of file llnotify.cpp.
References LLView::getName(), mBehavior, mBtnCallbackData, mMessage, mUnique, NULL, and sOpenUniqueNotifyBoxes.
LLNotifyBox * LLNotifyBox::showXml | ( | const LLString & | xml_desc, | |
notify_callback_t | callback = NULL , |
|||
void * | user_data = NULL | |||
) | [static] |
Definition at line 83 of file llnotify.cpp.
Referenced by auction_j2c_upload_done(), auction_tga_upload_done(), callback_load_url_name(), LLPanelLandObjects::callbackReturnGroupObjects(), LLPanelLandObjects::callbackReturnOtherObjects(), LLPanelLandObjects::callbackReturnOwnerList(), LLPanelLandObjects::callbackReturnOwnerObjects(), disabled_duplicate(), LLDelayedGestureError::doDialog(), LLFetchInWelcomeArea::done(), LLFloaterSellLandUI::doShowObjects(), LLVoiceCallCapResponder::error(), LLToolDragAndDrop::giveInventoryCategory(), handle_buy_object(), handle_claim_public_land(), LLPanelGroupRolesSubTab::handleDeleteRole(), LLVoiceChannelP2P::handleError(), LLVoiceChannelProximal::handleError(), LLVoiceChannelGroup::handleError(), LLToolsLink::handleEvent(), LLAvatarGiveCard::handleEvent(), LLPanelGroupVoting::handleResponse(), LLVoiceChannelP2P::handleStatusChange(), LLVoiceChannel::handleStatusChange(), inventory_offer_handler(), LLIMMgr::inviteToSession(), join_group_callback(), onClickBuild(), onClickFly(), onClickHealth(), LLFloaterAuction::onClickOK(), onClickPush(), onClickScripts(), onClickVoice(), LLIMMgr::onInviteNameLookup(), LLLiveLSLEditor::onLoadComplete(), LLPreviewLSL::onLoadComplete(), LLPreviewNotecard::onLoadComplete(), LLGestureManager::onLoadComplete(), LLPanelFriends::onMaximumSelect(), LLPanelLogin::onPassKey(), process_accept_callingcard(), process_agent_movement_complete(), process_alert_core(), process_decline_callingcard(), process_improved_im(), process_money_balance_reply(), process_offer_callingcard(), process_script_dialog(), process_script_question(), LLWearableList::processGetAssetReply(), LLLandmarkList::processGetAssetReply(), LLAvatarTracker::processNotify(), LLAgent::recoverMissingWearable(), LLViewerInventoryCategory::removeFromServer(), request_friendship(), LLPanelFriends::requestFriendshipDialog(), LLViewerParcelMgr::selectLand(), set_god_level(), LLVoiceChannel::setChannelInfo(), LLAgent::stopAutoPilot(), terrain_download_done(), LLEventNotifier::update(), LLViewerInventoryCategory::updateServer(), LLNewAgentInventoryResponder::uploadComplete(), LLFirstUse::useAppearance(), LLFirstUse::useBalanceDecrease(), LLFirstUse::useBalanceIncrease(), LLFirstUse::useBuild(), LLFirstUse::useDebugMenus(), LLFirstUse::useFlexible(), LLFirstUse::useInventory(), LLFirstUse::useLeftClickNoHit(), LLFirstUse::useMap(), LLFirstUse::useMedia(), LLFirstUse::useOverrideKeys(), LLFirstUse::useSandbox(), LLFirstUse::useSculptedPrim(), LLFirstUse::useSit(), and LLFirstUse::useTeleport().
LLNotifyBox * LLNotifyBox::showXml | ( | const LLString & | xml_desc, | |
const LLString::format_map_t & | args, | |||
BOOL | is_caution, | |||
notify_callback_t | callback = NULL , |
|||
void * | user_data = NULL | |||
) | [static] |
Definition at line 90 of file llnotify.cpp.
References LLView::addChildAtEnd(), findExistingNotify(), getTemplate(), LLNotifyBox(), mBehavior, and moveToBack().
LLNotifyBox * LLNotifyBox::showXml | ( | const LLString & | xml_desc, | |
const LLString::format_map_t & | args, | |||
notify_callback_t | callback = NULL , |
|||
void * | user_data = NULL | |||
) | [static] |
Definition at line 111 of file llnotify.cpp.
References LLView::addChildAtEnd(), findExistingNotify(), getTemplate(), LLNotifyBox(), mBehavior, and moveToBack().
LLNotifyBox * LLNotifyBox::showXml | ( | const LLString & | xml_desc, | |
const LLString::format_map_t & | args, | |||
notify_callback_t | callback, | |||
void * | user_data, | |||
const option_list_t & | options, | |||
BOOL | layout_script_dialog = FALSE | |||
) | [static] |
Definition at line 131 of file llnotify.cpp.
References LLView::addChild(), FALSE, findExistingNotify(), getTemplate(), LLNotifyBox(), and mBehavior.
bool LLNotifyBox::parseNotify | ( | const LLString & | xml_filename | ) | [static] |
Definition at line 866 of file llnotify.cpp.
References FALSE, LLControlGroup::getF32(), LLUICtrlFactory::getLayeredXMLNode(), gSavedSettings, LLPointer< Type >::isNull(), llendl, llerrs, llwarns, NULL, S32, and sNotifyTemplates.
Referenced by LLAppViewer::initWindow().
const LLString LLNotifyBox::getTemplateMessage | ( | const LLString & | xml_desc, | |
const LLString::format_map_t & | args | |||
) | [static] |
Definition at line 822 of file llnotify.cpp.
References format(), and sNotifyTemplates.
Referenced by LLVoiceChannelGroup::handleError(), LLNotifyBox(), notify_automute_callback(), notify_cautioned_script_question(), process_script_question(), and LLAvatarTracker::processNotify().
Definition at line 852 of file llnotify.cpp.
References FALSE, and sNotifyTemplates.
Referenced by notify_cautioned_script_question(), and process_script_question().
BOOL LLNotifyBox::isTip | ( | ) | const [inline] |
Definition at line 67 of file llnotify.h.
References mIsTip.
Referenced by LLNotifyBoxView::getFirstNontipBox(), and LLNotifyBoxView::showOnly().
BOOL LLNotifyBox::isCaution | ( | ) | const [inline] |
void LLNotifyBox::setVisible | ( | BOOL | visible | ) | [virtual] |
Reimplemented from LLView.
Definition at line 591 of file llnotify.cpp.
References mIsTip, mNextBtn, LLView::setEnabled(), LLView::setVisible(), and sNotifyBoxCount.
Referenced by LLNotifyBoxView::showOnly().
void LLNotifyBox::stopAnimation | ( | ) | [inline] |
notify_callback_t LLNotifyBox::getNotifyCallback | ( | ) | [inline] |
Definition at line 72 of file llnotify.h.
References mBehavior, and LLNotifyBox::LLNotifyBehavior::mCallback.
Referenced by LLNotifyBoxView::purgeMessagesMatching().
void* LLNotifyBox::getUserData | ( | ) | [inline] |
Definition at line 73 of file llnotify.h.
References mBehavior, and LLNotifyBox::LLNotifyBehavior::mData.
Referenced by LLNotifyBoxView::purgeMessagesMatching().
void LLNotifyBox::close | ( | ) |
Definition at line 545 of file llnotify.cpp.
References LLMortician::die(), LLPanel::getDefaultButton(), LLNotifyBoxView::getFirstNontipBox(), gFocusMgr, mIsTip, LLUICtrl::setFocus(), LLNotifyBoxView::showOnly(), sNotifyBoxCount, LLFocusMgr::triggerFocusFlash(), and TRUE.
Referenced by handleMouseUp(), LLVoiceChannel::handleStatusChange(), and tick().
void LLNotifyBox::cleanup | ( | ) | [static] |
Definition at line 168 of file llnotify.cpp.
References NULL, and sDefaultTemplate.
Referenced by LLAppViewer::cleanup().
void LLNotifyBox::format | ( | LLString & | msg, | |
const LLString::format_map_t & | args | |||
) | [static] |
Definition at line 572 of file llnotify.cpp.
References LLStringBase< char >::format().
Referenced by findExistingNotify(), getTemplateMessage(), and LLNotifyBox().
Reimplemented from LLView.
Definition at line 428 of file llnotify.cpp.
References close(), LLView::handleMouseUp(), mBehavior, LLNotifyBox::LLNotifyBehavior::mCallback, LLNotifyBox::LLNotifyBehavior::mData, mIsTip, NULL, LLPanel::setFocus(), and TRUE.
Reimplemented from LLView.
Definition at line 447 of file llnotify.cpp.
References LLView::handleRightMouseDown(), mIsTip, moveToBack(), and TRUE.
void LLNotifyBox::draw | ( | void | ) | [protected, virtual] |
Reimplemented from LLPanel.
Definition at line 460 of file llnotify.cpp.
References ANIMATION_TIME, LLPanel::draw(), drawBackground(), FALSE, LLTimer::getElapsedTimeF32(), LLRectBase< Type >::getHeight(), LLView::getRect(), LLTimer::getStarted(), gTeleportDisplay, mAnimateTimer, mAnimating, LLEventTimer::mEventTimer, mIsTip, LLUI::popMatrix(), LLUI::pushMatrix(), S32, LLNotifyBoxView::showOnly(), LLTimer::start(), LLTimer::stop(), and LLUI::translate().
BOOL LLNotifyBox::tick | ( | ) | [protected, virtual] |
Implements LLEventTimer.
Definition at line 582 of file llnotify.cpp.
References close(), FALSE, and mIsTip.
void LLNotifyBox::moveToBack | ( | bool | getfocus = false |
) | [protected] |
Definition at line 602 of file llnotify.cpp.
References FALSE, LLView::getChildCount(), LLNotifyBoxView::getFirstNontipBox(), gFocusMgr, mIsTip, mNextBtn, NULL, LLView::sendChildToBack(), LLUICtrl::setFocus(), LLView::setVisible(), LLNotifyBoxView::showOnly(), LLFocusMgr::triggerFocusFlash(), and TRUE.
Referenced by handleRightMouseDown(), and showXml().
LLRect LLNotifyBox::getNotifyRect | ( | S32 | num_options, | |
BOOL | layout_script_dialog, | |||
BOOL | is_caution | |||
) | [static, protected] |
Definition at line 634 of file llnotify.cpp.
References BTN_HEIGHT, LLRectBase< Type >::getHeight(), LLView::getRect(), LLControlGroup::getS32(), LLRectBase< Type >::getWidth(), gSavedSettings, LEFT, RIGHT, S32, TOP, and VPAD.
Referenced by LLNotifyBox().
Definition at line 670 of file llnotify.cpp.
References FALSE, LLView::getBoundingRect(), LLFontGL::getLineHeight(), LLView::getRect(), LLControlGroup::getS32(), LLRectBase< Type >::getWidth(), gOverlayBar, gSavedSettings, HPAD, LEFT, llceil(), llclamp(), LLFontGL::maxDrawableChars(), LLRectBase< Type >::mTop, RIGHT, S32, sFont, TRUE, utf8str_to_wstring(), and VPAD.
Referenced by LLNotifyBox().
void LLNotifyBox::onClickButton | ( | void * | data | ) | [static, protected] |
Definition at line 757 of file llnotify.cpp.
References LLNotifyBox::InstanceAndS32::mButton, LLNotifyBox::InstanceAndS32::mSelf, NULL, S32, and LLAlertDialog::showXml().
Referenced by LLNotifyBox().
void LLNotifyBox::onClickNext | ( | void * | data | ) | [static, protected] |
Definition at line 785 of file llnotify.cpp.
Referenced by LLNotifyBox().
LLPointer< LLNotifyBoxTemplate > LLNotifyBox::getTemplate | ( | const LLString & | xml_desc | ) | [static, protected] |
Definition at line 792 of file llnotify.cpp.
References FALSE, LLControlGroup::getF32(), gSavedSettings, sDefaultTemplate, and sNotifyTemplates.
Referenced by showXml().
LLNotifyBox * LLNotifyBox::findExistingNotify | ( | LLPointer< LLNotifyBoxTemplate > | notify_template, | |
const LLString::format_map_t & | args | |||
) | [static, protected] |
Definition at line 152 of file llnotify.cpp.
References format(), NULL, and sOpenUniqueNotifyBoxes.
Referenced by showXml().
void LLNotifyBox::drawBackground | ( | ) | const [private] |
Definition at line 507 of file llnotify.cpp.
References LLViewerImage::bindTexture(), LLFocusMgr::childHasKeyboardFocus(), LLGLImmediate::color4fv(), gColors, LLControlGroup::getColor(), LLView::getRect(), LLUI::getUIImage(), gFocusMgr, gGL, gl_segmented_rect_2d_tex(), mIsCaution, mIsTip, ROUNDED_RECT_BOTTOM, ROUNDED_RECT_TOP, and S32.
Referenced by draw().
LLPointer< LLNotifyBoxTemplate > LLNotifyBox::sDefaultTemplate [static, private] |
LLString LLNotifyBox::mMessage [protected] |
BOOL LLNotifyBox::mIsTip [protected] |
Definition at line 119 of file llnotify.h.
Referenced by close(), draw(), drawBackground(), handleMouseUp(), handleRightMouseDown(), isTip(), LLNotifyBox(), moveToBack(), setVisible(), and tick().
BOOL LLNotifyBox::mIsCaution [protected] |
Definition at line 120 of file llnotify.h.
Referenced by drawBackground(), isCaution(), and LLNotifyBox().
BOOL LLNotifyBox::mAnimating [protected] |
Definition at line 121 of file llnotify.h.
Referenced by draw(), LLNotifyBox(), and stopAnimation().
BOOL LLNotifyBox::mUnique [protected] |
LLTimer LLNotifyBox::mAnimateTimer [protected] |
LLButton* LLNotifyBox::mNextBtn [protected] |
Definition at line 129 of file llnotify.h.
Referenced by LLNotifyBox(), moveToBack(), and setVisible().
LLNotifyBehavior* LLNotifyBox::mBehavior [protected] |
Definition at line 140 of file llnotify.h.
Referenced by getNotifyCallback(), getUserData(), handleMouseUp(), showXml(), and ~LLNotifyBox().
S32 LLNotifyBox::mNumOptions [protected] |
S32 LLNotifyBox::mDefaultOption [protected] |
std::vector<InstanceAndS32*> LLNotifyBox::mBtnCallbackData [protected] |
LLNotifyBox::template_map_t LLNotifyBox::sNotifyTemplates [static, protected] |
Definition at line 154 of file llnotify.h.
Referenced by getTemplate(), getTemplateIsCaution(), getTemplateMessage(), and parseNotify().
S32 LLNotifyBox::sNotifyBoxCount = 0 [static, protected] |
const LLFontGL * LLNotifyBox::sFont = NULL [static, protected] |
const LLFontGL * LLNotifyBox::sFontSmall = NULL [static, protected] |
std::map< LLString, LLNotifyBox * > LLNotifyBox::sOpenUniqueNotifyBoxes [static, protected] |
Definition at line 161 of file llnotify.h.
Referenced by findExistingNotify(), LLNotifyBox(), and ~LLNotifyBox().