LLButton Class Reference

#include <llbutton.h>

Inheritance diagram for LLButton:

Inheritance graph
[legend]
Collaboration diagram for LLButton:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLButton (const LLString &name, const LLRect &rect, const LLString &control_name=LLString(), void(*on_click)(void *)=NULL, void *data=NULL)
 LLButton (const LLString &name, const LLRect &rect, const LLString &unselected_image, const LLString &selected_image, const LLString &control_name, void(*click_callback)(void *), void *callback_data=NULL, const LLFontGL *mGLFont=NULL, const LLString &unselected_label=LLString::null, const LLString &selected_label=LLString::null)
virtual ~LLButton ()
void init (void(*click_callback)(void *), void *callback_data, const LLFontGL *font, const LLString &control_name)
virtual EWidgetType getWidgetType () const
virtual LLString getWidgetTag () const
void addImageAttributeToXML (LLXMLNodePtr node, const LLString &imageName, const LLUUID &imageID, const LLString &xmlTagName) const
virtual LLXMLNodePtr getXML (bool save_children=true) const
virtual BOOL handleUnicodeCharHere (llwchar uni_char, BOOL called_from_parent)
virtual BOOL handleKeyHere (KEY key, MASK mask, BOOL called_from_parent)
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual void draw ()
virtual void onMouseCaptureLost ()
virtual void onCommit ()
void setUnselectedLabelColor (const LLColor4 &c)
void setSelectedLabelColor (const LLColor4 &c)
void setClickedCallback (void(*cb)(void *data), void *data=NULL)
void setMouseDownCallback (void(*cb)(void *data))
void setMouseUpCallback (void(*cb)(void *data))
void setHeldDownCallback (void(*cb)(void *data))
void setHeldDownDelay (F32 seconds, S32 frames=0)
F32 getHeldDownTime () const
BOOL toggleState ()
BOOL getToggleState () const
void setToggleState (BOOL b)
void setFlashing (BOOL b)
BOOL getFlashing () const
void setHAlign (LLFontGL::HAlign align)
void setLeftHPad (S32 pad)
void setRightHPad (S32 pad)
const LLString getLabelUnselected () const
const LLString getLabelSelected () const
LLImageGLgetImageUnselected () const
void setImageColor (const LLString &color_control)
void setImages (const LLString &image_name, const LLString &selected_name)
void setImageColor (const LLColor4 &c)
void setDisabledImages (const LLString &image_name, const LLString &selected_name)
void setDisabledImages (const LLString &image_name, const LLString &selected_name, const LLColor4 &c)
void setHoverImages (const LLString &image_name, const LLString &selected_name)
void setDisabledImageColor (const LLColor4 &c)
void setDisabledSelectedLabelColor (const LLColor4 &c)
void setImageOverlay (const LLString &image_name, LLFontGL::HAlign alignment=LLFontGL::HCENTER, const LLColor4 &color=LLColor4::white)
LLPointer< LLImageGLgetImageOverlay ()
virtual void setValue (const LLSD &value)
virtual LLSD getValue () const
void setLabel (const LLStringExplicit &label)
virtual BOOL setLabelArg (const LLString &key, const LLStringExplicit &text)
void setLabelUnselected (const LLStringExplicit &label)
void setLabelSelected (const LLStringExplicit &label)
void setDisabledLabel (const LLStringExplicit &disabled_label)
void setDisabledSelectedLabel (const LLStringExplicit &disabled_label)
void setDisabledLabelColor (const LLColor4 &c)
void setFont (const LLFontGL *font)
void setScaleImage (BOOL scale)
void setDropShadowedText (BOOL b)
void setBorderEnabled (BOOL b)
void setFixedBorder (S32 width, S32 height)
void setHoverGlowStrength (F32 strength)
void setImageUnselected (const LLString &image_name)
void setImageSelected (const LLString &image_name)
void setImageHoverSelected (const LLString &image_name)
void setImageHoverUnselected (const LLString &image_name)
void setImageDisabled (const LLString &image_name)
void setImageDisabledSelected (const LLString &image_name)
void setCommitOnReturn (BOOL commit)
BOOL getCommitOnReturn ()
void setHelpURLCallback (std::string help_url)
LLString getHelpURL ()

Static Public Member Functions

static LLViewfromXML (LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
static void onHeldDown (void *userdata)

Protected Member Functions

virtual void drawBorder (const LLColor4 &color, S32 size)

Protected Attributes

void(* mClickedCallback )(void *data)
void(* mMouseDownCallback )(void *data)
void(* mMouseUpCallback )(void *data)
void(* mHeldDownCallback )(void *data)
const LLFontGLmGLFont
LLFrameTimer mMouseDownTimer
S32 mMouseDownFrame
F32 mHeldDownDelay
S32 mHeldDownFrameDelay
LLPointer< LLImageGLmImageOverlay
LLFontGL::HAlign mImageOverlayAlignment
LLColor4 mImageOverlayColor
LLPointer< LLImageGLmImageUnselected
LLUIString mUnselectedLabel
LLColor4 mUnselectedLabelColor
LLPointer< LLImageGLmImageSelected
LLUIString mSelectedLabel
LLColor4 mSelectedLabelColor
LLPointer< LLImageGLmImageHoverSelected
LLPointer< LLImageGLmImageHoverUnselected
LLPointer< LLImageGLmImageDisabled
LLUIString mDisabledLabel
LLColor4 mDisabledLabelColor
LLPointer< LLImageGLmImageDisabledSelected
LLUIString mDisabledSelectedLabel
LLColor4 mDisabledSelectedLabelColor
LLUUID mImageUnselectedID
LLUUID mImageSelectedID
LLUUID mImageHoverSelectedID
LLUUID mImageHoverUnselectedID
LLUUID mImageDisabledID
LLUUID mImageDisabledSelectedID
LLString mImageUnselectedName
LLString mImageSelectedName
LLString mImageHoverSelectedName
LLString mImageHoverUnselectedName
LLString mImageDisabledName
LLString mImageDisabledSelectedName
LLColor4 mHighlightColor
LLColor4 mUnselectedBgColor
LLColor4 mSelectedBgColor
LLColor4 mImageColor
LLColor4 mDisabledImageColor
BOOL mToggleState
BOOL mScaleImage
BOOL mDropShadowedText
BOOL mBorderEnabled
BOOL mFlashing
LLFontGL::HAlign mHAlign
S32 mLeftHPad
S32 mRightHPad
S32 mFixedWidth
S32 mFixedHeight
F32 mHoverGlowStrength
F32 mCurGlowStrength
BOOL mNeedsHighlight
BOOL mCommitOnReturn
LLString mHelpURL
LLPointer< LLImageGLmImagep

Static Protected Attributes

static LLFrameTimer sFlashingTimer

Private Member Functions

void setImageUnselectedID (const LLUUID &image_id)
void setImageSelectedID (const LLUUID &image_id)
void setImageHoverSelectedID (const LLUUID &image_id)
void setImageHoverUnselectedID (const LLUUID &image_id)
void setImageDisabledID (const LLUUID &image_id)
void setImageDisabledSelectedID (const LLUUID &image_id)

Detailed Description

Definition at line 66 of file llbutton.h.


Constructor & Destructor Documentation

LLButton::LLButton ( const LLString name,
const LLRect rect,
const LLString control_name = LLString(),
void(*)(void *)  on_click = NULL,
void data = NULL 
)

Definition at line 65 of file llbutton.cpp.

References LLControlGroup::getColor(), init(), mDisabledImageColor, mImageColor, mSelectedLabel, mUnselectedLabel, NULL, LLUI::sColorsGroup, setImageDisabled(), setImageDisabledSelected(), setImageSelected(), and setImageUnselected().

Referenced by fromXML().

LLButton::LLButton ( const LLString name,
const LLRect rect,
const LLString unselected_image,
const LLString selected_image,
const LLString control_name,
void(*)(void *)  click_callback,
void callback_data = NULL,
const LLFontGL mGLFont = NULL,
const LLString unselected_label = LLString::null,
const LLString selected_label = LLString::null 
)

Definition at line 112 of file llbutton.cpp.

References FALSE, LLControlGroup::getColor(), init(), mDisabledImageColor, mFixedHeight, mFixedWidth, mImageColor, mImageDisabled, mImageUnselected, mScaleImage, mSelectedLabel, mUnselectedLabel, LLColor4::mV, LLUI::sColorsGroup, setImageDisabled(), setImageDisabledSelected(), setImageSelected(), setImageUnselected(), and VALPHA.

LLButton::~LLButton (  )  [virtual]

Definition at line 227 of file llbutton.cpp.

References gFocusMgr, LLView::hasMouseCapture(), NULL, and LLFocusMgr::setMouseCapture().


Member Function Documentation

void LLButton::addImageAttributeToXML ( LLXMLNodePtr  node,
const LLString imageName,
const LLUUID imageID,
const LLString xmlTagName 
) const

Definition at line 991 of file llbutton.cpp.

References LLUUID::null, and TRUE.

Referenced by LLJoystick::getXML(), and getXML().

void LLButton::draw (  )  [virtual]

Reimplemented from LLView.

Reimplemented in LLJoystickCameraRotate, and LLJoystickCameraZoom.

Definition at line 421 of file llbutton.cpp.

References BORDER_SIZE, LLFontGL::BOTTOM, LLWindow::convertCoords(), drawBorder(), LLView::drawDebugRect(), LLFontGL::DROP_SHADOW_SOFT, LLUIString::empty(), f, FALSE, LLFocusMgr::getAppHasFocus(), LLRectBase< Type >::getCenterX(), LLRectBase< Type >::getCenterY(), LLWindow::getCursorPosition(), LLFrameTimer::getElapsedTimeF32(), LLFocusMgr::getFocusColor(), LLFocusMgr::getFocusFlashAmt(), LLRectBase< Type >::getHeight(), LLCriticalDamp::getInterpolant(), LLKeyboard::getKeyDown(), LLView::getLocalRect(), LLView::getVisible(), LLRectBase< Type >::getWidth(), LLView::getWindow(), gFocusMgr, gKeyboard, gl_draw_image(), gl_draw_scaled_image(), gl_draw_scaled_image_with_border(), gl_rect_2d(), glBlendFunc, LLUICtrl::hasFocus(), LLView::hasMouseCapture(), LLFontGL::HCENTER, LLPointer< Type >::isNull(), KEY_RETURN, LLFontGL::LEFT, lerp(), LLBUTTON_V_PAD, llendl, llmin(), llround(), llwarns, mBorderEnabled, mCommitOnReturn, mCurGlowStrength, mDisabledImageColor, mDisabledLabel, mDisabledLabelColor, mDisabledSelectedLabel, mDisabledSelectedLabelColor, mDropShadowedText, LLView::mEnabled, mFixedHeight, mFixedWidth, mFlashing, mGLFont, mHAlign, mHoverGlowStrength, mImageColor, mImageDisabled, mImageDisabledSelected, mImageHoverSelected, mImageHoverUnselected, mImageOverlay, mImageOverlayAlignment, mImageOverlayColor, mImagep, mImageSelected, mImageUnselected, mLeftHPad, LLView::mName, mNeedsHighlight, LLView::mRect, mRightHPad, mScaleImage, mSelectedLabel, mSelectedLabelColor, LLUICtrl::mTentative, mToggleState, mUnselectedLabel, mUnselectedLabelColor, LLVector2::mV, LLCoord::mX, LLCoord::mY, LLFontGL::NORMAL, LLPointer< Type >::notNull(), NULL, LLColor4::pink1, LLView::pointInView(), LLFontGL::render(), LLFontGL::RIGHT, S32, LLUI::sColorsGroup, LLView::screenPointToLocal(), LLView::sDebugRects, LLView::sEditingUI, LLView::sEditingUIView, sFlashingTimer, LLUI::sGLScaleFactor, LLStringBase< T >::trim(), TRUE, U32_MAX, VX, VY, and x.

Referenced by LLTabContainerVertical::draw().

void LLButton::drawBorder ( const LLColor4 color,
S32  size 
) [protected, virtual]

Definition at line 724 of file llbutton.cpp.

References bottom, FALSE, LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), gl_draw_scaled_image_with_border(), gl_rect_2d(), LLPointer< Type >::isNull(), left, mFixedHeight, mFixedWidth, mImagep, LLView::mRect, mScaleImage, right, S32, top, and TRUE.

Referenced by draw().

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

Reimplemented in LLJoystickAgentTurn, and LLJoystickAgentSlide.

Definition at line 1044 of file llbutton.cpp.

References FALSE, LLFontGL::hAlignFromName(), LLFontGL::HCENTER, LLUICtrl::initFromXML(), LLButton(), mFixedHeight, mFixedWidth, LLStringBase< char >::null, NULL, LLView::selectFont(), LLView::selectFontHAlign(), setHAlign(), setHelpURLCallback(), setImageDisabled(), setImageDisabledSelected(), setImageHoverSelected(), setImageHoverUnselected(), setImageOverlay(), setLabelSelected(), setLabelUnselected(), and setScaleImage().

BOOL LLButton::getCommitOnReturn (  )  [inline]

Definition at line 191 of file llbutton.h.

References mCommitOnReturn.

BOOL LLButton::getFlashing (  )  const [inline]

Definition at line 122 of file llbutton.h.

References mFlashing.

Referenced by LLTabContainerCommon::getTabPanelFlashing().

F32 LLButton::getHeldDownTime (  )  const [inline]

Definition at line 115 of file llbutton.h.

References LLFrameTimer::getElapsedTimeF32(), and mMouseDownTimer.

Referenced by LLFloaterMove::turnLeft(), and LLFloaterMove::turnRight().

LLString LLButton::getHelpURL (  )  [inline]

Definition at line 194 of file llbutton.h.

References mHelpURL.

LLPointer<LLImageGL> LLButton::getImageOverlay (  )  [inline]

Definition at line 149 of file llbutton.h.

References mImageOverlay.

LLImageGL* LLButton::getImageUnselected (  )  const [inline]

Definition at line 133 of file llbutton.h.

References mImageUnselected.

const LLString LLButton::getLabelSelected (  )  const [inline]

Definition at line 129 of file llbutton.h.

References mSelectedLabel, and wstring_to_utf8str().

Referenced by getXML(), LLComboBox::setAllowTextEntry(), LLColumnHeader::showList(), and LLFloaterEventLog::updateQuickButtons().

const LLString LLButton::getLabelUnselected (  )  const [inline]

Definition at line 128 of file llbutton.h.

References mUnselectedLabel, and wstring_to_utf8str().

Referenced by getXML(), and LLFloaterEditUI::refreshButton().

BOOL LLButton::getToggleState (  )  const [inline]

Definition at line 118 of file llbutton.h.

References mToggleState.

Referenced by LLCheckBoxCtrl::getValue(), LLCheckBoxCtrl::isDirty(), LLVoiceRemoteCtrl::onBtnLock(), LLCheckBoxCtrl::resetDirty(), and LLFloaterColorPicker::setActive().

LLSD LLButton::getValue (  )  const [virtual]

Reimplemented from LLUICtrl.

Definition at line 774 of file llbutton.cpp.

References mToggleState.

LLString LLButton::getWidgetTag (  )  const [virtual]

Implements LLView.

Reimplemented in LLJoystickAgentTurn, and LLJoystickAgentSlide.

Definition at line 242 of file llbutton.cpp.

References LL_BUTTON_TAG.

EWidgetType LLButton::getWidgetType (  )  const [virtual]

Implements LLView.

Reimplemented in LLJoystickAgentTurn, and LLJoystickAgentSlide.

Definition at line 236 of file llbutton.cpp.

References WIDGET_TYPE_BUTTON.

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

Reimplemented from LLUICtrl.

Reimplemented in LLJoystick.

Definition at line 1007 of file llbutton.cpp.

References addImageAttributeToXML(), getLabelSelected(), getLabelUnselected(), LLUICtrl::getXML(), mFixedHeight, mFixedWidth, mGLFont, mHAlign, mImageDisabledID, mImageDisabledName, mImageDisabledSelectedID, mImageDisabledSelectedName, mImageHoverSelectedID, mImageHoverSelectedName, mImageHoverUnselectedID, mImageHoverUnselectedName, mImageSelectedID, mImageSelectedName, mImageUnselectedID, mImageUnselectedName, mScaleImage, LLFontGL::nameFromFont(), LLFontGL::nameFromHAlign(), and TRUE.

BOOL LLButton::handleHover ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Reimplemented in LLJoystick.

Definition at line 380 of file llbutton.cpp.

References FALSE, LLFrameTimer::getElapsedTimeF32(), LLFrameTimer::getFrameCount(), LLFocusMgr::getMouseCapture(), LLView::getName(), LLFrameTimer::getStarted(), LLView::getVisible(), LLView::getWindow(), gFocusMgr, LLView::hasAncestor(), LLView::hasMouseCapture(), LLMouseHandler::isView(), lldebugst, llendl, LLUICtrl::mCallbackUserData, mHeldDownCallback, mHeldDownDelay, mHeldDownFrameDelay, mMouseDownFrame, mMouseDownTimer, mNeedsHighlight, NULL, LLWindow::setCursor(), TRUE, and UI_CURSOR_ARROW.

Referenced by LLTabContainer::handleDragAndDrop(), LLTabContainerVertical::handleHover(), LLTabContainer::handleHover(), and LLJoystick::handleHover().

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

Reimplemented from LLView.

Definition at line 298 of file llbutton.cpp.

References FALSE, LLKeyboard::getKeyRepeated(), LLView::getVisible(), gKeyboard, KEY_RETURN, MASK_NONE, LLUICtrl::mCallbackUserData, mClickedCallback, mCommitOnReturn, LLView::mEnabled, and TRUE.

BOOL LLButton::handleMouseDown ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Reimplemented in LLJoystick, LLJoystickCameraRotate, and LLJoystickCameraZoom.

Definition at line 316 of file llbutton.cpp.

References LLFrameTimer::getFrameCount(), LLUICtrl::getIsChrome(), gFocusMgr, LLUICtrl::hasTabStop(), make_ui_sound(), LLUICtrl::mCallbackUserData, mMouseDownCallback, mMouseDownFrame, mMouseDownTimer, LLView::MOUSE_DOWN, LLView::mSoundFlags, LLUICtrl::setFocus(), LLFocusMgr::setMouseCapture(), LLFrameTimer::start(), and TRUE.

Referenced by LLTabContainerVertical::handleMouseDown(), LLTabContainer::handleMouseDown(), and LLJoystick::handleMouseDown().

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

Reimplemented from LLView.

Reimplemented in LLJoystick.

Definition at line 343 of file llbutton.cpp.

References gFocusMgr, LLView::hasMouseCapture(), make_ui_sound(), LLUICtrl::mCallbackUserData, mClickedCallback, mMouseDownTimer, mMouseUpCallback, LLView::MOUSE_UP, LLView::mSoundFlags, NULL, LLView::pointInView(), LLFrameTimer::reset(), LLFocusMgr::setMouseCapture(), LLFrameTimer::stop(), and TRUE.

Referenced by LLTabContainerVertical::handleMouseUp(), LLTabContainer::handleMouseUp(), and LLJoystick::handleMouseUp().

BOOL LLButton::handleUnicodeCharHere ( llwchar  uni_char,
BOOL  called_from_parent 
) [virtual]

Reimplemented from LLView.

Definition at line 284 of file llbutton.cpp.

References FALSE, LLKeyboard::getKeyRepeated(), LLView::getVisible(), gKeyboard, LLUICtrl::mCallbackUserData, mClickedCallback, LLView::mEnabled, and TRUE.

void LLButton::init ( void(*)(void *)  click_callback,
void callback_data,
const LLFontGL font,
const LLString control_name 
)

Definition at line 198 of file llbutton.cpp.

References LLControlGroup::getColor(), LLFontGL::getWidth(), LLRectBase< Type >::getWidth(), LLFontGL::HCENTER, LLBUTTON_ORIG_H_PAD, LLUICtrl::mCallbackUserData, mDisabledLabelColor, mDisabledSelectedLabelColor, mGLFont, mHighlightColor, mImageOverlayAlignment, mImageOverlayColor, mLeftHPad, mMouseDownTimer, LLView::mRect, mRightHPad, mSelectedBgColor, mSelectedLabelColor, mUnselectedBgColor, mUnselectedLabelColor, NULL, LLUI::sColorsGroup, LLView::setControlName(), LLFontGL::sSansSerif, LLFrameTimer::stop(), and LLColor4::white.

Referenced by LLButton().

void LLButton::onCommit (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 249 of file llbutton.cpp.

References make_ui_sound(), LLUICtrl::mCallbackUserData, mClickedCallback, mMouseDownCallback, mMouseUpCallback, LLView::MOUSE_DOWN, LLView::MOUSE_UP, LLView::mSoundFlags, and LLUICtrl::onCommit().

Referenced by LLPanel::handleKeyHere().

static void LLButton::onHeldDown ( void userdata  )  [static]

Reimplemented in LLJoystick.

void LLButton::onMouseCaptureLost (  )  [virtual]

Reimplemented from LLView.

Definition at line 903 of file llbutton.cpp.

References mMouseDownTimer, LLFrameTimer::reset(), and LLFrameTimer::stop().

void LLButton::setBorderEnabled ( BOOL  b  )  [inline]

Definition at line 169 of file llbutton.h.

References mBorderEnabled.

Referenced by LLPanel::draw(), LLFloater::draw(), and LLPanel::setDefaultBtn().

void LLButton::setClickedCallback ( void(*)(void *data)  cb,
void data = NULL 
)

Referenced by LLPanel::childSetAction(), LLColumnHeader::LLColumnHeader(), LLGroupMoneyTabEventHandler::LLGroupMoneyTabEventHandler(), LLVoiceRemoteCtrl::LLVoiceRemoteCtrl(), LLPreviewGesture::postBuild(), LLPanelPlace::postBuild(), LLPanelPick::postBuild(), LLPanelGroupVoting::postBuild(), LLPanelGroupSubTab::postBuild(), LLPanelGroupNotices::postBuild(), LLPanelGroupLandMoney::postBuild(), LLPanelGroupInvite::postBuild(), LLPanelGroupGeneral::postBuild(), LLPanelGroup::postBuild(), LLPanelGroupTab::postBuild(), LLPanelEvent::postBuild(), LLPanelClassified::postBuild(), LLFloaterTools::postBuild(), LLFloaterSaveAvatar::postBuild(), LLPanelEstateCovenant::postBuild(), LLFloaterPreference::postBuild(), LLPanelLandBan::postBuild(), LLPanelLandAccess::postBuild(), LLPanelLandOptions::postBuild(), LLPanelLandObjects::postBuild(), LLPanelLandGeneral::postBuild(), LLFloaterImport::postBuild(), LLFloaterColorPicker::postBuild(), LLFloaterAnimPreview::postBuild(), LLPanelGroupRolesSubTab::postBuildSubTab(), LLPanelGroupMembersSubTab::postBuildSubTab(), LLViewChildren::setAction(), and setHelpURLCallback().

void LLButton::setCommitOnReturn ( BOOL  commit  )  [inline]

Definition at line 190 of file llbutton.h.

References mCommitOnReturn.

void LLButton::setDisabledImageColor ( const LLColor4 c  )  [inline]

Definition at line 144 of file llbutton.h.

References c, and mDisabledImageColor.

Referenced by LLNotifyBox::LLNotifyBox().

void LLButton::setDisabledImages ( const LLString image_name,
const LLString selected_name,
const LLColor4 c 
)

Definition at line 854 of file llbutton.cpp.

References c, mDisabledImageColor, setImageDisabled(), and setImageDisabledSelected().

void LLButton::setDisabledImages ( const LLString image_name,
const LLString selected_name 
)

Definition at line 868 of file llbutton.cpp.

References mImageColor, LLColor4::mV, and VALPHA.

Referenced by LLFloaterAnimPreview::postBuild().

void LLButton::setDisabledLabel ( const LLStringExplicit disabled_label  ) 

Definition at line 803 of file llbutton.cpp.

References mDisabledLabel.

Referenced by LLComboBox::clear(), and LLComboBox::setLabel().

void LLButton::setDisabledLabelColor ( const LLColor4 c  )  [inline]

Definition at line 161 of file llbutton.h.

References c, and mDisabledLabelColor.

void LLButton::setDisabledSelectedLabel ( const LLStringExplicit disabled_label  ) 

Definition at line 808 of file llbutton.cpp.

References mDisabledSelectedLabel.

Referenced by LLComboBox::clear(), and LLComboBox::setLabel().

void LLButton::setDisabledSelectedLabelColor ( const LLColor4 c  )  [inline]

Definition at line 146 of file llbutton.h.

References c, and mDisabledSelectedLabelColor.

void LLButton::setDropShadowedText ( BOOL  b  )  [inline]

Definition at line 167 of file llbutton.h.

References mDropShadowedText.

void LLButton::setFixedBorder ( S32  width,
S32  height 
) [inline]

Definition at line 173 of file llbutton.h.

References mFixedHeight, and mFixedWidth.

Referenced by LLTabContainerVertical::addTabPanel(), LLTabContainer::addTabPanel(), and LLFloaterAnimPreview::postBuild().

void LLButton::setFlashing ( BOOL  b  )  [inline]

Definition at line 121 of file llbutton.h.

References mFlashing.

Referenced by LLTabContainer::draw(), and LLTabContainerCommon::setTabPanelFlashing().

void LLButton::setFont ( const LLFontGL font  )  [inline]

Definition at line 163 of file llbutton.h.

References mGLFont, and LLFontGL::sSansSerif.

Referenced by LLComboBox::LLComboBox(), LLFloaterTestImpl::LLFloaterTestImpl(), and LLNotifyBox::LLNotifyBox().

void LLButton::setHAlign ( LLFontGL::HAlign  align  )  [inline]

Definition at line 124 of file llbutton.h.

References mHAlign.

Referenced by LLTabContainerVertical::addTabPanel(), LLTabContainer::addTabPanel(), LLJoystickAgentSlide::fromXML(), LLJoystickAgentTurn::fromXML(), fromXML(), and LLComboBox::LLComboBox().

void LLButton::setHeldDownCallback ( void(*)(void *data)  cb  )  [inline]

Definition at line 112 of file llbutton.h.

References mHeldDownCallback.

Referenced by LLTabContainerVertical::initButtons(), LLTabContainer::initButtons(), LLColumnHeader::LLColumnHeader(), LLFloaterMove::LLFloaterMove(), LLScrollbar::LLScrollbar(), LLScrollingPanelParam::LLScrollingPanelParam(), LLSpinCtrl::LLSpinCtrl(), and LLVoiceRemoteCtrl::LLVoiceRemoteCtrl().

void LLButton::setHeldDownDelay ( F32  seconds,
S32  frames = 0 
) [inline]

Definition at line 113 of file llbutton.h.

References mHeldDownDelay, and mHeldDownFrameDelay.

Referenced by LLColumnHeader::LLColumnHeader(), LLFloaterCamera::LLFloaterCamera(), LLFloaterMove::LLFloaterMove(), and LLScrollingPanelParam::LLScrollingPanelParam().

void LLButton::setHelpURLCallback ( std::string  help_url  ) 

Definition at line 1145 of file llbutton.cpp.

References clicked_help(), mHelpURL, and setClickedCallback().

Referenced by fromXML().

void LLButton::setHoverGlowStrength ( F32  strength  )  [inline]

Definition at line 174 of file llbutton.h.

References mHoverGlowStrength.

void LLButton::setHoverImages ( const LLString image_name,
const LLString selected_name 
)

Definition at line 881 of file llbutton.cpp.

References setImageHoverSelected(), and setImageHoverUnselected().

Referenced by LLFloater::buildButtons().

void LLButton::setImageColor ( const LLColor4 c  ) 

Definition at line 832 of file llbutton.cpp.

References c, and mImageColor.

void LLButton::setImageColor ( const LLString color_control  ) 

Referenced by LLFloater::buildButtons(), and LLNotifyBox::LLNotifyBox().

void LLButton::setImageDisabled ( const LLString image_name  ) 

Definition at line 979 of file llbutton.cpp.

References LLUI::findAssetUUIDByName(), mImageDisabledName, and setImageDisabledID().

Referenced by fromXML(), LLButton(), LLSquareButton::LLSquareButton(), and setDisabledImages().

void LLButton::setImageDisabledID ( const LLUUID image_id  )  [private]

Definition at line 838 of file llbutton.cpp.

References LLImageProviderInterface::getUIImageByID(), mDisabledImageColor, mImageColor, mImageDisabled, mImageDisabledName, LLColor4::mV, LLUI::sImageProvider, and VALPHA.

Referenced by setImageDisabled().

void LLButton::setImageDisabledSelected ( const LLString image_name  ) 

Definition at line 985 of file llbutton.cpp.

References LLUI::findAssetUUIDByName(), mImageDisabledSelectedName, and setImageDisabledSelectedID().

Referenced by fromXML(), LLButton(), LLSquareButton::LLSquareButton(), and setDisabledImages().

void LLButton::setImageDisabledSelectedID ( const LLUUID image_id  )  [private]

Definition at line 846 of file llbutton.cpp.

References LLImageProviderInterface::getUIImageByID(), mDisabledImageColor, mImageColor, mImageDisabledSelected, mImageDisabledSelectedName, LLColor4::mV, LLUI::sImageProvider, and VALPHA.

Referenced by setImageDisabledSelected().

void LLButton::setImageHoverSelected ( const LLString image_name  ) 

Definition at line 967 of file llbutton.cpp.

References LLUI::findAssetUUIDByName(), mImageHoverSelectedName, and setImageHoverSelectedID().

Referenced by fromXML(), and setHoverImages().

void LLButton::setImageHoverSelectedID ( const LLUUID image_id  )  [private]

Definition at line 862 of file llbutton.cpp.

References LLImageProviderInterface::getUIImageByID(), mImageHoverSelected, mImageHoverSelectedName, and LLUI::sImageProvider.

Referenced by setImageHoverSelected().

void LLButton::setImageHoverUnselected ( const LLString image_name  ) 

Definition at line 973 of file llbutton.cpp.

References LLUI::findAssetUUIDByName(), mImageHoverUnselectedName, and setImageHoverUnselectedID().

Referenced by fromXML(), and setHoverImages().

void LLButton::setImageHoverUnselectedID ( const LLUUID image_id  )  [private]

Definition at line 875 of file llbutton.cpp.

References LLImageProviderInterface::getUIImageByID(), mImageHoverUnselected, mImageHoverUnselectedName, and LLUI::sImageProvider.

Referenced by setImageHoverUnselected().

void LLButton::setImageOverlay ( const LLString image_name,
LLFontGL::HAlign  alignment = LLFontGL::HCENTER,
const LLColor4 color = LLColor4::white 
)

Definition at line 887 of file llbutton.cpp.

References LLUI::findAssetUUIDByName(), LLImageProviderInterface::getUIImageByID(), mImageOverlay, mImageOverlayAlignment, mImageOverlayColor, NULL, and LLUI::sImageProvider.

Referenced by fromXML(), and LLTabContainerCommon::setTabImage().

void LLButton::setImages ( const LLString image_name,
const LLString selected_name 
)

Definition at line 819 of file llbutton.cpp.

References setImageSelected(), and setImageUnselected().

Referenced by LLFloaterColorPicker::postBuild(), LLFloaterAnimPreview::postBuild(), and LLFloaterAnimPreview::refresh().

void LLButton::setImageSelected ( const LLString image_name  ) 

Definition at line 961 of file llbutton.cpp.

References LLUI::findAssetUUIDByName(), mImageSelectedName, and setImageSelectedID().

Referenced by LLButton(), LLSquareButton::LLSquareButton(), LLColumnHeader::setImage(), and setImages().

void LLButton::setImageSelectedID ( const LLUUID image_id  )  [private]

Definition at line 826 of file llbutton.cpp.

References LLImageProviderInterface::getUIImageByID(), mImageSelected, mImageSelectedName, and LLUI::sImageProvider.

Referenced by setImageSelected().

void LLButton::setImageUnselected ( const LLString image_name  ) 

Definition at line 955 of file llbutton.cpp.

References LLUI::findAssetUUIDByName(), mImageUnselectedName, and setImageUnselectedID().

Referenced by LLFloaterLagMeter::determineClient(), LLFloaterLagMeter::determineNetwork(), LLFloaterLagMeter::determineServer(), LLButton(), LLSquareButton::LLSquareButton(), LLColumnHeader::setImage(), and setImages().

void LLButton::setImageUnselectedID ( const LLUUID image_id  )  [private]

Definition at line 813 of file llbutton.cpp.

References LLImageProviderInterface::getUIImageByID(), mImageUnselected, mImageUnselectedName, and LLUI::sImageProvider.

Referenced by setImageUnselected().

void LLButton::setLabel ( const LLStringExplicit label  ) 

Definition at line 779 of file llbutton.cpp.

References setLabelSelected(), and setLabelUnselected().

Referenced by LLPanelClassified::initNewClassified(), LLFloaterTestImpl::LLFloaterTestImpl(), LLFloaterLagMeter::onClickShrink(), and LLPanelLandGeneral::refresh().

BOOL LLButton::setLabelArg ( const LLString key,
const LLStringExplicit text 
) [virtual]

Reimplemented from LLUICtrl.

Definition at line 786 of file llbutton.cpp.

References mSelectedLabel, mUnselectedLabel, LLUIString::setArg(), and TRUE.

void LLButton::setLabelSelected ( const LLStringExplicit label  ) 

Definition at line 798 of file llbutton.cpp.

References mSelectedLabel.

Referenced by LLComboBox::clear(), fromXML(), LLPanelPermissions::refresh(), LLProgressView::setCancelButtonVisible(), LLComboBox::setLabel(), setLabel(), LLTabContainer::setPanelTitle(), and LLPanelGroupGeneral::update().

void LLButton::setLabelUnselected ( const LLStringExplicit label  ) 

Definition at line 793 of file llbutton.cpp.

References mUnselectedLabel.

Referenced by LLComboBox::clear(), fromXML(), LLPanelPermissions::refresh(), LLProgressView::setCancelButtonVisible(), LLComboBox::setLabel(), setLabel(), LLTabContainer::setPanelTitle(), and LLPanelGroupGeneral::update().

void LLButton::setLeftHPad ( S32  pad  )  [inline]

Definition at line 125 of file llbutton.h.

References mLeftHPad.

Referenced by LLTabContainerVertical::addTabPanel(), and LLTabContainer::addTabPanel().

void LLButton::setMouseDownCallback ( void(*)(void *data)  cb  )  [inline]

Definition at line 110 of file llbutton.h.

References mMouseDownCallback.

Referenced by LLColumnHeader::LLColumnHeader(), LLComboBox::LLComboBox(), and LLScrollingPanelParam::LLScrollingPanelParam().

void LLButton::setMouseUpCallback ( void(*)(void *data)  cb  )  [inline]

Definition at line 111 of file llbutton.h.

References mMouseUpCallback.

Referenced by LLScrollingPanelParam::LLScrollingPanelParam(), and LLVoiceRemoteCtrl::LLVoiceRemoteCtrl().

void LLButton::setRightHPad ( S32  pad  )  [inline]

Definition at line 126 of file llbutton.h.

References mRightHPad.

Referenced by LLTabContainer::addTabPanel(), and LLComboBox::LLComboBox().

void LLButton::setScaleImage ( BOOL  scale  )  [inline]

Definition at line 165 of file llbutton.h.

References mScaleImage.

Referenced by LLTabContainerVertical::addTabPanel(), LLTabContainer::addTabPanel(), LLFloater::buildButtons(), LLJoystickAgentSlide::fromXML(), LLJoystickAgentTurn::fromXML(), fromXML(), and LLFloaterAnimPreview::postBuild().

void LLButton::setSelectedLabelColor ( const LLColor4 c  )  [inline]

Definition at line 107 of file llbutton.h.

References c, and mSelectedLabelColor.

void LLButton::setToggleState ( BOOL  b  ) 

Definition at line 759 of file llbutton.cpp.

References LLObservable::fireEvent(), and mToggleState.

Referenced by LLFloaterReporter::closePickTool(), LLVoiceRemoteCtrl::draw(), LLFloaterColorPicker::draw(), LLComboBox::hideList(), LLDebugVarMessageBox::onAnimateClicked(), LLFloaterReporter::onClickObjPicker(), LLAgent::propagate(), LLPanelEditWearable::setSubpart(), LLCheckBoxCtrl::setValue(), LLComboBox::showList(), toggleState(), and LLFloaterTools::updatePopup().

void LLButton::setUnselectedLabelColor ( const LLColor4 c  )  [inline]

Definition at line 106 of file llbutton.h.

References c, and mUnselectedLabelColor.

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

Reimplemented from LLView.

Definition at line 769 of file llbutton.cpp.

References LLSD::asBoolean(), and mToggleState.

BOOL LLButton::toggleState (  )  [inline]

Definition at line 117 of file llbutton.h.

References mToggleState, and setToggleState().

Referenced by LLPreviewAnim::auditionAnim(), LLVoiceRemoteCtrl::onBtnLock(), LLPreviewAnim::playAnim(), and LLCheckBoxCtrl::toggle().


Member Data Documentation

BOOL LLButton::mBorderEnabled [protected]

Definition at line 262 of file llbutton.h.

Referenced by draw(), and setBorderEnabled().

void(* LLButton::mClickedCallback)(void *data) [protected]

Referenced by handleKeyHere(), handleMouseUp(), handleUnicodeCharHere(), and onCommit().

BOOL LLButton::mCommitOnReturn [protected]

Definition at line 277 of file llbutton.h.

Referenced by draw(), getCommitOnReturn(), handleKeyHere(), and setCommitOnReturn().

F32 LLButton::mCurGlowStrength [protected]

Definition at line 274 of file llbutton.h.

Referenced by draw().

LLColor4 LLButton::mDisabledImageColor [protected]

Definition at line 255 of file llbutton.h.

Referenced by draw(), LLButton(), setDisabledImageColor(), setDisabledImages(), setImageDisabledID(), and setImageDisabledSelectedID().

LLUIString LLButton::mDisabledLabel [protected]

Definition at line 229 of file llbutton.h.

Referenced by draw(), and setDisabledLabel().

LLColor4 LLButton::mDisabledLabelColor [protected]

Definition at line 230 of file llbutton.h.

Referenced by draw(), init(), and setDisabledLabelColor().

LLUIString LLButton::mDisabledSelectedLabel [protected]

Definition at line 233 of file llbutton.h.

Referenced by draw(), and setDisabledSelectedLabel().

LLColor4 LLButton::mDisabledSelectedLabelColor [protected]

Definition at line 234 of file llbutton.h.

Referenced by draw(), init(), and setDisabledSelectedLabelColor().

BOOL LLButton::mDropShadowedText [protected]

Definition at line 260 of file llbutton.h.

Referenced by draw(), and setDropShadowedText().

S32 LLButton::mFixedHeight [protected]

Definition at line 271 of file llbutton.h.

Referenced by draw(), drawBorder(), fromXML(), getXML(), LLButton(), and setFixedBorder().

S32 LLButton::mFixedWidth [protected]

Definition at line 270 of file llbutton.h.

Referenced by draw(), drawBorder(), fromXML(), getXML(), LLButton(), and setFixedBorder().

BOOL LLButton::mFlashing [protected]

Definition at line 264 of file llbutton.h.

Referenced by draw(), getFlashing(), and setFlashing().

const LLFontGL* LLButton::mGLFont [protected]

Definition at line 205 of file llbutton.h.

Referenced by draw(), getXML(), init(), and setFont().

LLFontGL::HAlign LLButton::mHAlign [protected]

Definition at line 266 of file llbutton.h.

Referenced by draw(), LLJoystick::getXML(), getXML(), and setHAlign().

void(* LLButton::mHeldDownCallback)(void *data) [protected]

Referenced by handleHover(), LLJoystick::LLJoystick(), and setHeldDownCallback().

F32 LLButton::mHeldDownDelay [protected]

Definition at line 209 of file llbutton.h.

Referenced by handleHover(), and setHeldDownDelay().

S32 LLButton::mHeldDownFrameDelay [protected]

Definition at line 210 of file llbutton.h.

Referenced by handleHover(), and setHeldDownDelay().

LLString LLButton::mHelpURL [protected]

Definition at line 279 of file llbutton.h.

Referenced by getHelpURL(), and setHelpURLCallback().

LLColor4 LLButton::mHighlightColor [protected]

Definition at line 250 of file llbutton.h.

Referenced by init().

F32 LLButton::mHoverGlowStrength [protected]

Definition at line 273 of file llbutton.h.

Referenced by draw(), and setHoverGlowStrength().

LLColor4 LLButton::mImageColor [protected]

Definition at line 254 of file llbutton.h.

Referenced by draw(), LLButton(), LLSquareButton::LLSquareButton(), setDisabledImages(), setImageColor(), setImageDisabledID(), and setImageDisabledSelectedID().

LLPointer<LLImageGL> LLButton::mImageDisabled [protected]

Definition at line 228 of file llbutton.h.

Referenced by draw(), LLButton(), and setImageDisabledID().

LLUUID LLButton::mImageDisabledID [protected]

Definition at line 241 of file llbutton.h.

Referenced by getXML().

LLString LLButton::mImageDisabledName [protected]

Definition at line 247 of file llbutton.h.

Referenced by getXML(), setImageDisabled(), and setImageDisabledID().

LLPointer<LLImageGL> LLButton::mImageDisabledSelected [protected]

Definition at line 232 of file llbutton.h.

Referenced by draw(), and setImageDisabledSelectedID().

LLUUID LLButton::mImageDisabledSelectedID [protected]

Definition at line 242 of file llbutton.h.

Referenced by getXML().

LLString LLButton::mImageDisabledSelectedName [protected]

Definition at line 248 of file llbutton.h.

Referenced by getXML(), setImageDisabledSelected(), and setImageDisabledSelectedID().

LLPointer<LLImageGL> LLButton::mImageHoverSelected [protected]

Definition at line 224 of file llbutton.h.

Referenced by draw(), and setImageHoverSelectedID().

LLUUID LLButton::mImageHoverSelectedID [protected]

Definition at line 239 of file llbutton.h.

Referenced by getXML().

LLString LLButton::mImageHoverSelectedName [protected]

Definition at line 245 of file llbutton.h.

Referenced by getXML(), setImageHoverSelected(), and setImageHoverSelectedID().

LLPointer<LLImageGL> LLButton::mImageHoverUnselected [protected]

Definition at line 226 of file llbutton.h.

Referenced by draw(), and setImageHoverUnselectedID().

LLUUID LLButton::mImageHoverUnselectedID [protected]

Definition at line 240 of file llbutton.h.

Referenced by getXML().

LLString LLButton::mImageHoverUnselectedName [protected]

Definition at line 246 of file llbutton.h.

Referenced by getXML(), setImageHoverUnselected(), and setImageHoverUnselectedID().

LLPointer<LLImageGL> LLButton::mImageOverlay [protected]

Definition at line 212 of file llbutton.h.

Referenced by draw(), getImageOverlay(), and setImageOverlay().

LLFontGL::HAlign LLButton::mImageOverlayAlignment [protected]

Definition at line 213 of file llbutton.h.

Referenced by draw(), init(), and setImageOverlay().

LLColor4 LLButton::mImageOverlayColor [protected]

Definition at line 214 of file llbutton.h.

Referenced by draw(), init(), and setImageOverlay().

LLPointer<LLImageGL> LLButton::mImagep [protected]

Definition at line 281 of file llbutton.h.

Referenced by draw(), and drawBorder().

LLPointer<LLImageGL> LLButton::mImageSelected [protected]

Definition at line 220 of file llbutton.h.

Referenced by LLJoystickCameraRotate::draw(), draw(), and setImageSelectedID().

LLUUID LLButton::mImageSelectedID [protected]

Definition at line 238 of file llbutton.h.

Referenced by LLJoystick::getXML(), and getXML().

LLString LLButton::mImageSelectedName [protected]

Definition at line 244 of file llbutton.h.

Referenced by LLJoystick::getXML(), getXML(), setImageSelected(), and setImageSelectedID().

LLPointer<LLImageGL> LLButton::mImageUnselected [protected]

Definition at line 216 of file llbutton.h.

Referenced by LLJoystickCameraZoom::draw(), LLJoystickCameraRotate::draw(), draw(), getImageUnselected(), LLButton(), and setImageUnselectedID().

LLUUID LLButton::mImageUnselectedID [protected]

Definition at line 237 of file llbutton.h.

Referenced by LLJoystick::getXML(), and getXML().

LLString LLButton::mImageUnselectedName [protected]

Definition at line 243 of file llbutton.h.

Referenced by LLJoystick::getXML(), getXML(), setImageUnselected(), and setImageUnselectedID().

S32 LLButton::mLeftHPad [protected]

Definition at line 267 of file llbutton.h.

Referenced by draw(), init(), and setLeftHPad().

void(* LLButton::mMouseDownCallback)(void *data) [protected]

Referenced by handleMouseDown(), onCommit(), and setMouseDownCallback().

S32 LLButton::mMouseDownFrame [protected]

Definition at line 208 of file llbutton.h.

Referenced by handleHover(), and handleMouseDown().

LLFrameTimer LLButton::mMouseDownTimer [protected]

Definition at line 207 of file llbutton.h.

Referenced by LLJoystick::getElapsedHeldDownTime(), getHeldDownTime(), handleHover(), LLJoystick::handleMouseDown(), handleMouseDown(), handleMouseUp(), init(), and onMouseCaptureLost().

void(* LLButton::mMouseUpCallback)(void *data) [protected]

Referenced by handleMouseUp(), onCommit(), and setMouseUpCallback().

BOOL LLButton::mNeedsHighlight [protected]

Definition at line 276 of file llbutton.h.

Referenced by draw(), and handleHover().

S32 LLButton::mRightHPad [protected]

Definition at line 268 of file llbutton.h.

Referenced by draw(), init(), and setRightHPad().

BOOL LLButton::mScaleImage [protected]

Definition at line 258 of file llbutton.h.

Referenced by draw(), drawBorder(), LLJoystick::getXML(), getXML(), LLButton(), and setScaleImage().

LLColor4 LLButton::mSelectedBgColor [protected]

Definition at line 252 of file llbutton.h.

Referenced by init().

LLUIString LLButton::mSelectedLabel [protected]

Definition at line 221 of file llbutton.h.

Referenced by draw(), getLabelSelected(), LLButton(), setLabelArg(), and setLabelSelected().

LLColor4 LLButton::mSelectedLabelColor [protected]

Definition at line 222 of file llbutton.h.

Referenced by draw(), init(), and setSelectedLabelColor().

BOOL LLButton::mToggleState [protected]

Definition at line 257 of file llbutton.h.

Referenced by draw(), getToggleState(), getValue(), setToggleState(), setValue(), and toggleState().

LLColor4 LLButton::mUnselectedBgColor [protected]

Definition at line 251 of file llbutton.h.

Referenced by init().

LLUIString LLButton::mUnselectedLabel [protected]

Definition at line 217 of file llbutton.h.

Referenced by draw(), getLabelUnselected(), LLButton(), setLabelArg(), and setLabelUnselected().

LLColor4 LLButton::mUnselectedLabelColor [protected]

Definition at line 218 of file llbutton.h.

Referenced by draw(), init(), and setUnselectedLabelColor().

LLFrameTimer LLButton::sFlashingTimer [static, protected]

Definition at line 283 of file llbutton.h.

Referenced by draw().


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