LLNotifyBox Class Reference

#include <llnotify.h>

Inheritance diagram for LLNotifyBox:

Inheritance graph
[legend]
Collaboration diagram for LLNotifyBox:

Collaboration graph
[legend]
List of all members.

Public Types

typedef void(*) notify_callback_t (S32 option, void *data)
typedef std::vector< LLStringoption_list_t

Public Member Functions

BOOL isTip () const
BOOL isCaution () const
void setVisible (BOOL visible)
void stopAnimation ()
notify_callback_t getNotifyCallback ()
voidgetUserData ()
void close ()

Static Public Member Functions

static LLNotifyBoxshowXml (const LLString &xml_desc, notify_callback_t callback=NULL, void *user_data=NULL)
static LLNotifyBoxshowXml (const LLString &xml_desc, const LLString::format_map_t &args, BOOL is_caution, notify_callback_t callback=NULL, void *user_data=NULL)
static LLNotifyBoxshowXml (const LLString &xml_desc, const LLString::format_map_t &args, notify_callback_t callback=NULL, void *user_data=NULL)
static LLNotifyBoxshowXml (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 ()

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 ()

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< LLNotifyBoxTemplategetTemplate (const LLString &xml_desc)
static LLNotifyBoxfindExistingNotify (LLPointer< LLNotifyBoxTemplate > notify_template, const LLString::format_map_t &args)

Protected Attributes

LLString mMessage
BOOL mIsTip
BOOL mIsCaution
BOOL mAnimating
BOOL mUnique
LLTimer mAnimateTimer
LLButtonmNextBtn
LLNotifyBehaviormBehavior
S32 mNumOptions
S32 mDefaultOption
std::vector< InstanceAndS32 * > mBtnCallbackData

Static Protected Attributes

static template_map_t sNotifyTemplates
static S32 sNotifyBoxCount = 0
static const LLFontGLsFont = NULL
static const LLFontGLsFontSmall = NULL
static unique_map_t sOpenUniqueNotifyBoxes

Private Member Functions

void drawBackground () const

Static Private Attributes

static LLPointer< LLNotifyBoxTemplatesDefaultTemplate

Classes

struct  InstanceAndS32
struct  LLNotifyBehavior

Detailed Description

Definition at line 44 of file llnotify.h.


Member Typedef Documentation

typedef void(*) LLNotifyBox::notify_callback_t(S32 option, void *data)

Definition at line 47 of file llnotify.h.

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 152 of file llnotify.h.

typedef std::map<LLString, LLNotifyBox*> LLNotifyBox::unique_map_t [protected]

Definition at line 159 of file llnotify.h.


Constructor & Destructor Documentation

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 172 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, LLAlertDialog::format(), gColors, LLView::getChildCount(), LLControlGroup::getColor(), LLRectBase< Type >::getHeight(), LLUIInstanceMgr< LLFloaterChat, LLFloaterChat >::getInstance(), LLFontGL::getLineHeight(), getNotifyRect(), getNotifyTipRect(), getTemplateMessage(), LLRectBase< Type >::getWidth(), gNotifyBoxView, HPAD, i, mAnimating, mBtnCallbackData, LLNotifyBox::InstanceAndS32::mButton, mDefaultOption, mIsCaution, LLView::mIsFocusRoot, mIsTip, mMessage, mNextBtn, mNumOptions, LLView::mRect, 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::setFollows(), LLButton::setFont(), LLTextBox::setFontStyle(), LLTextEditor::setHideScrollbarForShortDocs(), LLButton::setImageColor(), LLUICtrl::setIsChrome(), LLView::setMouseOpaque(), LLRectBase< Type >::setOriginAndSize(), LLTextEditor::setReadOnlyBgColor(), LLTextEditor::setReadOnlyFgColor(), LLView::setRect(), LLUICtrl::setTabStop(), LLTextEditor::setTakesFocus(), LLTextEditor::setTakesNonScrollClicks(), LLView::setToolTip(), LLView::setVisible(), LLTextEditor::setWordWrap(), LLTextBox::setWrappedText(), sFont, sFontSmall, sNotifyBoxCount, sOpenUniqueNotifyBoxes, LLFontGL::sSansSerif, LLFontGL::sSansSerifSmall, TOP, LLColor4::transparent, TRUE, VPAD, x, and y.

Referenced by showXml().

LLNotifyBox::~LLNotifyBox (  )  [protected]

Definition at line 411 of file llnotify.cpp.

References mBehavior, mBtnCallbackData, mMessage, LLView::mName, mUnique, NULL, and sOpenUniqueNotifyBoxes.


Member Function Documentation

void LLNotifyBox::cleanup (  )  [static]

Definition at line 165 of file llnotify.cpp.

References NULL, and sDefaultTemplate.

Referenced by cleanup_app().

void LLNotifyBox::close (  ) 

Definition at line 530 of file llnotify.cpp.

References LLMortician::die(), LLNotifyBoxView::getFirstNontipBox(), gFocusMgr, gNotifyBoxView, mIsTip, LLNotifyBoxView::showOnly(), sNotifyBoxCount, LLFocusMgr::triggerFocusFlash(), and TRUE.

Referenced by handleMouseUp(), and tick().

void LLNotifyBox::draw (  )  [protected, virtual]

Reimplemented from LLPanel.

Definition at line 452 of file llnotify.cpp.

References ANIMATION_TIME, LLPanel::draw(), drawBackground(), f, FALSE, LLTimer::getElapsedTimeF32(), LLRectBase< Type >::getHeight(), gNotifyBoxView, height, mAnimateTimer, mAnimating, mIsTip, LLView::mRect, LLUI::popMatrix(), LLUI::pushMatrix(), S32, LLNotifyBoxView::showOnly(), and LLUI::translate().

void LLNotifyBox::drawBackground (  )  const [private]

Definition at line 489 of file llnotify.cpp.

References LLViewerImage::bindTexture(), LLFocusMgr::childHasKeyboardFocus(), gColors, LLControlGroup::getColor(), LLImageGL::getHeight(), LLRectBase< Type >::getHeight(), LLViewerImageList::getImage(), LLControlGroup::getString(), LLImageGL::getWidth(), LLRectBase< Type >::getWidth(), gFocusMgr, gImageList, gl_segmented_rect_2d_tex(), glColor4fv, gViewerArt, MIPMAP_FALSE, mIsCaution, mIsTip, LLView::mRect, LLColor4::mV, ROUNDED_RECT_BOTTOM, ROUNDED_RECT_TOP, S32, LLUUID::set(), and TRUE.

Referenced by draw().

LLNotifyBox * LLNotifyBox::findExistingNotify ( LLPointer< LLNotifyBoxTemplate notify_template,
const LLString::format_map_t args 
) [static, protected]

Definition at line 150 of file llnotify.cpp.

References LLAlertDialog::format(), NULL, and sOpenUniqueNotifyBoxes.

Referenced by showXml().

notify_callback_t LLNotifyBox::getNotifyCallback (  )  [inline]

Definition at line 72 of file llnotify.h.

References mBehavior, and LLNotifyBox::LLNotifyBehavior::mCallback.

LLRect LLNotifyBox::getNotifyRect ( S32  num_options,
BOOL  layout_script_dialog,
BOOL  is_caution 
) [static, protected]

Definition at line 604 of file llnotify.cpp.

References BTN_HEIGHT, LLRectBase< Type >::getHeight(), LLView::getRect(), LLControlGroup::getS32(), LLRectBase< Type >::getWidth(), gNotifyBoxView, gSavedSettings, LEFT, S32, TOP, and VPAD.

Referenced by LLNotifyBox().

LLRect LLNotifyBox::getNotifyTipRect ( const LLString message  )  [static, protected]

Definition at line 640 of file llnotify.cpp.

References end, FALSE, LLRectBase< Type >::getHeight(), LLFontGL::getLineHeight(), LLView::getRect(), LLControlGroup::getS32(), LLRectBase< Type >::getWidth(), gNotifyBoxView, gOverlayBar, gSavedSettings, HPAD, LEFT, llceil(), llclamp(), LLFontGL::maxDrawableChars(), S32, sFont, start, TRUE, utf8str_to_wstring(), and VPAD.

Referenced by LLNotifyBox().

LLPointer< LLNotifyBoxTemplate > LLNotifyBox::getTemplate ( const LLString xml_desc  )  [static, protected]

Definition at line 762 of file llnotify.cpp.

References FALSE, LLControlGroup::getF32(), gSavedSettings, sDefaultTemplate, and sNotifyTemplates.

Referenced by showXml().

BOOL LLNotifyBox::getTemplateIsCaution ( const LLString xml_desc  )  [static]

Definition at line 822 of file llnotify.cpp.

References FALSE, and sNotifyTemplates.

Referenced by notify_cautioned_script_question(), and process_script_question().

const LLString LLNotifyBox::getTemplateMessage ( const LLString xml_desc  )  [static]

Definition at line 808 of file llnotify.cpp.

References sNotifyTemplates.

const LLString LLNotifyBox::getTemplateMessage ( const LLString xml_desc,
const LLString::format_map_t args 
) [static]

Definition at line 792 of file llnotify.cpp.

References LLAlertDialog::format(), and sNotifyTemplates.

Referenced by LLVoiceChannelGroup::handleError(), LLNotifyBox(), notify_cautioned_script_question(), and process_script_question().

void* LLNotifyBox::getUserData (  )  [inline]

Definition at line 73 of file llnotify.h.

References mBehavior, and LLNotifyBox::LLNotifyBehavior::mData.

BOOL LLNotifyBox::handleMouseUp ( S32  x,
S32  y,
MASK  mask 
) [protected, virtual]

Reimplemented from LLView.

Definition at line 425 of file llnotify.cpp.

References close(), LLView::handleMouseUp(), mIsTip, LLPanel::setFocus(), and TRUE.

BOOL LLNotifyBox::handleRightMouseDown ( S32  x,
S32  y,
MASK  mask 
) [protected, virtual]

Reimplemented from LLView.

Definition at line 439 of file llnotify.cpp.

References LLView::getEnabled(), LLView::getVisible(), LLView::handleRightMouseDown(), mIsTip, moveToBack(), LLView::pointInView(), and TRUE.

BOOL LLNotifyBox::isCaution (  )  const [inline]

Definition at line 68 of file llnotify.h.

References mIsCaution.

BOOL LLNotifyBox::isTip (  )  const [inline]

Definition at line 67 of file llnotify.h.

References mIsTip.

Referenced by LLNotifyBoxView::getFirstNontipBox().

void LLNotifyBox::moveToBack (  )  [protected]

Definition at line 578 of file llnotify.cpp.

References FALSE, LLView::getChildCount(), LLNotifyBoxView::getFirstNontipBox(), gFocusMgr, gNotifyBoxView, mIsTip, mNextBtn, LLView::sendChildToBack(), LLView::setVisible(), LLNotifyBoxView::showOnly(), LLFocusMgr::triggerFocusFlash(), and TRUE.

Referenced by handleRightMouseDown(), and showXml().

void LLNotifyBox::onClickButton ( void data  )  [static, protected]

Definition at line 727 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 755 of file llnotify.cpp.

Referenced by LLNotifyBox().

bool LLNotifyBox::parseNotify ( const LLString xml_filename  )  [static]

Definition at line 836 of file llnotify.cpp.

References FALSE, LLControlGroup::getF32(), LLUICtrlFactory::getLayeredXMLNode(), gSavedSettings, LLPointer< Type >::isNull(), llendl, llerrs, llwarns, NULL, S32, and sNotifyTemplates.

Referenced by main().

void LLNotifyBox::setVisible ( BOOL  visible  )  [virtual]

Reimplemented from LLView.

Definition at line 567 of file llnotify.cpp.

References mIsTip, mNextBtn, LLView::setEnabled(), LLView::setVisible(), and sNotifyBoxCount.

Referenced by LLNotifyBoxView::showOnly().

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 129 of file llnotify.cpp.

References LLView::addChild(), FALSE, findExistingNotify(), getTemplate(), gNotifyBoxView, LLNotifyBox(), and mBehavior.

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 109 of file llnotify.cpp.

References LLView::addChildAtEnd(), findExistingNotify(), getTemplate(), gNotifyBoxView, LLNotifyBox(), mBehavior, and moveToBack().

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 88 of file llnotify.cpp.

References LLView::addChildAtEnd(), findExistingNotify(), getTemplate(), gNotifyBoxView, LLNotifyBox(), mBehavior, and moveToBack().

LLNotifyBox * LLNotifyBox::showXml ( const LLString xml_desc,
notify_callback_t  callback = NULL,
void user_data = NULL 
) [static]

Definition at line 81 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(), LLFetchInWelcomeArea::done(), LLFloaterSellLandUI::doShowObjects(), LLToolDragAndDrop::giveInventoryCategory(), handle_buy_object(), handle_claim_public_land(), LLPanelGroupRolesSubTab::handleDeleteRole(), LLVoiceChannelP2P::handleError(), LLVoiceChannelProximal::handleError(), LLVoiceChannelGroup::handleError(), LLToolsLink::handleEvent(), LLAvatarGiveCard::handleEvent(), LLAudioStreamMediaListener::handleEvent(), 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(), LLPreviewGesture::onLoadComplete(), LLGestureManager::onLoadComplete(), LLPanelFriends::onMaximumSelect(), LLPanelLogin::onPassKey(), process_accept_callingcard(), 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(), LLViewerParcelMgr::processParcelProperties(), LLAgent::recoverMissingWearable(), LLViewerInventoryCategory::removeFromServer(), request_friendship(), LLPanelFriends::requestFriendshipDialog(), LLViewerParcelMgr::selectLand(), set_god_level(), 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::useOverrideKeys(), LLFirstUse::useSandbox(), LLFirstUse::useSculptedPrim(), LLFirstUse::useSit(), and LLFirstUse::useTeleport().

void LLNotifyBox::stopAnimation (  )  [inline]

Definition at line 70 of file llnotify.h.

References FALSE, and mAnimating.

BOOL LLNotifyBox::tick (  )  [protected, virtual]

Implements LLEventTimer.

Definition at line 558 of file llnotify.cpp.

References close(), FALSE, and mIsTip.


Member Data Documentation

LLTimer LLNotifyBox::mAnimateTimer [protected]

Definition at line 126 of file llnotify.h.

Referenced by draw().

BOOL LLNotifyBox::mAnimating [protected]

Definition at line 120 of file llnotify.h.

Referenced by draw(), LLNotifyBox(), and stopAnimation().

LLNotifyBehavior* LLNotifyBox::mBehavior [protected]

Definition at line 139 of file llnotify.h.

Referenced by getNotifyCallback(), getUserData(), showXml(), and ~LLNotifyBox().

std::vector<InstanceAndS32*> LLNotifyBox::mBtnCallbackData [protected]

Definition at line 150 of file llnotify.h.

Referenced by LLNotifyBox(), and ~LLNotifyBox().

S32 LLNotifyBox::mDefaultOption [protected]

Definition at line 142 of file llnotify.h.

Referenced by LLNotifyBox().

BOOL LLNotifyBox::mIsCaution [protected]

Definition at line 119 of file llnotify.h.

Referenced by drawBackground(), isCaution(), and LLNotifyBox().

BOOL LLNotifyBox::mIsTip [protected]

Definition at line 118 of file llnotify.h.

Referenced by close(), draw(), drawBackground(), handleMouseUp(), handleRightMouseDown(), isTip(), LLNotifyBox(), moveToBack(), setVisible(), and tick().

LLString LLNotifyBox::mMessage [protected]

Definition at line 116 of file llnotify.h.

Referenced by LLNotifyBox(), and ~LLNotifyBox().

LLButton* LLNotifyBox::mNextBtn [protected]

Definition at line 128 of file llnotify.h.

Referenced by LLNotifyBox(), moveToBack(), and setVisible().

S32 LLNotifyBox::mNumOptions [protected]

Definition at line 141 of file llnotify.h.

Referenced by LLNotifyBox().

BOOL LLNotifyBox::mUnique [protected]

Definition at line 121 of file llnotify.h.

Referenced by LLNotifyBox(), and ~LLNotifyBox().

LLPointer< LLNotifyBoxTemplate > LLNotifyBox::sDefaultTemplate [static, private]

Definition at line 113 of file llnotify.h.

Referenced by cleanup(), and getTemplate().

const LLFontGL * LLNotifyBox::sFont = NULL [static, protected]

Definition at line 156 of file llnotify.h.

Referenced by getNotifyTipRect(), and LLNotifyBox().

const LLFontGL * LLNotifyBox::sFontSmall = NULL [static, protected]

Definition at line 157 of file llnotify.h.

Referenced by LLNotifyBox().

S32 LLNotifyBox::sNotifyBoxCount = 0 [static, protected]

Definition at line 155 of file llnotify.h.

Referenced by close(), LLNotifyBox(), and setVisible().

LLNotifyBox::template_map_t LLNotifyBox::sNotifyTemplates [static, protected]

Definition at line 153 of file llnotify.h.

Referenced by getTemplate(), getTemplateIsCaution(), getTemplateMessage(), and parseNotify().

std::map< LLString, LLNotifyBox * > LLNotifyBox::sOpenUniqueNotifyBoxes [static, protected]

Definition at line 160 of file llnotify.h.

Referenced by findExistingNotify(), LLNotifyBox(), and ~LLNotifyBox().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:32 2010 for Second Life Viewer by  doxygen 1.4.7