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


C++ setDefaultBtn函数代码示例

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


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

示例1: childSetCommitCallback

// virtual
BOOL LLPanelFriends::postBuild()
{
	mFriendsList = getChild<LLScrollListCtrl>("friend_list");
	mFriendsList->setCommitOnSelectionChange(TRUE);
	childSetCommitCallback("friend_list", onSelectName, this);
	childSetCommitCallback("buddy_group_combobox", onChangeContactGroup, this);
	childSetDoubleClickCallback("friend_list", onClickIM);

	// <dogmode>
	// Contact search and group system.
	// 09/05/2010 - Charley Levenque
	LLSearchEditor* contact = getChild<LLSearchEditor>("buddy_search_lineedit");
	if (contact)
	{
		contact->setSearchCallback(&onContactSearchEdit, this);
	}

	getChild<LLTextBox>("s_num")->setValue("0");
	getChild<LLTextBox>("f_num")->setValue(llformat("%d", mFriendsList->getItemCount()));

	U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE;
	refreshNames(changed_mask);

	childSetAction("im_btn", onClickIM, this);
	childSetAction("assign_btn", onClickAssign, this);
	childSetAction("expand_collapse_btn", onClickExpand, this);
	childSetAction("profile_btn", onClickProfile, this);
	childSetAction("offer_teleport_btn", onClickOfferTeleport, this);
	childSetAction("pay_btn", onClickPay, this);
	childSetAction("add_btn", onClickAddFriend, this);
	childSetAction("remove_btn", onClickRemove, this);
	//childSetAction("export_btn", onClickExport, this); Making Dummy View -HgB
	//childSetAction("import_btn", onClickImport, this); Making Dummy View -HgB

	setDefaultBtn("im_btn");

	updateFriends(LLFriendObserver::ADD);
	refreshUI();

	// primary sort = online status, secondary sort = name
	mFriendsList->sortByColumn(std::string("friend_name"), TRUE);
	mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE);

	updateColumns(this);

	return TRUE;
}
开发者ID:Krazy-Bish-Margie,项目名称:SingularityViewer,代码行数:48,代码来源:llfloaterfriends.cpp

示例2: setDefaultBtn

// virtual
void LLAlertDialog::draw()
{
	// if the default button timer has just expired, activate the default button
	if(mDefaultBtnTimer.hasExpired() && mDefaultBtnTimer.getStarted())
	{
		mDefaultBtnTimer.stop();  // prevent this block from being run more than once
		setDefaultBtn(mDefaultButton);
	}

	static LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow");
	static S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater");

	gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0,
		shadow_color, shadow_lines);

	LLModalDialog::draw();
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:18,代码来源:llalertdialog.cpp

示例3: init_group_list

BOOL LLFloaterGroupPicker::postBuild()
{
	init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), mPowersMask);

	childSetAction("OK", onBtnOK, this);

	childSetAction("Cancel", onBtnCancel, this);

	setDefaultBtn("OK");

	childSetDoubleClickCallback("group list", onBtnOK);
	childSetUserData("group list", this);

	childEnable("OK");

	return TRUE;
}
开发者ID:Nora28,项目名称:imprudence,代码行数:17,代码来源:llfloatergroups.cpp

示例4: LLFloater

LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarType var_type, void *var) : 
	LLFloater(std::string("msg box"), LLRect(10,160,400,10), title),
	mVarType(var_type), mVarData(var), mAnimate(FALSE)
{
	switch(var_type)
	{
	case VAR_TYPE_F32:
	  mSlider1 = new LLSliderCtrl(std::string("slider 1"), LLRect(20,130,190,110), title, NULL, 70, 130, TRUE, TRUE, FALSE, NULL, *((F32*)var), -100.f, 100.f, 0.1f, LLStringUtil::null);
		mSlider1->setPrecision(3);
		addChild(mSlider1);
		mSlider2 = NULL;
		mSlider3 = NULL;
		break;
	case VAR_TYPE_S32:
		mSlider1 = new LLSliderCtrl(std::string("slider 1"), LLRect(20,100,190,80), title, NULL, 70, 130, TRUE, TRUE, FALSE, NULL, (F32)*((S32*)var), -255.f, 255.f, 1.f, LLStringUtil::null);
		mSlider1->setPrecision(0);
		addChild(mSlider1);
		mSlider2 = NULL;
		mSlider3 = NULL;
		break;
	case VAR_TYPE_VEC3:
		mSlider1 = new LLSliderCtrl(std::string("slider 1"), LLRect(20,130,190,110), std::string("x: "), NULL, 70, 130, TRUE, TRUE, FALSE, NULL, ((LLVector3*)var)->mV[VX], -100.f, 100.f, 0.1f, LLStringUtil::null);
		mSlider1->setPrecision(3);
		mSlider2 = new LLSliderCtrl(std::string("slider 2"), LLRect(20,100,190,80), std::string("y: "), NULL, 70, 130, TRUE, TRUE, FALSE, NULL, ((LLVector3*)var)->mV[VY], -100.f, 100.f, 0.1f, LLStringUtil::null);
		mSlider2->setPrecision(3);
		mSlider3 = new LLSliderCtrl(std::string("slider 3"), LLRect(20,70,190,50), std::string("z: "), NULL, 70, 130, TRUE, TRUE, FALSE, NULL, ((LLVector3*)var)->mV[VZ], -100.f, 100.f, 0.1f, LLStringUtil::null);
		mSlider3->setPrecision(3);
		addChild(mSlider1);
		addChild(mSlider2);
		addChild(mSlider3);
		break;
	default:
		llwarns << "Unhandled var type " << var_type << llendl;
		break;
	}

	mAnimateButton = new LLButton(std::string("Animate"), LLRect(20, 45, 180, 25), LLStringUtil::null, boost::bind(&LLDebugVarMessageBox::onAnimateClicked, this));
	addChild(mAnimateButton);

	mText = new LLTextBox(std::string("value"), LLRect(20,20,190,0));
	addChild(mText);

	//disable hitting enter closes dialog
	setDefaultBtn();
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:45,代码来源:lldebugmessagebox.cpp

示例5: getChildView

BOOL LLFloaterBuy::postBuild()
{
	getChildView("object_list")->setEnabled(FALSE);
	getChildView("item_list")->setEnabled(FALSE);

	getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterBuy::onClickCancel, this));
	getChild<LLUICtrl>("buy_btn")->setCommitCallback( boost::bind(&LLFloaterBuy::onClickBuy, this));

	setDefaultBtn("cancel_btn"); // to avoid accidental buy (SL-43130)
	
	// Always center the dialog.  User can change the size,
	// but purchases are important and should be center screen.
	// This also avoids problems where the user resizes the application window
	// mid-session and the saved rect is off-center.
	center();

	return TRUE;
}
开发者ID:Krazy-Bish-Margie,项目名称:Thunderstorm,代码行数:18,代码来源:llfloaterbuy.cpp

示例6: LLFloater

//
// Member Functions
//
LLFloaterChat::LLFloaterChat(const LLSD& seed)
:	LLFloater(std::string("chat floater"), std::string("FloaterChatRect"), LLStringUtil::null, 
			  RESIZE_YES, 440, 100, DRAG_ON_TOP, MINIMIZE_NO, CLOSE_YES),
	mPanel(NULL)
{
	mFactoryMap["chat_panel"] = LLCallbackMap(createChatPanel, NULL);
	mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, NULL);
	// do not automatically open singleton floaters (as result of getInstance())
	BOOL no_open = FALSE;
	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml",&getFactoryMap(),no_open);

	childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes
	childSetVisible("Chat History Editor with mute",FALSE);
	childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
	setDefaultBtn("Chat");

	//toggleHistoryChannelControl(); temporarily disable until working
}
开发者ID:PhoenixDesmoulins,项目名称:imprudence,代码行数:21,代码来源:llfloaterchat.cpp

示例7: childGetListInterface

void LLFloaterWorldMap::onCommitSearchResult()
{
	LLCtrlListInterface *list = childGetListInterface("search_results");
	if (!list) return;

	LLSD selected_value = list->getSelectedValue();
	std::string sim_name = selected_value.asString();
	if (sim_name.empty())
	{
		return;
	}
	LLStringUtil::toLower(sim_name);

	std::map<U64, LLSimInfo*>::const_iterator it;
	for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it)
	{
		LLSimInfo* info = it->second;

		if (info->isName(sim_name))
		{
			LLVector3d pos_global = info->getGlobalOrigin();

			const F64 SIM_COORD_DEFAULT = 128.0;
			LLVector3 pos_local(SIM_COORD_DEFAULT, SIM_COORD_DEFAULT, 0.0f);

			// Did this value come from a trackURL() request?
			if (!mCompletingRegionPos.isExactlyZero())
			{
				pos_local = mCompletingRegionPos;
				mCompletingRegionPos.clear();
			}
			pos_global.mdV[VX] += (F64)pos_local.mV[VX];
			pos_global.mdV[VY] += (F64)pos_local.mV[VY];
			pos_global.mdV[VZ] = (F64)pos_local.mV[VZ];

			childSetValue("location", sim_name);
			trackLocation(pos_global);
			setDefaultBtn("Teleport");
			break;
		}
	}

	onShowTargetBtn();
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:44,代码来源:llfloaterworldmap.cpp

示例8: childSetValue

BOOL LLPanelDirLand::postBuild()
{
	LLPanelDirBrowser::postBuild();

	childSetValue("type", gSavedSettings.getString("FindLandType"));

	bool adult_enabled = gAgent.canAccessAdult();
	bool mature_enabled = gAgent.canAccessMature();
	childSetVisible("incpg", true);
	if (!mature_enabled)
	{
		childSetValue("incmature", FALSE);
		childDisable("incmature");
	}
	if (!adult_enabled)
	{
		childSetValue("incadult", FALSE);
		childDisable("incadult");
	}

	childSetCommitCallback("pricecheck", onCommitPrice, this);
	childSetCommitCallback("areacheck", onCommitArea, this);

	childSetValue("priceedit", gStatusBar->getBalance());
	childSetEnabled("priceedit", gSavedSettings.getBOOL("FindLandPrice"));
	childSetPrevalidate("priceedit", LLLineEditor::prevalidateNonNegativeS32);
	
	childSetEnabled("areaedit", gSavedSettings.getBOOL("FindLandArea"));
	childSetPrevalidate("areaedit", LLLineEditor::prevalidateNonNegativeS32);

	childSetAction("Search", onClickSearchCore, this);
	setDefaultBtn("Search");

	mCurrentSortColumn = "per_meter";

	LLScrollListCtrl* results = getChild<LLScrollListCtrl>("results");
	if (results)
	{
		results->setSortChangedCallback(onClickSort);
		results->sortByColumn(mCurrentSortColumn,mCurrentSortAscending);
	}

	return TRUE;
}
开发者ID:Boy,项目名称:rainbow,代码行数:44,代码来源:llpaneldirland.cpp

示例9: llformat

//virtual
BOOL LLFloaterPriceForListing::postBuild()
{
	LLLineEditor* edit = getChild<LLLineEditor>("price_edit");
	if (edit)
	{
		edit->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32);
		std::string min_price = llformat("%d", MINIMUM_PRICE_FOR_LISTING);
		edit->setText(min_price);
		edit->selectAll();
		edit->setFocus(TRUE);
	}

	childSetAction("set_price_btn", onClickSetPrice, this);

	childSetAction("cancel_btn", onClickCancel, this);

	setDefaultBtn("set_price_btn");
	return TRUE;
}
开发者ID:Logear,项目名称:PartyHatViewer,代码行数:20,代码来源:llpanelclassified.cpp

示例10: childSetCommitCallback

BOOL LLPanelGroups::postBuild()
{
	childSetCommitCallback("group list", onGroupList, this);

	LLSearchEditor* group_search = getChild<LLSearchEditor>("group_search");
	if (group_search)
	{
		group_search->setSearchCallback(&onGroupSearchKeystroke, this);
	}

	childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
	childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS));

	const std::string none_text = getString("none");
	init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text, false);

	childSetAction("Activate", onBtnActivate, this);

	childSetAction("Info", onBtnInfo, this);

	childSetAction("IM", onBtnIM, this);

	childSetAction("Leave", onBtnLeave, this);

	childSetAction("Create", onBtnCreate, this);

	childSetAction("Search...", onBtnSearch, this);
	
	childSetAction("Invite...", onBtnInvite, this);

	childSetAction("Titles...", onBtnTitles, this);

	setDefaultBtn("IM");

	childSetDoubleClickCallback("group list", onBtnIM);
	childSetUserData("group list", this);

	reset();

	return TRUE;
}
开发者ID:Avian-IW,项目名称:InWorldz-Viewer,代码行数:41,代码来源:llfloatergroups.cpp

示例11: setDefaultBtn

BOOL LLFloaterHtmlFind::postBuild()
{
	mCloseButton = LLUICtrlFactory::getButtonByName(this, "close_btn" );
	if ( mCloseButton )
	{
		mCloseButton->setClickedCallback( onClickClose );
		mCloseButton->setCallbackUserData( this );
		setDefaultBtn( mCloseButton );
	};

	mWebBrowser = LLViewerUICtrlFactory::getWebBrowserByName(this,  "html_find_browser" );

	//	// observe browser events
	mWebBrowser->addObserver( this );

	// browser built so navigate to the right page
	LLString homePageUrl( "http://user.lindenlab.com/~callum/search.php" );
	mWebBrowser->navigateTo( homePageUrl );

	return TRUE;
}
开发者ID:xinyaojiejie,项目名称:Dale,代码行数:21,代码来源:llfloaterhtmlfind.cpp

示例12: childSetAction

BOOL LLChatBar::postBuild()
{
	childSetAction("History", toggleChatHistory, this);
	childSetCommitCallback("Say", onClickSay, this);

	// attempt to bind to an existing combo box named gesture
	setGestureCombo(getChild<LLComboBox>( "Gesture"));

	LLButton * sayp = getChild<LLButton>("Say");
	if(sayp)
	{
		setDefaultBtn(sayp);
	}

	mInputEditor = getChild<LLLineEditor>("Chat Editor");
	if (mInputEditor)
	{
		mInputEditor->setCallbackUserData(this);
		mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke);
		mInputEditor->setFocusLostCallback(&onInputEditorFocusLost, this);
		mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus, this );
		mInputEditor->setCommitOnFocusLost( FALSE );
		mInputEditor->setRevertOnEsc( FALSE );
		mInputEditor->setIgnoreTab(TRUE);
		mInputEditor->setPassDelete(TRUE);
		mInputEditor->setReplaceNewlinesWithSpaces(FALSE);

		mInputEditor->setMaxTextLength(DB_CHAT_MSG_STR_LEN);
		mInputEditor->setEnableLineHistory(TRUE);
	}

	mChannelControl = getChild<LLSpinCtrl>("channel_control");

	toggleChannelControl();

	mIsBuilt = TRUE;

	return TRUE;
}
开发者ID:kow,项目名称:pleiaviewer,代码行数:39,代码来源:llchatbar.cpp

示例13: log

BOOL LLFloaterWorldMap::postBuild()
{
	mPanel = getChild<LLPanel>("objects_mapview");

	LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
	if (avatar_combo)
	{
		avatar_combo->selectFirstItem();
		avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) );
		avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
	}

	getChild<LLScrollListCtrl>("location")->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));

	LLLineEditor *location_editor = getChild<LLLineEditor>("location");
	if (location_editor)
	{
		location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this, _1), NULL );
	}
	
	getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback( boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));

	LLComboBox *landmark_combo = getChild<LLComboBox>( "landmark combo");
	if (landmark_combo)
	{
		landmark_combo->selectFirstItem();
		landmark_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onLandmarkComboPrearrange, this) );
		landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
	}

	mCurZoomVal = log(LLWorldMapView::sMapScale)/log(2.f);
	childSetValue("zoom slider", LLWorldMapView::sMapScale);

	setDefaultBtn(NULL);

	mZoomTimer.stop();

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

示例14: childSetAction

BOOL LLFloaterURLEntry::postBuild()
{
	mMediaURLEdit = getChild<LLComboBox>("media_entry");

	// Cancel button
	childSetAction("cancel_btn", onBtnCancel, this);

	// Cancel button
	childSetAction("clear_btn", onBtnClear, this);
	// clear media list button
	LLSD parcel_history = LLURLHistory::getURLHistory("parcel");
	bool enable_clear_button = parcel_history.size() > 0 ? true : false;
	childSetEnabled( "clear_btn", enable_clear_button );

	// OK button
	childSetAction("ok_btn", onBtnOK, this);

	setDefaultBtn("ok_btn");
	buildURLHistory();

	return TRUE;
}
开发者ID:jimjesus,项目名称:kittyviewer,代码行数:22,代码来源:llfloaterurlentry.cpp

示例15: childSetCommitCallback

// virtual
BOOL LLPanelFriends::postBuild()
{
    mFriendsList = getChild<LLScrollListCtrl>("friend_list");
    mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT);
    mFriendsList->setMaximumSelectCallback(onMaximumSelect);
    mFriendsList->setCommitOnSelectionChange(TRUE);
    childSetCommitCallback("friend_list", onSelectName, this);
    childSetDoubleClickCallback("friend_list", onClickIM);

    LLSearchEditor* buddy_search = getChild<LLSearchEditor>("buddy_search");
    if (buddy_search)
    {
        buddy_search->setSearchCallback(&onContactSearchKeystroke, this);
    }

    U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE;
    refreshNames(changed_mask, "");

    childSetAction("im_btn", onClickIM, this);
    childSetAction("profile_btn", onClickProfile, this);
    childSetAction("offer_teleport_btn", onClickOfferTeleport, this);
    childSetAction("pay_btn", onClickPay, this);
    childSetAction("add_btn", onClickAddFriend, this);
    childSetAction("remove_btn", onClickRemove, this);

    setDefaultBtn("im_btn");

    updateFriends(LLFriendObserver::ADD);
    refreshUI();

    // primary sort = online status, secondary sort = name
    mFriendsList->sortByColumn(std::string("friend_name"), TRUE);
    mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE);

    return TRUE;
}
开发者ID:kow,项目名称:imprudence,代码行数:37,代码来源:llfloaterfriends.cpp


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