diff options
Diffstat (limited to 'indra/llui/lltextbox.h')
-rw-r--r-- | indra/llui/lltextbox.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h index b1e8e0b7c6..c28d0e5f94 100644 --- a/indra/llui/lltextbox.h +++ b/indra/llui/lltextbox.h @@ -54,7 +54,10 @@ public: // "Simple" constructors for text boxes that have the same name and label *TO BE DEPRECATED* LLTextBox(const std::string& name_and_label, const LLRect& rect); - LLTextBox(const std::string& name_and_label); + + // Consolidate common member initialization + // 20+ initializers times 3+ constructors is unmaintainable. + void initDefaults(); virtual ~LLTextBox() {} @@ -88,8 +91,7 @@ public: void setVPad(S32 pixels) { mVPad = pixels; } void setRightAlign() { mHAlign = LLFontGL::RIGHT; } void setHAlign( LLFontGL::HAlign align ) { mHAlign = align; } - void setClickedCallback( void (*cb)(void *data) ){ mClickedCallback = cb; } // mouse down and up within button - void setCallbackUserData( void* data ) { mCallbackUserData = data; } + void setClickedCallback( void (*cb)(void *data), void* data = NULL ){ mClickedCallback = cb; mCallbackUserData = data; } // mouse down and up within button const LLFontGL* getFont() const { return mFontGL; } @@ -124,6 +126,8 @@ private: BOOL mBorderDropShadowVisible; BOOL mUseEllipses; + S32 mLineSpacing; + S32 mHPad; S32 mVPad; LLFontGL::HAlign mHAlign; |