LLAlertDialog Class Reference

#include <llalertdialog.h>

Inheritance diagram for LLAlertDialog:

Inheritance graph
[legend]
Collaboration diagram for LLAlertDialog:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { IGNORE_USE_DEFAULT = 1, IGNORE_USE_SAVED = 2, IGNORE_SHOW_AGAIN = 3 }
typedef void(* alert_callback_t )(S32 option, void *user_data)
typedef void(* alert_text_callback_t )(S32 option, const LLString &text, void *user_data)
typedef bool(* display_callback_t )(S32 modal)
typedef std::map< LLString,
LLPointer
< LLAlertDialogTemplate > > 
template_map_t

Public Member Functions

 LLAlertDialog (const LLAlertDialogTemplate *xml_template, const LLString::format_map_t &args, alert_callback_t callback=NULL, void *user_data=NULL)
virtual BOOL handleKeyHere (KEY key, MASK mask)
virtual void draw ()
virtual void setVisible (BOOL visible)
virtual void onClose (bool app_quitting)
bool setCheckBox (const LLString &, const LLString &)
void setOptionEnabled (S32 option, BOOL enable)
void setCaution (BOOL val=TRUE)
void setUnique (BOOL val=TRUE)
void setEditTextCallback (alert_text_callback_t callback, void *user_data)
void setEditTextArgs (const LLString::format_map_t &edit_args)
void setDrawAsterixes (BOOL enable)
bool show ()
void format (LLString &msg, const LLString::format_map_t &args)

Static Public Member Functions

static void setURLLoader (URLLoader *loader)
static void onButtonPressed (void *userdata)
static LLAlertDialogcreateXml (const LLString &xml_desc, alert_callback_t callback=NULL, void *user_data=NULL)
static LLAlertDialogcreateXml (const LLString &xml_desc, const LLString::format_map_t &args, alert_callback_t callback=NULL, void *user_data=NULL)
static LLAlertDialogshowXml (const LLString &xml_desc, alert_callback_t callback=NULL, void *user_data=NULL)
static LLAlertDialogshowXml (const LLString &xml_desc, const LLString::format_map_t &args, alert_callback_t callback=NULL, void *user_data=NULL)
static LLAlertDialogshowCritical (const LLString &msg, alert_callback_t callback=NULL, void *user_data=NULL)
static bool parseAlerts (const LLString &xml_filename, LLControlGroup *settings=NULL, BOOL settings_only=FALSE)
static const LLStringgetTemplateMessage (const LLString &xml_desc)
static void setDisplayCallback (display_callback_t callback)

Static Public Attributes

static LLControlGroupsSettings = NULL
static template_map_t sAlertTemplates
static template_map_t sIgnorableTemplates

Private Member Functions

void createDialog (const std::vector< LLString > *options, S32 default_option, const LLString &msg, const LLString::format_map_t &args, const LLString &edit_text)
virtual ~LLAlertDialog ()
void handleCallbacks ()
BOOL hasTitleBar () const

Private Attributes

struct LLAlertDialog::ButtonDatamButtonData
alert_callback_t mCallback
void * mUserData
S32 mNumOptions
S32 mDefaultOption
BOOL mOptionChosen
LLCheckBoxCtrlmCheck
BOOL mCaution
BOOL mUnique
S32 mIgnorable
LLString mLabel
LLString mIgnoreLabel
LLFrameTimer mDefaultBtnTimer
LLLineEditormLineEditor
alert_text_callback_t mTextCallback
LLString mURL
S32 mURLOption

Static Private Attributes

static std::map< LLString,
LLAlertDialog * > 
sUniqueActiveMap
static display_callback_t sDisplayCallback
static LLString sStringSkipNextTime
static LLString sStringAlwaysChoose
static URLLoadersURLLoader

Classes

struct  ButtonData
class  URLLoader


Detailed Description

Definition at line 46 of file llalertdialog.h.


Member Typedef Documentation

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)

Definition at line 113 of file llalertdialog.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
IGNORE_USE_DEFAULT 
IGNORE_USE_SAVED 
IGNORE_SHOW_AGAIN 

Definition at line 52 of file llalertdialog.h.


Constructor & Destructor Documentation

LLAlertDialog::LLAlertDialog ( const LLAlertDialogTemplate xml_template,
const LLString::format_map_t args,
alert_callback_t  callback = NULL,
void *  user_data = NULL 
)

LLAlertDialog::~LLAlertDialog (  )  [private, virtual]

Definition at line 453 of file llalertdialog.cpp.

References mButtonData, mLabel, mUnique, and sUniqueActiveMap.


Member Function Documentation

static void LLAlertDialog::setURLLoader ( URLLoader loader  )  [inline, static]

Definition at line 61 of file llalertdialog.h.

References sURLLoader.

Referenced by LLWeb::initClass().

Here is the caller graph for this function:

BOOL LLAlertDialog::handleKeyHere ( KEY  key,
MASK  mask 
) [virtual]

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.

Here is the call graph for this function:

void LLAlertDialog::draw ( void   )  [virtual]

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

Here is the call graph for this function:

void LLAlertDialog::onClose ( bool  app_quitting  )  [virtual]

Reimplemented from LLModalDialog.

Definition at line 447 of file llalertdialog.cpp.

References handleCallbacks(), and LLModalDialog::onClose().

Here is the call graph for this function:

bool LLAlertDialog::setCheckBox ( const LLString check_title,
const LLString check_control 
)

void LLAlertDialog::setOptionEnabled ( S32  option,
BOOL  enable 
)

Definition at line 568 of file llalertdialog.cpp.

References LLAlertDialog::ButtonData::mButton, mButtonData, mNumOptions, and LLView::setEnabled().

Here is the call graph for this function:

void LLAlertDialog::setCaution ( BOOL  val = TRUE  )  [inline]

Definition at line 79 of file llalertdialog.h.

References mCaution.

void LLAlertDialog::setUnique ( BOOL  val = TRUE  )  [inline]

Definition at line 81 of file llalertdialog.h.

References mUnique.

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

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

void LLAlertDialog::setDrawAsterixes ( BOOL  enable  ) 

Definition at line 603 of file llalertdialog.cpp.

References LLLineEditor::clear(), mLineEditor, and LLLineEditor::setDrawAsterixes().

Referenced by LLViewerWindow::alertXmlEditText().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLAlertDialog::show (  ) 

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the call graph for this function:

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

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

Here is the call graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLAlertDialog::parseAlerts ( const LLString xml_filename,
LLControlGroup settings = NULL,
BOOL  settings_only = FALSE 
) [static]

const LLString & LLAlertDialog::getTemplateMessage ( const LLString xml_desc  )  [static]

Definition at line 628 of file llalertdialog.cpp.

References sAlertTemplates.

Referenced by LLTaskInvFVBridge::buyItem(), and LLAppViewer::init().

Here is the caller graph for this function:

static void LLAlertDialog::setDisplayCallback ( display_callback_t  callback  )  [inline, static]

Definition at line 106 of file llalertdialog.h.

References sDisplayCallback.

Referenced by LLViewerWindow::LLViewerWindow().

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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]

void LLAlertDialog::handleCallbacks (  )  [private]

BOOL LLAlertDialog::hasTitleBar (  )  const [private]

Definition at line 509 of file llalertdialog.cpp.

References LLFloater::getTitle(), LLFloater::isCloseable(), and LLFloater::isMinimizeable().

Referenced by createDialog().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

std::map< LLString, LLAlertDialog * > LLAlertDialog::sUniqueActiveMap [static, private]

Definition at line 120 of file llalertdialog.h.

Referenced by show(), and ~LLAlertDialog().

Definition at line 121 of file llalertdialog.h.

Referenced by setDisplayCallback(), and show().

Definition at line 123 of file llalertdialog.h.

Referenced by LLAlertDialog(), and parseAlerts().

Definition at line 124 of file llalertdialog.h.

Referenced by LLAlertDialog(), and parseAlerts().

Definition at line 144 of file llalertdialog.h.

Referenced by handleCallbacks().

void* LLAlertDialog::mUserData [private]

Definition at line 145 of file llalertdialog.h.

Referenced by handleCallbacks(), and setEditTextCallback().

Definition at line 146 of file llalertdialog.h.

Referenced by createDialog(), and setOptionEnabled().

Definition at line 147 of file llalertdialog.h.

Referenced by draw(), and show().

Definition at line 148 of file llalertdialog.h.

Referenced by handleCallbacks(), onButtonPressed(), and show().

Definition at line 149 of file llalertdialog.h.

Referenced by handleCallbacks(), and setCheckBox().

Definition at line 150 of file llalertdialog.h.

Referenced by createDialog(), setCaution(), and show().

Definition at line 151 of file llalertdialog.h.

Referenced by setUnique(), show(), and ~LLAlertDialog().

Definition at line 152 of file llalertdialog.h.

Referenced by handleCallbacks(), setCheckBox(), and show().

Reimplemented from LLPanel.

Definition at line 153 of file llalertdialog.h.

Referenced by show(), and ~LLAlertDialog().

Definition at line 154 of file llalertdialog.h.

Referenced by handleCallbacks(), and show().

Definition at line 155 of file llalertdialog.h.

Referenced by draw(), and show().

Definition at line 158 of file llalertdialog.h.

Referenced by handleCallbacks(), and setEditTextCallback().

Definition at line 160 of file llalertdialog.h.

Referenced by format(), handleCallbacks(), and LLAlertDialog().

Definition at line 161 of file llalertdialog.h.

Referenced by handleCallbacks(), and LLAlertDialog().

Definition at line 164 of file llalertdialog.h.

Referenced by handleCallbacks(), and setURLLoader().


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

Generated on Fri May 16 08:38:56 2008 for SecondLife by  doxygen 1.5.5