LLComboBox Class Reference

#include <llcombobox.h>

Inheritance diagram for LLComboBox:

Inheritance graph
[legend]
Collaboration diagram for LLComboBox:

Collaboration graph
[legend]

List of all members.

Public Types

enum  e_preferred_position { ABOVE, BELOW }
typedef enum
LLComboBox::e_preferred_position 
EPreferredPosition

Public Member Functions

 LLComboBox (const LLString &name, const LLRect &rect, const LLString &label, void(*commit_callback)(LLUICtrl *, void *)=NULL, void *callback_userdata=NULL)
virtual ~LLComboBox ()
virtual LLXMLNodePtr getXML (bool save_children=true) const
virtual void draw ()
virtual void onFocusLost ()
virtual void onLostTop ()
virtual void setEnabled (BOOL enabled)
virtual BOOL handleToolTip (S32 x, S32 y, LLString &msg, LLRect *sticky_rect)
virtual BOOL handleKeyHere (KEY key, MASK mask)
virtual BOOL handleUnicodeCharHere (llwchar uni_char)
virtual void clear ()
virtual void onCommit ()
virtual BOOL acceptsTextInput () const
virtual BOOL isDirty () const
virtual void resetDirty ()
virtual void setFocus (BOOL b)
virtual void setValue (const LLSD &value)
virtual LLSD getValue () const
void setAllowTextEntry (BOOL allow, S32 max_chars=50, BOOL make_tentative=TRUE)
void setTextEntry (const LLStringExplicit &text)
LLScrollListItemadd (const LLString &name, EAddPosition pos=ADD_BOTTOM, BOOL enabled=TRUE)
LLScrollListItemadd (const LLString &name, const LLUUID &id, EAddPosition pos=ADD_BOTTOM, BOOL enabled=TRUE)
LLScrollListItemadd (const LLString &name, void *userdata, EAddPosition pos=ADD_BOTTOM, BOOL enabled=TRUE)
LLScrollListItemadd (const LLString &name, LLSD value, EAddPosition pos=ADD_BOTTOM, BOOL enabled=TRUE)
LLScrollListItemaddSeparator (EAddPosition pos=ADD_BOTTOM)
BOOL remove (S32 index)
void removeall ()
void sortByName ()
BOOL setSimple (const LLStringExplicit &name)
const LLString getSimple () const
const LLString getSelectedItemLabel (S32 column=0) const
void setLabel (const LLStringExplicit &name)
BOOL remove (const LLString &name)
BOOL setCurrentByIndex (S32 index)
S32 getCurrentIndex () const
virtual void updateLayout ()
LLCtrlSelectionInterfacegetSelectionInterface ()
LLCtrlListInterfacegetListInterface ()
virtual S32 getItemCount () const
virtual void addColumn (const LLSD &column, EAddPosition pos=ADD_BOTTOM)
virtual void clearColumns ()
virtual void setColumnLabel (const LLString &column, const LLString &label)
virtual LLScrollListItemaddElement (const LLSD &value, EAddPosition pos=ADD_BOTTOM, void *userdata=NULL)
virtual LLScrollListItemaddSimpleElement (const LLString &value, EAddPosition pos=ADD_BOTTOM, const LLSD &id=LLSD())
virtual void clearRows ()
virtual void sortByColumn (LLString name, BOOL ascending)
virtual BOOL getCanSelect () const
virtual BOOL selectFirstItem ()
virtual BOOL selectNthItem (S32 index)
virtual BOOL selectItemRange (S32 first, S32 last)
virtual S32 getFirstSelectedIndex () const
virtual BOOL setCurrentByID (const LLUUID &id)
virtual LLUUID getCurrentID () const
virtual BOOL setSelectedByValue (const LLSD &value, BOOL selected)
virtual LLSD getSelectedValue ()
virtual BOOL isSelected (const LLSD &value) const
virtual BOOL operateOnSelection (EOperation op)
virtual BOOL operateOnAll (EOperation op)
void * getCurrentUserdata ()
void setPrearrangeCallback (void(*cb)(LLUICtrl *, void *))
void setTextEntryCallback (void(*cb)(LLLineEditor *, void *))
void setButtonVisible (BOOL visible)
void updateSelection ()
virtual void showList ()
virtual void hideList ()

Static Public Member Functions

static LLViewfromXML (LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
static void onButtonDown (void *userdata)
static void onItemSelected (LLUICtrl *item, void *userdata)
static void onTextEntry (LLLineEditor *line_editor, void *user_data)
static void onTextCommit (LLUICtrl *caller, void *user_data)

Protected Attributes

LLButtonmButton
LLScrollListCtrlmList
EPreferredPosition mListPosition
LLPointer< LLUIImagemArrowImage

Private Attributes

S32 mButtonPadding
LLLineEditormTextEntry
BOOL mAllowTextEntry
S32 mMaxChars
BOOL mTextEntryTentative
void(* mPrearrangeCallback )(LLUICtrl *, void *)
void(* mTextEntryCallback )(LLLineEditor *, void *)


Detailed Description

Definition at line 56 of file llcombobox.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
ABOVE 
BELOW 

Definition at line 60 of file llcombobox.h.


Constructor & Destructor Documentation

LLComboBox::LLComboBox ( const LLString name,
const LLRect rect,
const LLString label,
void(*)(LLUICtrl *, void *)  commit_callback = NULL,
void *  callback_userdata = NULL 
)

LLComboBox::~LLComboBox (  )  [virtual]

Definition at line 112 of file llcombobox.cpp.


Member Function Documentation

LLXMLNodePtr LLComboBox::getXML ( bool  save_children = true  )  const [virtual]

LLView * LLComboBox::fromXML ( LLXMLNodePtr  node,
LLView parent,
LLUICtrlFactory factory 
) [static]

Reimplemented from LLUICtrl.

Reimplemented in LLFlyoutButton.

Definition at line 150 of file llcombobox.cpp.

References add(), LLView::createRect(), FALSE, LLUICtrl::initFromXML(), LLComboBox(), llendl, llerrs, LLPointer< Type >::notNull(), NULL, S32, selectFirstItem(), and setAllowTextEntry().

Here is the call graph for this function:

void LLComboBox::draw ( void   )  [virtual]

Reimplemented from LLView.

Reimplemented in LLFlyoutButton, and LLColumnHeader.

Definition at line 454 of file llcombobox.cpp.

References LLView::draw(), LLView::getEnabled(), mButton, and LLView::setEnabled().

Referenced by LLColumnHeader::draw(), and LLFlyoutButton::draw().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLComboBox::onFocusLost (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 422 of file llcombobox.cpp.

References getCurrentIndex(), hideList(), mAllowTextEntry, mTextEntry, LLUICtrl::onFocusLost(), and LLLineEditor::selectAll().

Here is the call graph for this function:

void LLComboBox::onLostTop (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 433 of file llcombobox.cpp.

References hideList().

Here is the call graph for this function:

void LLComboBox::setEnabled ( BOOL  enabled  )  [virtual]

BOOL LLComboBox::handleToolTip ( S32  x,
S32  y,
LLString msg,
LLRect sticky_rect 
) [virtual]

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

BOOL LLComboBox::handleUnicodeCharHere ( llwchar  uni_char  )  [virtual]

void LLComboBox::clear ( void   )  [virtual]

void LLComboBox::onCommit (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 225 of file llcombobox.cpp.

References FALSE, getCurrentIndex(), getSimple(), mAllowTextEntry, mTextEntry, LLUICtrl::onCommit(), LLUICtrl::setTentative(), and LLLineEditor::setValue().

Referenced by LLFlyoutButton::onActionButtonClick().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual BOOL LLComboBox::acceptsTextInput (  )  const [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 93 of file llcombobox.h.

References mAllowTextEntry.

BOOL LLComboBox::isDirty (  )  const [virtual]

Reimplemented from LLUICtrl.

Definition at line 238 of file llcombobox.cpp.

References FALSE, LLScrollListCtrl::isDirty(), and mList.

Referenced by LLPanelClassified::checkDirty(), and LLPanelLogin::getServer().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLComboBox::resetDirty (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 249 of file llcombobox.cpp.

References mList, and LLScrollListCtrl::resetDirty().

Referenced by LLPanelClassified::resetDirty().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLComboBox::setFocus ( BOOL  b  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 962 of file llcombobox.cpp.

References LLScrollListCtrl::clearSearchString(), LLView::getVisible(), mList, LLScrollListCtrl::setFocus(), LLUICtrl::setFocus(), and TRUE.

Here is the call graph for this function:

void LLComboBox::setValue ( const LLSD value  )  [virtual]

Reimplemented from LLView.

Definition at line 321 of file llcombobox.cpp.

References LLScrollListCtrl::getFirstSelected(), LLScrollListCtrl::getSelectedItemLabel(), mList, LLCtrlSelectionInterface::selectByValue(), and setLabel().

Referenced by LLPanelLandMedia::setMediaType(), and LLToolBar::updateCommunicateList().

Here is the call graph for this function:

Here is the caller graph for this function:

LLSD LLComboBox::getValue (  )  const [virtual]

void LLComboBox::setAllowTextEntry ( BOOL  allow,
S32  max_chars = 50,
BOOL  make_tentative = TRUE 
)

Definition at line 819 of file llcombobox.cpp.

References mAllowTextEntry, mMaxChars, mTextEntryTentative, and updateLayout().

Referenced by fromXML(), and LLPanelLogin::LLPanelLogin().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLComboBox::setTextEntry ( const LLStringExplicit text  ) 

Definition at line 828 of file llcombobox.cpp.

References mTextEntry, LLLineEditor::setText(), and updateSelection().

Referenced by LLPanelLogin::LLPanelLogin(), LLPanelGeneral::postBuild(), and LLPanelLogin::refreshLocation().

Here is the call graph for this function:

Here is the caller graph for this function:

LLScrollListItem * LLComboBox::add ( const LLString name,
EAddPosition  pos = ADD_BOTTOM,
BOOL  enabled = TRUE 
)

LLScrollListItem * LLComboBox::add ( const LLString name,
const LLUUID id,
EAddPosition  pos = ADD_BOTTOM,
BOOL  enabled = TRUE 
)

Definition at line 268 of file llcombobox.cpp.

References LLScrollListCtrl::addSimpleElement(), mList, LLScrollListCtrl::selectFirstItem(), and LLScrollListItem::setEnabled().

Here is the call graph for this function:

LLScrollListItem * LLComboBox::add ( const LLString name,
void *  userdata,
EAddPosition  pos = ADD_BOTTOM,
BOOL  enabled = TRUE 
)

LLScrollListItem * LLComboBox::add ( const LLString name,
LLSD  value,
EAddPosition  pos = ADD_BOTTOM,
BOOL  enabled = TRUE 
)

Definition at line 287 of file llcombobox.cpp.

References LLScrollListCtrl::addSimpleElement(), mList, LLScrollListCtrl::selectFirstItem(), and LLScrollListItem::setEnabled().

Here is the call graph for this function:

LLScrollListItem * LLComboBox::addSeparator ( EAddPosition  pos = ADD_BOTTOM  ) 

Definition at line 295 of file llcombobox.cpp.

References LLScrollListCtrl::addSeparator(), and mList.

Referenced by LLToolBar::updateCommunicateList().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLComboBox::remove ( S32  index  ) 

void LLComboBox::removeall (  )  [inline]

void LLComboBox::sortByName (  ) 

Definition at line 300 of file llcombobox.cpp.

References mList, LLScrollListCtrl::sortByColumn(), and TRUE.

Referenced by LLFloaterWindLight::newPromptCallback(), LLFloaterWater::newPromptCallback(), LLScriptEdCore::onBtnDynamicHelp(), and LLFloaterSettingsDebug::postBuild().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLComboBox::setSimple ( const LLStringExplicit name  ) 

const LLString LLComboBox::getSimple (  )  const

const LLString LLComboBox::getSelectedItemLabel ( S32  column = 0  )  const

Definition at line 347 of file llcombobox.cpp.

References LLScrollListCtrl::getSelectedItemLabel(), and mList.

Referenced by LLFloaterReporter::gatherReport(), handleToolTip(), LLFloaterWindLight::onSavePreset(), and LLFloaterWater::onSavePreset().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLComboBox::setLabel ( const LLStringExplicit name  ) 

BOOL LLComboBox::remove ( const LLString name  ) 

BOOL LLComboBox::setCurrentByIndex ( S32  index  ) 

S32 LLComboBox::getCurrentIndex (  )  const

void LLComboBox::updateLayout (  )  [virtual]

LLCtrlSelectionInterface* LLComboBox::getSelectionInterface (  )  [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 139 of file llcombobox.h.

LLCtrlListInterface* LLComboBox::getListInterface (  )  [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 140 of file llcombobox.h.

Referenced by LLChatBar::refresh(), and LLChatBar::refreshGestures().

Here is the caller graph for this function:

S32 LLComboBox::getItemCount (  )  const [virtual]

void LLComboBox::addColumn ( const LLSD column,
EAddPosition  pos = ADD_BOTTOM 
) [virtual]

Implements LLCtrlListInterface.

Definition at line 984 of file llcombobox.cpp.

References LLScrollListCtrl::addColumn(), LLScrollListCtrl::clearColumns(), and mList.

Here is the call graph for this function:

void LLComboBox::clearColumns (  )  [virtual]

Implements LLCtrlListInterface.

Definition at line 990 of file llcombobox.cpp.

References LLScrollListCtrl::clearColumns(), and mList.

Here is the call graph for this function:

void LLComboBox::setColumnLabel ( const LLString column,
const LLString label 
) [virtual]

Implements LLCtrlListInterface.

Definition at line 995 of file llcombobox.cpp.

References mList, and LLScrollListCtrl::setColumnLabel().

Here is the call graph for this function:

LLScrollListItem * LLComboBox::addElement ( const LLSD value,
EAddPosition  pos = ADD_BOTTOM,
void *  userdata = NULL 
) [virtual]

Implements LLCtrlListInterface.

Definition at line 1000 of file llcombobox.cpp.

References LLScrollListCtrl::addElement(), and mList.

Referenced by LLScriptEdCore::addHelpItemToHistory().

Here is the call graph for this function:

Here is the caller graph for this function:

LLScrollListItem * LLComboBox::addSimpleElement ( const LLString value,
EAddPosition  pos = ADD_BOTTOM,
const LLSD id = LLSD() 
) [virtual]

Implements LLCtrlListInterface.

Definition at line 1005 of file llcombobox.cpp.

References LLScrollListCtrl::addSimpleElement(), and mList.

Here is the call graph for this function:

void LLComboBox::clearRows (  )  [virtual]

Implements LLCtrlListInterface.

Definition at line 1010 of file llcombobox.cpp.

References LLScrollListCtrl::clearRows(), and mList.

Referenced by operateOnAll(), and removeall().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLComboBox::sortByColumn ( LLString  name,
BOOL  ascending 
) [virtual]

Implements LLCtrlListInterface.

Definition at line 1015 of file llcombobox.cpp.

virtual BOOL LLComboBox::getCanSelect (  )  const [inline, virtual]

Implements LLCtrlSelectionInterface.

Definition at line 155 of file llcombobox.h.

References TRUE.

virtual BOOL LLComboBox::selectFirstItem (  )  [inline, virtual]

Implements LLCtrlSelectionInterface.

Definition at line 156 of file llcombobox.h.

References setCurrentByIndex().

Referenced by LLScriptEdCore::addHelpItemToHistory(), fromXML(), LLFloaterDayCycle::LLFloaterDayCycle(), LLFloaterWindLight::newPromptCallback(), and LLFloaterWorldMap::postBuild().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual BOOL LLComboBox::selectNthItem ( S32  index  )  [inline, virtual]

Implements LLCtrlSelectionInterface.

Definition at line 157 of file llcombobox.h.

References setCurrentByIndex().

Referenced by LLFloaterSnapshot::Impl::updateControls().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLComboBox::selectItemRange ( S32  first,
S32  last 
) [virtual]

Implements LLCtrlSelectionInterface.

Definition at line 1078 of file llcombobox.cpp.

References mList, and LLScrollListCtrl::selectItemRange().

Here is the call graph for this function:

virtual S32 LLComboBox::getFirstSelectedIndex (  )  const [inline, virtual]

Implements LLCtrlSelectionInterface.

Definition at line 159 of file llcombobox.h.

References getCurrentIndex().

Here is the call graph for this function:

BOOL LLComboBox::setCurrentByID ( const LLUUID id  )  [virtual]

Implements LLCtrlSelectionInterface.

Definition at line 1022 of file llcombobox.cpp.

References LLScrollListCtrl::getSelectedItemLabel(), mList, LLScrollListCtrl::selectByID(), and setLabel().

Referenced by LLPreviewGesture::refresh(), LLPanelGroupInvite::update(), LLPanelGroupGeneral::update(), and LLPanelGroupInvite::updateLists().

Here is the call graph for this function:

Here is the caller graph for this function:

LLUUID LLComboBox::getCurrentID (  )  const [virtual]

Implements LLCtrlSelectionInterface.

Definition at line 1034 of file llcombobox.cpp.

References LLScrollListCtrl::getStringUUIDSelectedItem(), and mList.

Referenced by LLFloaterChat::onClickMute(), LLPanelGroupInvite::impl::submitInvitations(), and LLPanelGroupInvite::update().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLComboBox::setSelectedByValue ( const LLSD value,
BOOL  selected 
) [virtual]

Implements LLCtrlSelectionInterface.

Definition at line 1038 of file llcombobox.cpp.

References LLScrollListCtrl::getSelectedItemLabel(), mList, setLabel(), and LLScrollListCtrl::setSelectedByValue().

Referenced by LLFloaterWindLight::newPromptCallback(), and LLFloaterWater::newPromptCallback().

Here is the call graph for this function:

Here is the caller graph for this function:

LLSD LLComboBox::getSelectedValue (  )  [virtual]

BOOL LLComboBox::isSelected ( const LLSD value  )  const [virtual]

Implements LLCtrlSelectionInterface.

Definition at line 1053 of file llcombobox.cpp.

References LLScrollListCtrl::isSelected(), and mList.

Here is the call graph for this function:

BOOL LLComboBox::operateOnSelection ( EOperation  op  )  [virtual]

Implements LLCtrlSelectionInterface.

Definition at line 1058 of file llcombobox.cpp.

References LLScrollListCtrl::deleteSelectedItems(), FALSE, mList, LLCtrlSelectionInterface::OP_DELETE, and TRUE.

Here is the call graph for this function:

BOOL LLComboBox::operateOnAll ( EOperation  op  )  [virtual]

Implements LLCtrlSelectionInterface.

Definition at line 1068 of file llcombobox.cpp.

References clearRows(), FALSE, LLCtrlSelectionInterface::OP_DELETE, and TRUE.

Here is the call graph for this function:

void * LLComboBox::getCurrentUserdata (  ) 

Definition at line 540 of file llcombobox.cpp.

References LLScrollListCtrl::getFirstSelected(), LLScrollListItem::getUserdata(), mList, and NULL.

Referenced by LLFloaterSettingsDebug::draw(), LLFloaterSettingsDebug::onClickDefault(), LLFloaterSettingsDebug::onCommitSettings(), and LLFloaterSettingsDebug::onSettingSelect().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLComboBox::setPrearrangeCallback ( void(*)(LLUICtrl *, void *)  cb  )  [inline]

Definition at line 172 of file llcombobox.h.

References mPrearrangeCallback.

Referenced by LLFloaterWorldMap::postBuild().

Here is the caller graph for this function:

void LLComboBox::setTextEntryCallback ( void(*)(LLLineEditor *, void *)  cb  )  [inline]

Definition at line 173 of file llcombobox.h.

References mTextEntryCallback.

Referenced by LLPanelGeneral::postBuild(), LLPanelDisplay::postBuild(), and LLFloaterWorldMap::postBuild().

Here is the caller graph for this function:

void LLComboBox::setButtonVisible ( BOOL  visible  ) 

void LLComboBox::onButtonDown ( void *  userdata  )  [static]

Definition at line 671 of file llcombobox.cpp.

References gFocusMgr, LLFocusMgr::setMouseCapture(), and TRUE.

Referenced by LLComboBox().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLComboBox::onItemSelected ( LLUICtrl item,
void *  userdata 
) [static]

Definition at line 710 of file llcombobox.cpp.

References gFocusMgr, S32, and LLFocusMgr::setKeyboardFocus().

Referenced by LLComboBox().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLComboBox::onTextEntry ( LLLineEditor line_editor,
void *  user_data 
) [static]

Definition at line 838 of file llcombobox.cpp.

References LLKeyboard::currentKey(), FALSE, LLLineEditor::getText(), gKeyboard, KEY_BACKSPACE, KEY_DELETE, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP, llmax(), llmin(), LLUICtrl::mCallbackUserData, LLLineEditor::selectAll(), and LLUICtrl::setTentative().

Referenced by updateLayout().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLComboBox::onTextCommit ( LLUICtrl caller,
void *  user_data 
) [static]

Definition at line 953 of file llcombobox.cpp.

Referenced by updateLayout().

Here is the caller graph for this function:

void LLComboBox::updateSelection (  ) 

void LLComboBox::showList (  )  [virtual]

void LLComboBox::hideList (  )  [virtual]


Member Data Documentation

Definition at line 190 of file llcombobox.h.

Referenced by LLColumnHeader::draw(), LLComboBox(), setButtonVisible(), and updateLayout().

Definition at line 193 of file llcombobox.h.

Definition at line 196 of file llcombobox.h.

Referenced by getXML(), setAllowTextEntry(), and updateLayout().

Definition at line 197 of file llcombobox.h.

Referenced by setAllowTextEntry(), setLabel(), and updateSelection().

void(* LLComboBox::mPrearrangeCallback)(LLUICtrl *, void *) [private]

void(* LLComboBox::mTextEntryCallback)(LLLineEditor *, void *) [private]

Referenced by setTextEntryCallback().


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

Generated on Fri May 16 08:43:05 2008 for SecondLife by  doxygen 1.5.5