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 ()
void * getUserData ()
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 ()
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 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
< LLNotifyBoxTemplate
sDefaultTemplate

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)

typedef std::vector<LLString> LLNotifyBox::option_list_t

Definition at line 48 of file llnotify.h.

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.


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

Here is the call graph for this function:

Here is the caller graph for this function:

LLNotifyBox::~LLNotifyBox (  )  [protected]

Definition at line 414 of file llnotify.cpp.

References LLView::getName(), mBehavior, mBtnCallbackData, mMessage, mUnique, NULL, and sOpenUniqueNotifyBoxes.

Here is the call graph for this function:


Member Function Documentation

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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.

Here is the call graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 838 of file llnotify.cpp.

References sNotifyTemplates.

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

Definition at line 852 of file llnotify.cpp.

References FALSE, and sNotifyTemplates.

Referenced by notify_cautioned_script_question(), and process_script_question().

Here is the caller graph for this function:

BOOL LLNotifyBox::isTip (  )  const [inline]

Definition at line 67 of file llnotify.h.

References mIsTip.

Referenced by LLNotifyBoxView::getFirstNontipBox(), and LLNotifyBoxView::showOnly().

Here is the caller graph for this function:

BOOL LLNotifyBox::isCaution (  )  const [inline]

Definition at line 68 of file llnotify.h.

References mIsCaution.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void LLNotifyBox::stopAnimation (  )  [inline]

Definition at line 70 of file llnotify.h.

References FALSE, and mAnimating.

notify_callback_t LLNotifyBox::getNotifyCallback (  )  [inline]

Definition at line 72 of file llnotify.h.

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

Referenced by LLNotifyBoxView::purgeMessagesMatching().

Here is the caller graph for this function:

void* LLNotifyBox::getUserData (  )  [inline]

Definition at line 73 of file llnotify.h.

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

Referenced by LLNotifyBoxView::purgeMessagesMatching().

Here is the caller graph for this function:

void LLNotifyBox::close (  ) 

void LLNotifyBox::cleanup (  )  [static]

Definition at line 168 of file llnotify.cpp.

References NULL, and sDefaultTemplate.

Referenced by LLAppViewer::cleanup().

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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.

Here is the call graph for this function:

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

Reimplemented from LLView.

Definition at line 447 of file llnotify.cpp.

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

Here is the call graph for this function:

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

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

Implements LLEventTimer.

Definition at line 582 of file llnotify.cpp.

References close(), FALSE, and mIsTip.

Here is the call graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

void LLNotifyBox::onClickNext ( void *  data  )  [static, protected]

Definition at line 785 of file llnotify.cpp.

Referenced by LLNotifyBox().

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

void LLNotifyBox::drawBackground (  )  const [private]


Member Data Documentation

Definition at line 114 of file llnotify.h.

Referenced by cleanup(), and getTemplate().

Definition at line 117 of file llnotify.h.

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

Definition at line 120 of file llnotify.h.

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

Definition at line 121 of file llnotify.h.

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

Definition at line 122 of file llnotify.h.

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

Definition at line 127 of file llnotify.h.

Referenced by draw().

Definition at line 129 of file llnotify.h.

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

Definition at line 140 of file llnotify.h.

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

Definition at line 142 of file llnotify.h.

Referenced by LLNotifyBox().

Definition at line 143 of file llnotify.h.

Referenced by LLNotifyBox().

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

Definition at line 151 of file llnotify.h.

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

Definition at line 154 of file llnotify.h.

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

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

Definition at line 156 of file llnotify.h.

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

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

Definition at line 157 of file llnotify.h.

Referenced by getNotifyTipRect(), and LLNotifyBox().

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

Definition at line 158 of file llnotify.h.

Referenced by LLNotifyBox().

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

Definition at line 161 of file llnotify.h.

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


The documentation for this class was generated from the following files:

Generated on Fri May 16 08:54:40 2008 for SecondLife by  doxygen 1.5.5