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(); }
void LLDragHandleTop::setTitle(const std::string& title) { std::string trimmed_title = title; LLStringUtil::trim(trimmed_title); const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF ); LLTextBox* titlebox = new LLTextBox( std::string("Drag Handle Title"), getRect(), trimmed_title, font ); titlebox->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT); titlebox->setFontShadow(LLFontGL::DROP_SHADOW_SOFT); setTitleBox(titlebox); reshapeTitleBox(); }
void LLDragHandleTop::reshape(S32 width, S32 height, BOOL called_from_parent) { LLView::reshape(width, height, called_from_parent); reshapeTitleBox(); }