本文整理汇总了C++中LLTextBox::setEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ LLTextBox::setEnabled方法的具体用法?C++ LLTextBox::setEnabled怎么用?C++ LLTextBox::setEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLTextBox
的用法示例。
在下文中一共展示了LLTextBox::setEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: semi_transparent
//.........这里部分代码省略.........
else
{
icon = new LLIconCtrl(std::string("icon"),
LLRect(x, y, x+ICON_WIDTH, y-ICON_WIDTH),
std::string("notify_box_icon.tga"));
}
icon->setMouseOpaque(FALSE);
addChild(icon);
x += HPAD + HPAD + ICON_WIDTH;
// If we have inventory with this message, leave room for the name.
S32 box_bottom = BTN_TOP + (mHasInventory ? (LINE_HEIGHT + 2*VPAD) : 0);
text = new LLViewerTextEditor(std::string("box"),
LLRect(x, y, RIGHT, box_bottom),
DB_GROUP_NOTICE_MSG_STR_LEN,
LLStringUtil::null,
LLFontGL::sSansSerif,
FALSE);
static const LLStyleSP headerstyle(new LLStyle(true,LLColor4::black,"SansSerifBig"));
static const LLStyleSP datestyle(new LLStyle(true,LLColor4::black,"serif"));
text->appendStyledText(subject,false,false,&headerstyle);
text->appendStyledText(time_buf,false,false,&datestyle);
// Sadly, our LLTextEditor can't handle both styled and unstyled text
// at the same time. Hence this space must be styled. JC
text->appendColoredText(std::string(" "),false,false,LLColor4::grey4);
text->appendColoredText(message,false,false,LLColor4::grey4);
LLColor4 semi_transparent(1.0f,1.0f,1.0f,0.8f);
text->setCursor(0,0);
text->setEnabled(FALSE);
text->setWordWrap(TRUE);
//text->setTabStop(FALSE); // was interfering with copy-and-paste
text->setTabsToNextField(TRUE);
text->setMouseOpaque(TRUE);
text->setBorderVisible(TRUE);
text->setTakesNonScrollClicks(TRUE);
text->setHideScrollbarForShortDocs(TRUE);
text->setReadOnlyBgColor ( semi_transparent );
text->setWriteableBgColor ( semi_transparent );
addChild(text);
y = box_bottom - VPAD;
if (mHasInventory)
{
addChild(new NoticeText(std::string("subjecttitle"),LLRect(x,y,x + LABEL_WIDTH,y - LINE_HEIGHT),std::string("Attached: "),LLFontGL::sSansSerif));
LLUIImagePtr item_icon = get_item_icon(mInventoryOffer->mType,
LLInventoryType::IT_TEXTURE,
0, FALSE);
x += LABEL_WIDTH + HPAD;
std::stringstream ss;
ss << " " << inventory_name;
LLTextBox *line = new LLTextBox(std::string("object_name"),LLRect(x,y,RIGHT - HPAD,y - LINE_HEIGHT),ss.str(),LLFontGL::sSansSerif);
line->setEnabled(FALSE);
line->setBorderVisible(TRUE);
line->setDisabledColor(LLColor4::blue4);
line->setFontStyle(LLFontGL::NORMAL);
示例2: postBuild
BOOL LLPreviewGesture::postBuild()
{
LLLineEditor* edit;
LLComboBox* combo;
LLButton* btn;
LLScrollListCtrl* list;
LLTextBox* text;
LLCheckBoxCtrl* check;
edit = LLViewerUICtrlFactory::getLineEditorByName(this, "trigger_editor");
edit->setKeystrokeCallback(onKeystrokeCommit);
edit->setCommitCallback(onCommitSetDirty);
edit->setCommitOnFocusLost(TRUE);
edit->setCallbackUserData(this);
edit->setIgnoreTab(TRUE);
mTriggerEditor = edit;
text = LLViewerUICtrlFactory::getTextBoxByName(this, "replace_text");
text->setEnabled(FALSE);
mReplaceText = text;
edit = LLViewerUICtrlFactory::getLineEditorByName(this, "replace_editor");
edit->setEnabled(FALSE);
edit->setKeystrokeCallback(onKeystrokeCommit);
edit->setCommitCallback(onCommitSetDirty);
edit->setCommitOnFocusLost(TRUE);
edit->setCallbackUserData(this);
edit->setIgnoreTab(TRUE);
mReplaceEditor = edit;
combo = LLViewerUICtrlFactory::getComboBoxByName(this, "modifier_combo");
combo->setCommitCallback(onCommitSetDirty);
combo->setCallbackUserData(this);
mModifierCombo = combo;
combo = LLViewerUICtrlFactory::getComboBoxByName(this, "key_combo");
combo->setCommitCallback(onCommitSetDirty);
combo->setCallbackUserData(this);
mKeyCombo = combo;
list = LLViewerUICtrlFactory::getScrollListByName(this, "library_list");
list->setCommitCallback(onCommitLibrary);
list->setDoubleClickCallback(onClickAdd);
list->setCallbackUserData(this);
mLibraryList = list;
btn = LLViewerUICtrlFactory::getButtonByName(this, "add_btn");
btn->setClickedCallback(onClickAdd);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mAddBtn = btn;
btn = LLViewerUICtrlFactory::getButtonByName(this, "up_btn");
btn->setClickedCallback(onClickUp);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mUpBtn = btn;
btn = LLViewerUICtrlFactory::getButtonByName(this, "down_btn");
btn->setClickedCallback(onClickDown);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mDownBtn = btn;
btn = LLViewerUICtrlFactory::getButtonByName(this, "delete_btn");
btn->setClickedCallback(onClickDelete);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mDeleteBtn = btn;
list = LLViewerUICtrlFactory::getScrollListByName(this, "step_list");
list->setCommitCallback(onCommitStep);
list->setCallbackUserData(this);
mStepList = list;
// Options
text = LLViewerUICtrlFactory::getTextBoxByName(this, "options_text");
text->setBorderVisible(TRUE);
mOptionsText = text;
combo = LLViewerUICtrlFactory::getComboBoxByName(this, "animation_list");
combo->setVisible(FALSE);
combo->setCommitCallback(onCommitAnimation);
combo->setCallbackUserData(this);
mAnimationCombo = combo;
LLRadioGroup* group;
group = LLViewerUICtrlFactory::getRadioGroupByName(this, "animation_trigger_type");
group->setVisible(FALSE);
group->setCommitCallback(onCommitAnimationTrigger);
group->setCallbackUserData(this);
mAnimationRadio = group;
combo = LLViewerUICtrlFactory::getComboBoxByName(this, "sound_list");
combo->setVisible(FALSE);
combo->setCommitCallback(onCommitSound);
combo->setCallbackUserData(this);
mSoundCombo = combo;
edit = LLViewerUICtrlFactory::getLineEditorByName(this, "chat_editor");
//.........这里部分代码省略.........