LLTextBox Class Reference

#include <lltextbox.h>

Inheritance diagram for LLTextBox:

Inheritance graph
[legend]
Collaboration diagram for LLTextBox:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLTextBox (const LLString &name, const LLRect &rect, const LLString &text, const LLFontGL *font=NULL, BOOL mouse_opaque=TRUE)
 LLTextBox (const LLString &name, const LLString &text, F32 max_width=200, const LLFontGL *font=NULL, BOOL mouse_opaque=TRUE)
 LLTextBox (const LLString &name_and_label, const LLRect &rect)
 LLTextBox (const LLString &name_and_label)
virtual ~LLTextBox ()
virtual LLXMLNodePtr getXML (bool save_children=true) const
virtual void draw ()
virtual void reshape (S32 width, S32 height, BOOL called_from_parent=TRUE)
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)
void setColor (const LLColor4 &c)
void setDisabledColor (const LLColor4 &c)
void setBackgroundColor (const LLColor4 &c)
void setBorderColor (const LLColor4 &c)
void setHoverColor (const LLColor4 &c)
void setHoverActive (BOOL active)
void setText (const LLStringExplicit &text)
void setWrappedText (const LLStringExplicit &text, F32 max_width=-1.0)
void setUseEllipses (BOOL use_ellipses)
void setBackgroundVisible (BOOL visible)
void setBorderVisible (BOOL visible)
void setFontStyle (U8 style)
void setBorderDropshadowVisible (BOOL visible)
void setHPad (S32 pixels)
void setVPad (S32 pixels)
void setRightAlign ()
void setHAlign (LLFontGL::HAlign align)
void setClickedCallback (void(*cb)(void *data))
void setCallbackUserData (void *data)
const LLFontGLgetFont () const
void reshapeToFitText ()
const LLStringgetText () const
S32 getTextPixelWidth ()
S32 getTextPixelHeight ()
virtual void setValue (const LLSD &value)
virtual LLSD getValue () const
virtual BOOL setTextArg (const LLString &key, const LLStringExplicit &text)

Static Public Member Functions

static LLViewfromXML (LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory)

Private Member Functions

void setLineLengths ()
void drawText (S32 x, S32 y, const LLColor4 &color)

Private Attributes

LLUIString mText
const LLFontGLmFontGL
LLColor4 mTextColor
LLColor4 mDisabledColor
LLColor4 mBackgroundColor
LLColor4 mBorderColor
LLColor4 mHoverColor
BOOL mHoverActive
BOOL mHasHover
BOOL mBackgroundVisible
BOOL mBorderVisible
U8 mFontStyle
BOOL mBorderDropShadowVisible
BOOL mUseEllipses
S32 mHPad
S32 mVPad
LLFontGL::HAlign mHAlign
LLFontGL::VAlign mVAlign
std::vector< S32mLineLengthList
void(* mClickedCallback )(void *data)
void * mCallbackUserData


Detailed Description

Definition at line 41 of file lltextbox.h.


Constructor & Destructor Documentation

LLTextBox::LLTextBox ( const LLString name,
const LLRect rect,
const LLString text,
const LLFontGL font = NULL,
BOOL  mouse_opaque = TRUE 
)

Definition at line 39 of file lltextbox.cpp.

References FALSE, LLUICtrl::setTabStop(), and setText().

Referenced by fromXML().

Here is the call graph for this function:

Here is the caller graph for this function:

LLTextBox::LLTextBox ( const LLString name,
const LLString text,
F32  max_width = 200,
const LLFontGL font = NULL,
BOOL  mouse_opaque = TRUE 
)

Definition at line 66 of file lltextbox.cpp.

References FALSE, reshapeToFitText(), LLUICtrl::setTabStop(), and setWrappedText().

Here is the call graph for this function:

LLTextBox::LLTextBox ( const LLString name_and_label,
const LLRect rect 
)

Definition at line 94 of file lltextbox.cpp.

References FALSE, LLUICtrl::setTabStop(), and setText().

Here is the call graph for this function:

LLTextBox::LLTextBox ( const LLString name_and_label  ) 

Definition at line 116 of file lltextbox.cpp.

References FALSE, reshapeToFitText(), LLUICtrl::setTabStop(), and setWrappedText().

Here is the call graph for this function:

virtual LLTextBox::~LLTextBox (  )  [inline, virtual]

Definition at line 59 of file lltextbox.h.


Member Function Documentation

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

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

void LLTextBox::draw ( void   )  [virtual]

void LLTextBox::reshape ( S32  width,
S32  height,
BOOL  called_from_parent = TRUE 
) [virtual]

Reimplemented from LLView.

Definition at line 387 of file lltextbox.cpp.

References LLView::reshape(), and setLineLengths().

Referenced by reshapeToFitText().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from LLView.

Definition at line 139 of file lltextbox.cpp.

References FALSE, LLView::getSoundFlags(), gFocusMgr, make_ui_sound(), mClickedCallback, LLView::MOUSE_DOWN, LLFocusMgr::setMouseCapture(), and TRUE.

Here is the call graph for this function:

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

Reimplemented from LLView.

Definition at line 162 of file lltextbox.cpp.

References FALSE, LLView::getSoundFlags(), gFocusMgr, LLView::hasMouseCapture(), make_ui_sound(), mCallbackUserData, mClickedCallback, LLView::MOUSE_UP, NULL, LLFocusMgr::setMouseCapture(), and TRUE.

Here is the call graph for this function:

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

Reimplemented from LLView.

Definition at line 194 of file lltextbox.cpp.

References LLView::handleHover(), mHasHover, mHoverActive, and TRUE.

Here is the call graph for this function:

void LLTextBox::setColor ( const LLColor4 c  )  [inline, virtual]

void LLTextBox::setDisabledColor ( const LLColor4 c  )  [inline]

Definition at line 72 of file lltextbox.h.

References mDisabledColor.

Referenced by LLGroupNotifyBox::LLGroupNotifyBox().

Here is the caller graph for this function:

void LLTextBox::setBackgroundColor ( const LLColor4 c  )  [inline]

Definition at line 73 of file lltextbox.h.

References mBackgroundColor.

Referenced by LLViewerWindow::initBase(), LLGroupNotifyBox::LLGroupNotifyBox(), and LLNotifyBox::LLNotifyBox().

Here is the caller graph for this function:

void LLTextBox::setBorderColor ( const LLColor4 c  )  [inline]

Definition at line 74 of file lltextbox.h.

References mBorderColor.

Referenced by LLViewerWindow::initBase().

Here is the caller graph for this function:

void LLTextBox::setHoverColor ( const LLColor4 c  )  [inline]

Definition at line 76 of file lltextbox.h.

References mHoverColor.

Referenced by fromXML().

Here is the caller graph for this function:

void LLTextBox::setHoverActive ( BOOL  active  )  [inline]

Definition at line 77 of file lltextbox.h.

References mHoverActive.

Referenced by fromXML().

Here is the caller graph for this function:

void LLTextBox::setText ( const LLStringExplicit text  ) 

Definition at line 204 of file lltextbox.cpp.

References LLUIString::assign(), mText, and setLineLengths().

Referenced by LLSliderCtrl::clear(), LLMultiSliderCtrl::clear(), LLFloaterLagMeter::determineClient(), LLFloaterLagMeter::determineNetwork(), LLFloaterLagMeter::determineServer(), LLPanelPlace::displayItemInfo(), LLPanelEvent::draw(), LLDebugVarMessageBox::draw(), LLNameBox::LLNameBox(), LLPanelLogin::LLPanelLogin(), LLTextBox(), LLPanelPlace::postBuild(), LLStatusBar::refresh(), LLPreviewGesture::refresh(), LLNameBox::refresh(), LLPanelLandCovenant::refresh(), LLPanelLandObjects::refresh(), LLPanelLandGeneral::refresh(), LLPanelEstateCovenant::refreshFromRegion(), LLPanelLandGeneral::refreshNames(), LLPanelPlace::resetLocation(), LLStatusBar::setBalance(), LLTextureCtrl::setCaption(), LLPanelGroupVoting::impl::setEnableVoteProposal(), LLPanelEstateCovenant::setEstateName(), LLStatusBar::setHealth(), LLTextureCtrl::setLabel(), LLColorSwatchCtrl::setLabel(), LLSpinCtrl::setLabel(), LLSliderCtrl::setLabel(), LLMultiSliderCtrl::setLabel(), LLCheckBoxCtrl::setLabel(), LLPanelPlace::setLocationString(), LLUploadDialog::setMessage(), LLNameBox::setNameID(), LLPanelEstateCovenant::setOwnerName(), LLFloaterTools::setStatusText(), LLViewChildren::setText(), LLTabContainer::setTitle(), setValue(), setWrappedText(), LLPanelGroupInvite::update(), LLPanelGroupGeneral::update(), LLFloaterBuyLandUI::updateCovenantInfo(), LLPanelEstateCovenant::updateEstateName(), LLPanelLandCovenant::updateEstateName(), LLFloaterBuyLandUI::updateEstateName(), LLPanelEstateCovenant::updateEstateOwnerName(), LLPanelLandCovenant::updateEstateOwnerName(), LLFloaterBuyLandUI::updateEstateOwnerName(), LLPanelEstateCovenant::updateLastModified(), LLPanelLandCovenant::updateLastModified(), LLFloaterBuyLandUI::updateLastModified(), LLPanelGroupInvite::updateLists(), LLPanelDisplay::updateSliderText(), LLSliderCtrl::updateText(), and LLMultiSliderCtrl::updateText().

Here is the call graph for this function:

void LLTextBox::setWrappedText ( const LLStringExplicit text,
F32  max_width = -1.0 
)

void LLTextBox::setUseEllipses ( BOOL  use_ellipses  )  [inline]

Definition at line 81 of file lltextbox.h.

References mUseEllipses.

Referenced by LLVoiceRemoteCtrl::postBuild().

Here is the caller graph for this function:

void LLTextBox::setBackgroundVisible ( BOOL  visible  )  [inline]

Definition at line 83 of file lltextbox.h.

References mBackgroundVisible.

Referenced by LLViewerWindow::initBase(), and LLGroupNotifyBox::LLGroupNotifyBox().

Here is the caller graph for this function:

void LLTextBox::setBorderVisible ( BOOL  visible  )  [inline]

Definition at line 84 of file lltextbox.h.

References mBorderVisible.

Referenced by LLViewerWindow::initBase(), LLGroupNotifyBox::LLGroupNotifyBox(), LLNotifyBox::LLNotifyBox(), and LLPreviewGesture::postBuild().

Here is the caller graph for this function:

void LLTextBox::setFontStyle ( U8  style  )  [inline]

Definition at line 85 of file lltextbox.h.

References mFontStyle.

Referenced by LLViewerWindow::initBase(), LLGroupNotifyBox::LLGroupNotifyBox(), LLNotifyBox::LLNotifyBox(), and LLDragHandleTop::setTitle().

Here is the caller graph for this function:

void LLTextBox::setBorderDropshadowVisible ( BOOL  visible  )  [inline]

Definition at line 86 of file lltextbox.h.

References mBorderDropShadowVisible.

Referenced by LLViewerWindow::initBase().

Here is the caller graph for this function:

void LLTextBox::setHPad ( S32  pixels  )  [inline]

Definition at line 87 of file lltextbox.h.

References mHPad.

Referenced by LLViewerWindow::initBase().

Here is the caller graph for this function:

void LLTextBox::setVPad ( S32  pixels  )  [inline]

Definition at line 88 of file lltextbox.h.

References mVPad.

Referenced by LLViewerWindow::initBase().

Here is the caller graph for this function:

void LLTextBox::setRightAlign (  )  [inline]

Definition at line 89 of file lltextbox.h.

References mHAlign, and LLFontGL::RIGHT.

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

Definition at line 90 of file lltextbox.h.

References mHAlign.

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

Here is the caller graph for this function:

void LLTextBox::setClickedCallback ( void(*)(void *data)  cb  )  [inline]

Definition at line 91 of file lltextbox.h.

References mClickedCallback.

Referenced by LLPanel::childSetActionTextbox(), LLFloaterTestImpl::LLFloaterTestImpl(), and LLPanelLogin::LLPanelLogin().

Here is the caller graph for this function:

void LLTextBox::setCallbackUserData ( void *  data  )  [inline]

Reimplemented from LLUICtrl.

Definition at line 92 of file lltextbox.h.

References mCallbackUserData.

Referenced by LLPanelLogin::LLPanelLogin().

Here is the caller graph for this function:

const LLFontGL* LLTextBox::getFont (  )  const [inline]

Definition at line 94 of file lltextbox.h.

References mFontGL.

Referenced by LLPanelGroupGeneral::postBuild().

Here is the caller graph for this function:

void LLTextBox::reshapeToFitText (  ) 

Definition at line 420 of file lltextbox.cpp.

References getTextPixelHeight(), getTextPixelWidth(), mHPad, mVPad, reshape(), and S32.

Referenced by LLViewerWindow::handlePerFrameHover(), and LLTextBox().

Here is the call graph for this function:

Here is the caller graph for this function:

const LLString& LLTextBox::getText (  )  const [inline]

S32 LLTextBox::getTextPixelWidth (  ) 

Definition at line 283 of file lltextbox.cpp.

References LLFontGL::getWidth(), LLUIString::getWString(), mFontGL, mLineLengthList, mText, and S32.

Referenced by LLStatusBar::refresh(), and reshapeToFitText().

Here is the call graph for this function:

Here is the caller graph for this function:

S32 LLTextBox::getTextPixelHeight (  ) 

Definition at line 308 of file lltextbox.cpp.

References LLFontGL::getLineHeight(), mFontGL, mLineLengthList, and S32.

Referenced by reshapeToFitText().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void LLTextBox::setValue ( const LLSD value  )  [inline, virtual]

Reimplemented from LLView.

Definition at line 102 of file lltextbox.h.

References LLSD::asString(), and setText().

Referenced by LLPanelActiveSpeakers::refreshSpeakers(), and LLFloaterEnvSettings::syncMenu().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual LLSD LLTextBox::getValue (  )  const [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 103 of file lltextbox.h.

References getText().

Here is the call graph for this function:

BOOL LLTextBox::setTextArg ( const LLString key,
const LLStringExplicit text 
) [virtual]

void LLTextBox::setLineLengths (  )  [private]

Definition at line 210 of file lltextbox.cpp.

References LLUIString::getWString(), mLineLengthList, mText, and S32.

Referenced by reshape(), setText(), and setTextArg().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLTextBox::drawText ( S32  x,
S32  y,
const LLColor4 color 
) [private]

Definition at line 394 of file lltextbox.cpp.

References LLFontGL::getLineHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), LLUIString::getWString(), llfloor(), mFontGL, mFontStyle, mHAlign, mLineLengthList, mText, mUseEllipses, mVAlign, NULL, LLFontGL::render(), S32, S32_MAX, and TRUE.

Referenced by draw().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

const LLFontGL* LLTextBox::mFontGL [private]

Definition at line 112 of file lltextbox.h.

Referenced by draw(), getXML(), and setColor().

Definition at line 113 of file lltextbox.h.

Referenced by draw(), getXML(), and setDisabledColor().

Definition at line 114 of file lltextbox.h.

Referenced by draw(), getXML(), and setBackgroundColor().

Definition at line 115 of file lltextbox.h.

Referenced by getXML(), and setBorderColor().

Definition at line 116 of file lltextbox.h.

Referenced by draw(), and setHoverColor().

Definition at line 118 of file lltextbox.h.

Referenced by handleHover(), and setHoverActive().

Definition at line 119 of file lltextbox.h.

Referenced by draw(), and handleHover().

Definition at line 120 of file lltextbox.h.

Referenced by draw(), getXML(), and setBackgroundVisible().

Definition at line 121 of file lltextbox.h.

Referenced by draw(), getXML(), and setBorderVisible().

Definition at line 123 of file lltextbox.h.

Referenced by drawText(), fromXML(), and setFontStyle().

Definition at line 124 of file lltextbox.h.

Referenced by draw(), getXML(), and setBorderDropshadowVisible().

Definition at line 125 of file lltextbox.h.

Referenced by drawText(), and setUseEllipses().

S32 LLTextBox::mHPad [private]

Definition at line 127 of file lltextbox.h.

Referenced by draw(), getXML(), reshapeToFitText(), and setHPad().

S32 LLTextBox::mVPad [private]

Definition at line 128 of file lltextbox.h.

Referenced by draw(), getXML(), reshapeToFitText(), and setVPad().

Definition at line 129 of file lltextbox.h.

Referenced by draw(), drawText(), getXML(), setHAlign(), and setRightAlign().

Definition at line 130 of file lltextbox.h.

Referenced by drawText().

std::vector<S32> LLTextBox::mLineLengthList [private]

Definition at line 132 of file lltextbox.h.

Referenced by drawText(), getTextPixelHeight(), getTextPixelWidth(), and setLineLengths().

void(* LLTextBox::mClickedCallback)(void *data) [private]

Reimplemented from LLUICtrl.

Definition at line 134 of file lltextbox.h.

Referenced by handleMouseUp(), and setCallbackUserData().


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

Generated on Fri May 16 09:12:09 2008 for SecondLife by  doxygen 1.5.5