当前位置: 首页>>代码示例>>C++>>正文


C++ LLTextBox类代码示例

本文整理汇总了C++中LLTextBox的典型用法代码示例。如果您正苦于以下问题:C++ LLTextBox类的具体用法?C++ LLTextBox怎么用?C++ LLTextBox使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LLTextBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: snapToMessageHeight

void LLToastScriptQuestion::snapToMessageHeight()
{
	LLTextBox* mMessage = getChild<LLTextBox>("top_info_message");
	LLTextBox* mFooter = getChild<LLTextBox>("bottom_info_message");
	if (!mMessage || !mFooter)
	{
		return;
	}

	if (mMessage->getVisible() && mFooter->getVisible())
	{
		S32 heightDelta = 0;
		S32 maxTextHeight = (mMessage->getDefaultFont()->getLineHeight() * MAX_LINES_COUNT)
						  + (mFooter->getDefaultFont()->getLineHeight() * MAX_LINES_COUNT);

		LLRect messageRect = mMessage->getRect();
		LLRect footerRect  = mFooter->getRect();

		S32 oldTextHeight = messageRect.getHeight() + footerRect.getHeight();

		S32 requiredTextHeight = mMessage->getTextBoundingRect().getHeight() + mFooter->getTextBoundingRect().getHeight();
		S32 newTextHeight = llmin(requiredTextHeight, maxTextHeight);

		heightDelta = newTextHeight - oldTextHeight - heightDelta;

		reshape( getRect().getWidth(), llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT));
	}
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:28,代码来源:lltoastscriptquestion.cpp

示例2: childSetAction

BOOL LLVoiceRemoteCtrl::postBuild()
{
	mTalkBtn = getChild<LLButton>("push_to_talk");
	mTalkBtn->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onBtnTalkClicked));
	mTalkBtn->setHeldDownCallback(boost::bind(&LLVoiceRemoteCtrl::onBtnTalkHeld));
	mTalkBtn->setMouseUpCallback(boost::bind(&LLVoiceRemoteCtrl::onBtnTalkReleased));

	mTalkLockBtn = getChild<LLButton>("ptt_lock");
	mTalkLockBtn->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onBtnLock,this));

	mSpeakersBtn = getChild<LLButton>("speakers_btn");
	mSpeakersBtn->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onClickSpeakers));

	childSetAction("show_channel", onClickPopupBtn, this);
	childSetAction("end_call_btn", onClickEndCall, this);

	LLTextBox* text = getChild<LLTextBox>("channel_label");
	if (text)
	{
		text->setUseEllipses(TRUE);
	}

	childSetAction("voice_channel_bg", onClickVoiceChannel, this);

	mEndCallBtn.connect(this,"end_call_btn");
	mVoiceVolIcon.connect(this,"voice_volume");
	mVoiceChanIcon.connect(this,"voice_channel_icon");
	mVoiceChanBgBtn.connect(this,"voice_channel_bg");
	mChanLabelTextBox.connect(this,"channel_label");
	mShowChanBtn.connect(this,"show_channel");
	return TRUE;
}
开发者ID:Krazy-Bish-Margie,项目名称:SingularityViewer,代码行数:32,代码来源:llvoiceremotectrl.cpp

示例3: childSetAction

BOOL LLVoiceRemoteCtrl::postBuild()
{
	mTalkBtn = getChild<LLButton>("push_to_talk");
	mTalkBtn->setClickedCallback(onBtnTalkClicked);
	mTalkBtn->setHeldDownCallback(onBtnTalkHeld);
	mTalkBtn->setMouseUpCallback(onBtnTalkReleased);

	mTalkLockBtn = getChild<LLButton>("ptt_lock");
	mTalkLockBtn->setClickedCallback(onBtnLock);
	mTalkLockBtn->setCallbackUserData(this);

	mSpeakersBtn = getChild<LLButton>("speakers_btn");
	mSpeakersBtn->setClickedCallback(onClickSpeakers);
	mSpeakersBtn->setCallbackUserData(this);

	childSetAction("show_channel", onClickPopupBtn, this);
	childSetAction("end_call_btn", onClickEndCall, this);

	LLTextBox* text = getChild<LLTextBox>("channel_label");
	if (text)
	{
		text->setUseEllipses(TRUE);
	}

	childSetAction("voice_channel_bg", onClickVoiceChannel, this);


	return TRUE;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:29,代码来源:llvoiceremotectrl.cpp

示例4: updateCovenantText

void LLFloaterBuyLandUI::updateCovenantText(const std::string &string, const LLUUID& asset_id)
{
	LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("covenant_editor");
	if (editor)
	{
		editor->setHandleEditKeysDirectly(FALSE);
		editor->setText(string);

		LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant");
		LLTextBox* box = getChild<LLTextBox>("covenant_text");
		if(check && box)
		{
			if (asset_id.isNull())
			{
				check->set(true);
				check->setEnabled(false);
				refreshUI();

				// remove the line stating that you must agree
				box->setVisible(FALSE);
			}
			else
			{
				check->setEnabled(true);

				// remove the line stating that you must agree
				box->setVisible(TRUE);
			}
		}
	}
}
开发者ID:Avian-IW,项目名称:InWorldz-Viewer,代码行数:31,代码来源:llfloaterbuyland.cpp

示例5: showInfoCtrl

	void showInfoCtrl()
	{
		if (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) return;
				
		if (!sInfoCtrl)
		{
			// *TODO: Delete the button at exit.
			sInfoCtrl = LLUICtrlFactory::createFromFile<LLUICtrl>("inspector_info_ctrl.xml", NULL, LLPanel::child_registry_t::instance());
			if (sInfoCtrl)
			{
				sInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, sInfoCtrl));
			}
		}

		if (!sInfoCtrl)
		{
			llassert(sInfoCtrl != NULL);
			return;
		}

		LLTextBox* name = getChild<LLTextBox>("user_name");
		LLRect sticky_rect = name->getRect();
		S32 icon_x = llmin(sticky_rect.mLeft + name->getTextBoundingRect().getWidth() + 7, sticky_rect.mRight - 3);
		sInfoCtrl->setOrigin(icon_x, sticky_rect.getCenterY() - sInfoCtrl->getRect().getHeight() / 2 ) ;
		addChild(sInfoCtrl);
	}
开发者ID:OS-Development,项目名称:VW.Dolphin_v3,代码行数:26,代码来源:llchathistory.cpp

示例6: updateCovenantInfo

void LLFloaterBuyLandUI::updateCovenantInfo()
{
	LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
	if(!region) return;

	LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
	if (region_name)
	{
		region_name->setText(region->getName());
	}

	LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
	if (resellable_clause)
	{
		if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL)
		{
			resellable_clause->setText(getString("can_not_resell"));
		}
		else
		{
			resellable_clause->setText(getString("can_resell"));
		}
	}
	
	LLTextBox* changeable_clause = getChild<LLTextBox>("changeable_clause");
	if (changeable_clause)
	{
		if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES)
		{
			changeable_clause->setText(getString("can_change"));
		}
		else
		{
			changeable_clause->setText(getString("can_not_change"));
		}
	}

	LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant");
	if(check)
	{
		check->set(false);
		check->setEnabled(true);
		check->setCallbackUserData(this);
		check->setCommitCallback(onChangeAgreeCovenant);
	}

	LLTextBox* box = getChild<LLTextBox>("covenant_text");
	if(box)
	{
		box->setVisible(FALSE);
	}
	
	// send EstateCovenantInfo message
	LLMessageSystem *msg = gMessageSystem;
	msg->newMessage("EstateCovenantRequest");
	msg->nextBlockFast(_PREHASH_AgentData);
	msg->addUUIDFast(_PREHASH_AgentID,	gAgent.getID());
	msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
	msg->sendReliable(region->getHost());
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:60,代码来源:llfloaterbuyland.cpp

示例7: childSetActionTextbox

void LLPanel::childSetActionTextbox(const std::string& id, boost::function<void(void*)> function, void* value)
{
	LLTextBox* textbox = findChild<LLTextBox>(id);
	if (textbox)
	{
		textbox->setClickedCallback(boost::bind(function, value));
	}
}
开发者ID:otwstephanie,项目名称:hpa2oar,代码行数:8,代码来源:llpanel.cpp

示例8:

//---------------------------------------------------------------------------------
void LLIMWellWindow::RowPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param)
{
	LLTextBox* text = getChild<LLTextBox>("contact_name");
	S32 new_text_left = mChiclet->getRect().mRight + CHICLET_HPAD;
	LLRect text_rect = text->getRect(); 
	text_rect.mLeft = new_text_left;
	text->setShape(text_rect);
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例9: void

void LLPanel::childSetActionTextbox(const std::string& id, void(*function)(void*), void* value)
{
	LLTextBox* textbox = getChild<LLTextBox>(id);
	if (textbox)
	{
		textbox->setClickedCallback(function, value);
	}
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:8,代码来源:llpanel.cpp

示例10: childSetWrappedText

void LLPanel::childSetWrappedText(const std::string& id, const std::string& text, bool visible)
{
	LLTextBox* child = getChild<LLTextBox>(id);
	if (child)
	{
		child->setVisible(visible);
		child->setWrappedText(text);
	}
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:9,代码来源:llpanel.cpp

示例11: setText

void LLViewChildren::setText(
	const std::string& id, const std::string& text, bool visible)
{
	LLTextBox* child = mParent.getChild<LLTextBox>(id);
	if (child)
	{
		child->setVisible(visible);
		child->setText(text);
	}
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例12: updateDescription

void LLInspectObject::updateDescription(LLSelectNode* nodep)
{
	const char* const DEFAULT_DESC = "(No Description)";
	std::string desc;
	if (!nodep->mDescription.empty()
		&& nodep->mDescription != DEFAULT_DESC)
	{
		desc = nodep->mDescription;
	}

	LLTextBox* textbox = getChild<LLTextBox>("object_description");
	textbox->setValue(desc);
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:13,代码来源:llinspectobject.cpp

示例13: LLTextBox

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();
}
开发者ID:AlericInglewood,项目名称:SingularityViewer,代码行数:13,代码来源:lldraghandle.cpp

示例14: createButtons

BOOL LLToastScriptQuestion::postBuild()
{
	createButtons();

	LLTextBox* mMessage = getChild<LLTextBox>("top_info_message");
	LLTextBox* mFooter = getChild<LLTextBox>("bottom_info_message");

	mMessage->setValue(mNotification->getMessage());
	mFooter->setValue(mNotification->getFooter());

	snapToMessageHeight();

	return TRUE;
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:14,代码来源:lltoastscriptquestion.cpp

示例15: LLPanel

//---------------------------------------------------------------------------------
LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& sessionId,
		S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId) :
		LLPanel(LLPanel::Params()), mChiclet(NULL), mParent(parent)
{
	buildFromFile( "panel_activeim_row.xml", NULL);

	// Choose which of the pre-created chiclets (IM/group) to use.
	// The other one gets hidden.

	LLIMChiclet::EType im_chiclet_type = LLIMChiclet::getIMSessionType(sessionId);
	switch (im_chiclet_type)
	{
	case LLIMChiclet::TYPE_GROUP:
		mChiclet = getChild<LLIMGroupChiclet>("group_chiclet");
		break;
	case LLIMChiclet::TYPE_AD_HOC:
		mChiclet = getChild<LLAdHocChiclet>("adhoc_chiclet");		
		break;
	case LLIMChiclet::TYPE_UNKNOWN: // assign mChiclet a non-null value anyway
	case LLIMChiclet::TYPE_IM:
		mChiclet = getChild<LLIMP2PChiclet>("p2p_chiclet");
		break;
	}

	// Initialize chiclet.
	mChiclet->setChicletSizeChangedCallback(boost::bind(&LLIMWellWindow::RowPanel::onChicletSizeChanged, this, mChiclet, _2));
	mChiclet->enableCounterControl(true);
	mChiclet->setCounter(chicletCounter);
	mChiclet->setSessionId(sessionId);
	mChiclet->setIMSessionName(name);
	mChiclet->setOtherParticipantId(otherParticipantId);
	mChiclet->setVisible(true);

	if (im_chiclet_type == LLIMChiclet::TYPE_IM)
	{
		LLAvatarNameCache::get(otherParticipantId,
			boost::bind(&LLIMWellWindow::RowPanel::onAvatarNameCache,
				this, _1, _2));
	}
	else
	{
		LLTextBox* contactName = getChild<LLTextBox>("contact_name");
		contactName->setValue(name);
	}

	mCloseBtn = getChild<LLButton>("hide_btn");
	mCloseBtn->setCommitCallback(boost::bind(&LLIMWellWindow::RowPanel::onClosePanel, this));
}
开发者ID:,项目名称:,代码行数:49,代码来源:


注:本文中的LLTextBox类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。