LLHUDText Class Reference

#include <llhudtext.h>

Inheritance diagram for LLHUDText:

Inheritance graph
[legend]
Collaboration diagram for LLHUDText:

Collaboration graph
[legend]

List of all members.

Public Types

enum  e_text_alignment { ALIGN_TEXT_LEFT, ALIGN_TEXT_CENTER }
enum  e_vert_alignment { ALIGN_VERT_TOP, ALIGN_VERT_CENTER }
typedef enum
LLHUDText::e_text_alignment 
ETextAlignment
typedef enum
LLHUDText::e_vert_alignment 
EVertAlignment

Public Member Functions

void setStringUTF8 (const std::string &utf8string)
void setString (const LLWString &wstring)
void clearString ()
void addLine (const std::string &text, const LLColor4 &color, const LLFontGL::StyleFlags style=LLFontGL::NORMAL)
void addLine (const LLWString &wtext, const LLColor4 &color, const LLFontGL::StyleFlags style=LLFontGL::NORMAL)
void setLabel (const std::string &label)
void setLabel (const LLWString &label)
void setDropShadow (const BOOL do_shadow)
void setFont (const LLFontGL *font)
void setColor (const LLColor4 &color)
void setUsePixelSize (const BOOL use_pixel_size)
void setZCompare (const BOOL zcompare)
void setDoFade (const BOOL do_fade)
void setVisibleOffScreen (BOOL visible)
void setMaxLines (S32 max_lines)
void setFadeDistance (F32 fade_distance, F32 fade_range)
void updateVisibility ()
LLVector2 updateScreenPos (LLVector2 &offset_target)
void updateSize ()
void setMass (F32 mass)
void setTextAlignment (ETextAlignment alignment)
void setVertAlignment (EVertAlignment alignment)
void markDead ()
F32 getDistance () const
void setUseBubble (BOOL use_bubble)
S32 getLOD ()
BOOL getVisible ()
BOOL getHidden () const
void setHidden (BOOL hide)
void setOnHUDAttachment (BOOL on_hud)

Static Public Member Functions

static void renderAllHUD ()
static void addPickable (std::set< LLViewerObject * > &pick_list)
static void reshape ()
static void setDisplayText (BOOL flag)

Protected Member Functions

 LLHUDText (const U8 type)
void render ()
void renderForSelect ()
void renderText (BOOL for_select)
void setLOD (S32 lod)
S32 getMaxLines ()

Static Protected Member Functions

static void updateAll ()

Private Types

typedef std::set< LLPointer
< LLHUDText > >::iterator 
TextObjectIterator
typedef std::vector< LLPointer
< LLHUDText > >::iterator 
VisibleTextObjectIterator

Private Member Functions

 ~LLHUDText ()

Private Attributes

BOOL mOnHUD
BOOL mUseBubble
BOOL mDropShadow
BOOL mDoFade
F32 mFadeRange
F32 mFadeDistance
F32 mLastDistance
BOOL mUsePixelSize
BOOL mZCompare
BOOL mVisibleOffScreen
BOOL mOffscreen
LLColor4 mColor
LLVector3 mScale
F32 mWidth
F32 mHeight
LLColor4U mPickColor
const LLFontGLmFontp
const LLFontGLmBoldFontp
LLRectf mSoftScreenRect
LLVector3 mPositionAgent
LLVector2 mPositionOffset
LLVector2 mTargetPositionOffset
F32 mMass
S32 mMaxLines
S32 mOffsetY
F32 mRadius
std::vector< LLHUDTextSegmentmTextSegments
std::vector< LLHUDTextSegmentmLabelSegments
LLFrameTimer mResizeTimer
ETextAlignment mTextAlignment
EVertAlignment mVertAlignment
S32 mLOD
BOOL mHidden

Static Private Attributes

static BOOL sDisplayText = TRUE
static std::set< LLPointer
< LLHUDText > > 
sTextObjects
static std::vector< LLPointer
< LLHUDText > > 
sVisibleTextObjects
static std::vector< LLPointer
< LLHUDText > > 
sVisibleHUDTextObjects

Friends

class LLHUDObject

Classes

class  LLHUDTextSegment


Detailed Description

Definition at line 58 of file llhudtext.h.


Member Typedef Documentation

typedef std::set<LLPointer<LLHUDText> >::iterator LLHUDText::TextObjectIterator [private]

Definition at line 178 of file llhudtext.h.

typedef std::vector<LLPointer<LLHUDText> >::iterator LLHUDText::VisibleTextObjectIterator [private]

Definition at line 179 of file llhudtext.h.


Member Enumeration Documentation

Enumerator:
ALIGN_TEXT_LEFT 
ALIGN_TEXT_CENTER 

Definition at line 78 of file llhudtext.h.

Enumerator:
ALIGN_VERT_TOP 
ALIGN_VERT_CENTER 

Definition at line 84 of file llhudtext.h.


Constructor & Destructor Documentation

LLHUDText::LLHUDText ( const U8  type  )  [protected]

LLHUDText::~LLHUDText (  )  [private]

Definition at line 117 of file llhudtext.cpp.


Member Function Documentation

void LLHUDText::setStringUTF8 ( const std::string &  utf8string  ) 

Definition at line 449 of file llhudtext.cpp.

References setString(), and utf8str_to_wstring().

Here is the call graph for this function:

void LLHUDText::setString ( const LLWString wstring  ) 

Definition at line 454 of file llhudtext.cpp.

References addLine(), mColor, and mTextSegments.

Referenced by LLTracker::renderBeacon(), LLViewerObjectList::renderObjectBeacons(), and setStringUTF8().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLHUDText::clearString (  ) 

Definition at line 460 of file llhudtext.cpp.

References mTextSegments.

void LLHUDText::addLine ( const std::string &  text,
const LLColor4 color,
const LLFontGL::StyleFlags  style = LLFontGL::NORMAL 
)

Definition at line 466 of file llhudtext.cpp.

References utf8str_to_wstring().

Referenced by setString().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLHUDText::addLine ( const LLWString wtext,
const LLColor4 color,
const LLFontGL::StyleFlags  style = LLFontGL::NORMAL 
)

Definition at line 472 of file llhudtext.cpp.

References gNoRender, HUD_TEXT_MAX_WIDTH, HUD_TEXT_MAX_WIDTH_NO_BUBBLE, LLFontGL::maxDrawableChars(), mFontp, mTextSegments, mUseBubble, S32, TRUE, and utf8str_to_wstring().

Here is the call graph for this function:

void LLHUDText::setLabel ( const std::string &  label  ) 

Definition at line 503 of file llhudtext.cpp.

References utf8str_to_wstring().

Here is the call graph for this function:

void LLHUDText::setLabel ( const LLWString label  ) 

void LLHUDText::setDropShadow ( const BOOL  do_shadow  ) 

Definition at line 539 of file llhudtext.cpp.

References mDropShadow.

void LLHUDText::setFont ( const LLFontGL font  ) 

Definition at line 549 of file llhudtext.cpp.

References mFontp.

Referenced by LLTracker::renderBeacon().

Here is the caller graph for this function:

void LLHUDText::setColor ( const LLColor4 color  ) 

Definition at line 555 of file llhudtext.cpp.

References mColor, and mTextSegments.

Referenced by LLTracker::renderBeacon(), and LLViewerObjectList::renderObjectBeacons().

Here is the caller graph for this function:

void LLHUDText::setUsePixelSize ( const BOOL  use_pixel_size  ) 

Definition at line 566 of file llhudtext.cpp.

References mUsePixelSize.

void LLHUDText::setZCompare ( const BOOL  zcompare  ) 

Definition at line 544 of file llhudtext.cpp.

References mZCompare.

Referenced by LLTracker::renderBeacon(), and LLViewerObjectList::renderObjectBeacons().

Here is the caller graph for this function:

void LLHUDText::setDoFade ( const BOOL  do_fade  ) 

Definition at line 571 of file llhudtext.cpp.

References mDoFade.

void LLHUDText::setVisibleOffScreen ( BOOL  visible  )  [inline]

Definition at line 104 of file llhudtext.h.

References mVisibleOffScreen.

void LLHUDText::setMaxLines ( S32  max_lines  )  [inline]

Definition at line 107 of file llhudtext.h.

References mMaxLines.

void LLHUDText::setFadeDistance ( F32  fade_distance,
F32  fade_range 
) [inline]

Definition at line 108 of file llhudtext.h.

References mFadeDistance, and mFadeRange.

void LLHUDText::updateVisibility (  ) 

LLVector2 LLHUDText::updateScreenPos ( LLVector2 offset_target  ) 

void LLHUDText::updateSize (  ) 

Definition at line 733 of file llhudtext.cpp.

References LLFontGL::getLineHeight(), getMaxLines(), LLFrameTimer::getStarted(), HORIZONTAL_PADDING, HUD_TEXT_MAX_WIDTH, lerp(), llmax(), llmin(), mFontp, mHeight, mLabelSegments, mResizeTimer, mTextSegments, mWidth, S32, LLFrameTimer::start(), LLFrameTimer::stop(), and VERTICAL_PADDING.

Referenced by updateAll().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLHUDText::setMass ( F32  mass  )  [inline]

Definition at line 112 of file llhudtext.h.

References llmax(), and mMass.

Here is the call graph for this function:

void LLHUDText::setTextAlignment ( ETextAlignment  alignment  )  [inline]

Definition at line 113 of file llhudtext.h.

References mTextAlignment.

void LLHUDText::setVertAlignment ( EVertAlignment  alignment  )  [inline]

Definition at line 114 of file llhudtext.h.

References mVertAlignment.

Referenced by LLTracker::renderBeacon().

Here is the caller graph for this function:

void LLHUDText::markDead (  )  [virtual]

Reimplemented from LLHUDObject.

Definition at line 946 of file llhudtext.cpp.

References LLHUDObject::markDead(), and sTextObjects.

Here is the call graph for this function:

F32 LLHUDText::getDistance (  )  const [inline, virtual]

Reimplemented from LLHUDObject.

Definition at line 117 of file llhudtext.h.

References mLastDistance.

void LLHUDText::setUseBubble ( BOOL  use_bubble  )  [inline]

Definition at line 118 of file llhudtext.h.

References mUseBubble.

S32 LLHUDText::getLOD (  )  [inline]

Definition at line 119 of file llhudtext.h.

References mLOD.

BOOL LLHUDText::getVisible (  )  [inline]

Definition at line 120 of file llhudtext.h.

References LLHUDObject::mVisible.

BOOL LLHUDText::getHidden (  )  const [inline]

Definition at line 121 of file llhudtext.h.

References mHidden.

void LLHUDText::setHidden ( BOOL  hide  )  [inline]

Definition at line 122 of file llhudtext.h.

References mHidden.

Referenced by LLViewerObject::hideExtraDisplayItems().

Here is the caller graph for this function:

void LLHUDText::setOnHUDAttachment ( BOOL  on_hud  )  [inline]

Definition at line 123 of file llhudtext.h.

References LLHUDObject::mOnHUDAttachment.

void LLHUDText::renderAllHUD (  )  [static]

Definition at line 952 of file llhudtext.cpp.

References FALSE, and sVisibleHUDTextObjects.

Referenced by render_hud_elements().

Here is the caller graph for this function:

void LLHUDText::addPickable ( std::set< LLViewerObject * > &  pick_list  )  [static]

Definition at line 966 of file llhudtext.cpp.

References sVisibleTextObjects.

Referenced by LLViewerObjectList::renderObjectsForSelect().

Here is the caller graph for this function:

void LLHUDText::reshape (  )  [static]

Definition at line 983 of file llhudtext.cpp.

References mLabelSegments, mTextSegments, and sTextObjects.

Referenced by LLViewerWindow::rawSnapshot(), and LLViewerWindow::reshape().

Here is the caller graph for this function:

static void LLHUDText::setDisplayText ( BOOL  flag  )  [inline, static]

Definition at line 127 of file llhudtext.h.

References sDisplayText.

Referenced by LLViewerWindow::thumbnailSnapshot().

Here is the caller graph for this function:

void LLHUDText::render (  )  [protected, virtual]

Implements LLHUDObject.

Definition at line 122 of file llhudtext.cpp.

References FALSE, LLHUDObject::mOnHUDAttachment, renderText(), and sDisplayText.

Here is the call graph for this function:

void LLHUDText::renderForSelect (  )  [protected, virtual]

Reimplemented from LLHUDObject.

Definition at line 131 of file llhudtext.cpp.

References LLHUDObject::mOnHUDAttachment, renderText(), and TRUE.

Here is the call graph for this function:

void LLHUDText::renderText ( BOOL  for_select  )  [protected]

Reset the default color to white. The renderer expects this to be the default.

Definition at line 140 of file llhudtext.cpp.

References ALIGN_TEXT_CENTER, ALIGN_VERT_CENTER, ALIGN_VERT_TOP, LLGLImmediate::begin(), LLViewerImage::bindTexture(), LLFontGL::BOLD, LLGLImmediate::color4f(), LLGLImmediate::color4fv(), LLGLImmediate::color4ubv(), LLFontGL::DROP_SHADOW, LLGLImmediate::end(), FALSE, LLControlGroup::getColor4(), LLControlGroup::getF32(), LLSingleton< LLViewerCamera >::getInstance(), LLFontGL::getLineHeight(), getMaxLines(), LLViewerCamera::getPixelVectors(), LLUI::getUIImage(), LLViewerWindow::getWindowHeight(), LLViewerWindow::getWindowWidth(), gGL, gl_segmented_rect_3d_tex(), gl_segmented_rect_3d_tex_top(), gSavedSettings, gViewerWindow, HORIZONTAL_PADDING, hud_render_text(), LLPointer< Type >::isNull(), LLVertexBuffer::LINES, llabs(), llfloor(), llmax(), llmin(), lltrunc(), mBoldFontp, mColor, mDoFade, mDropShadow, mFadeDistance, mFadeRange, mFontp, mHeight, mHidden, mLabelSegments, mLastDistance, mOffscreen, mOffsetY, LLHUDObject::mOnHUDAttachment, mPositionAgent, mPositionOffset, mRadius, LLHUDObject::mSourceObject, mTextAlignment, mTextSegments, mUseBubble, LLColor4U::mV, LLVector3::mV, LLVector2::mV, LLColor4::mV, mVertAlignment, LLHUDObject::mVisible, mWidth, mZCompare, LLUI::popMatrix(), LLViewerCamera::projectPosAgentToScreen(), LLUI::pushMatrix(), S32, LLColor4::setAlpha(), LLUI::setLineWidth(), LLUI::translate(), TRUE, LLImageGL::unbindTexture(), updateScreenPos(), VALPHA, LLGLImmediate::vertex3fv(), VERTICAL_PADDING, VX, VY, VZ, LLVector3::y_axis, LLVector3::z_axis, and LLVector3::zero.

Referenced by render(), and renderForSelect().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLHUDText::updateAll (  )  [static, protected]

void LLHUDText::setLOD ( S32  lod  )  [protected]

Definition at line 921 of file llhudtext.cpp.

References mLOD.

Referenced by updateAll().

Here is the caller graph for this function:

S32 LLHUDText::getMaxLines (  )  [protected]

Definition at line 930 of file llhudtext.cpp.

References mLOD, and mMaxLines.

Referenced by renderText(), and updateSize().

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class LLHUDObject [friend]

Definition at line 116 of file llhudtext.h.


Member Data Documentation

Definition at line 140 of file llhudtext.h.

Definition at line 141 of file llhudtext.h.

Referenced by addLine(), renderText(), setLabel(), setUseBubble(), and updateAll().

Definition at line 142 of file llhudtext.h.

Referenced by LLHUDText(), renderText(), and setDropShadow().

Definition at line 143 of file llhudtext.h.

Referenced by LLHUDText(), renderText(), setDoFade(), and updateVisibility().

Definition at line 144 of file llhudtext.h.

Referenced by LLHUDText(), renderText(), setFadeDistance(), and updateVisibility().

Definition at line 145 of file llhudtext.h.

Referenced by LLHUDText(), renderText(), setFadeDistance(), and updateVisibility().

Definition at line 146 of file llhudtext.h.

Referenced by getDistance(), renderText(), and updateVisibility().

Definition at line 147 of file llhudtext.h.

Referenced by setUsePixelSize().

Definition at line 148 of file llhudtext.h.

Referenced by LLHUDText(), renderText(), and setZCompare().

Definition at line 149 of file llhudtext.h.

Referenced by setVisibleOffScreen(), updateScreenPos(), and updateVisibility().

Definition at line 150 of file llhudtext.h.

Referenced by LLHUDText(), renderText(), and updateVisibility().

Definition at line 151 of file llhudtext.h.

Referenced by LLHUDText(), renderText(), setColor(), setLabel(), and setString().

Definition at line 152 of file llhudtext.h.

Definition at line 153 of file llhudtext.h.

Referenced by renderText(), updateScreenPos(), and updateSize().

Definition at line 154 of file llhudtext.h.

Referenced by renderText(), updateScreenPos(), and updateSize().

Definition at line 155 of file llhudtext.h.

const LLFontGL* LLHUDText::mFontp [private]

Definition at line 156 of file llhudtext.h.

Referenced by addLine(), renderText(), setFont(), setLabel(), and updateSize().

const LLFontGL* LLHUDText::mBoldFontp [private]

Definition at line 157 of file llhudtext.h.

Referenced by renderText().

Definition at line 158 of file llhudtext.h.

Referenced by updateAll(), and updateScreenPos().

Definition at line 159 of file llhudtext.h.

Referenced by renderText(), updateScreenPos(), and updateVisibility().

Definition at line 160 of file llhudtext.h.

Referenced by renderText(), and updateVisibility().

Definition at line 161 of file llhudtext.h.

Referenced by updateAll().

F32 LLHUDText::mMass [private]

Definition at line 162 of file llhudtext.h.

Referenced by setMass(), and updateAll().

Definition at line 163 of file llhudtext.h.

Referenced by getMaxLines(), and setMaxLines().

Definition at line 164 of file llhudtext.h.

Referenced by renderText().

Definition at line 165 of file llhudtext.h.

Referenced by LLHUDText(), renderText(), and updateVisibility().

Definition at line 167 of file llhudtext.h.

Referenced by renderText(), reshape(), setLabel(), and updateSize().

Definition at line 168 of file llhudtext.h.

Referenced by updateSize().

Definition at line 169 of file llhudtext.h.

Referenced by renderText(), and setTextAlignment().

Definition at line 170 of file llhudtext.h.

Referenced by renderText(), setVertAlignment(), and updateScreenPos().

S32 LLHUDText::mLOD [private]

Definition at line 171 of file llhudtext.h.

Referenced by getLOD(), getMaxLines(), setLOD(), and updateVisibility().

Definition at line 172 of file llhudtext.h.

Referenced by getHidden(), renderText(), and setHidden().

BOOL LLHUDText::sDisplayText = TRUE [static, private]

Definition at line 174 of file llhudtext.h.

Referenced by render(), and setDisplayText().

std::set< LLPointer< LLHUDText > > LLHUDText::sTextObjects [static, private]

Definition at line 175 of file llhudtext.h.

Referenced by LLHUDText(), markDead(), reshape(), and updateAll().

std::vector< LLPointer< LLHUDText > > LLHUDText::sVisibleTextObjects [static, private]

Definition at line 176 of file llhudtext.h.

Referenced by addPickable(), updateAll(), and updateVisibility().

std::vector< LLPointer< LLHUDText > > LLHUDText::sVisibleHUDTextObjects [static, private]

Definition at line 177 of file llhudtext.h.

Referenced by renderAllHUD(), updateAll(), and updateVisibility().


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

Generated on Fri May 16 08:49:25 2008 for SecondLife by  doxygen 1.5.5