LLAccordionCtrlTab::LLAccordionCtrlTabHeader::LLAccordionCtrlTabHeader( const LLAccordionCtrlTabHeader::Params& p) : LLUICtrl(p) , mHeaderBGColor(p.header_bg_color()) , mNeedsHighlight(false) , mIsSelected(false), mImageCollapsed(p.header_collapse_img), mImageCollapsedPressed(p.header_collapse_img_pressed), mImageExpanded(p.header_expand_img), mImageExpandedPressed(p.header_expand_img_pressed), mImageHeader(p.header_image), mImageHeaderOver(p.header_image_over), mImageHeaderPressed(p.header_image_pressed), mImageHeaderFocused(p.header_image_focused) { LLTextBox::Params textboxParams; textboxParams.name(DD_TEXTBOX_NAME); textboxParams.initial_value(p.title()); textboxParams.text_color(p.header_text_color()); textboxParams.follows.flags(FOLLOWS_NONE); textboxParams.font( p.font() ); textboxParams.font_shadow(LLFontGL::NO_SHADOW); textboxParams.use_ellipses = true; textboxParams.bg_visible = false; textboxParams.mouse_opaque = false; mHeaderTextbox = LLUICtrlFactory::create<LLTextBox>(textboxParams); addChild(mHeaderTextbox); }
void LLDragHandleTop::setTitle(const std::string& title) { std::string trimmed_title = title; LLStringUtil::trim(trimmed_title); if( mTitleBox ) { mTitleBox->setText(trimmed_title); } else { const LLFontGL* font = LLFontGL::getFontSansSerif(); LLTextBox::Params params; params.name("Drag Handle Title"); params.rect(getRect()); params.initial_value(trimmed_title); params.font(font); params.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT); params.font_shadow(LLFontGL::DROP_SHADOW_SOFT); params.use_ellipses = true; params.allow_html = false; //cancel URL replacement in floater title mTitleBox = LLUICtrlFactory::create<LLTextBox> (params); addChild( mTitleBox ); } reshapeTitleBox(); }