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


C++ GridLayout::AddChild方法代码示例

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


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

示例1: Mat

AugmentedView::AugmentedView(UIElementCollection * window, Engine * engine, cv::Mat _cameraMatrix)
{
	cameraMatrix = new Mat();
	_cameraMatrix.copyTo(*cameraMatrix);
	rotation = new Mat();
	position = new Mat();
	objectVector = std::vector<ARObject*>();
	LOGI(LOGTAG_POSITION, "Created AugmentedView");
	canDraw = false;

	Scalar selectColor = Colors::DodgerBlue;
	selectColor[3] = 80;
	selectionIndicator = new ARObject(OpenGLHelper::CreateSolidColorCube(1,selectColor));
	selectedObject = NULL;
	SET_TIME(&lastSelectionTime);
	testObject = new ARObject(OpenGLHelper::CreateSolidColorCube(10,Colors::OrangeRed));

	tabs = new TabDisplay(true);
	window->AddChild(tabs);

	createNext =false;

	GridLayout * myGrid = new GridLayout(cv::Size2i(5,4));

	cancelSelection = new Button("Cancel");
	cancelSelection->AddClickDelegate(ClickEventDelegate::from_method<AugmentedView,&AugmentedView::ButtonPressed>(this));
	myGrid->AddChild(cancelSelection,Point2i(4,3));		
	cancelSelection->SetVisible(false);
	cancelSelection->Name = "Cancel";
	
	releaseSelection = new Button("Release");
	releaseSelection->AddClickDelegate(ClickEventDelegate::from_method<AugmentedView,&AugmentedView::ButtonPressed>(this));
	myGrid->AddChild(releaseSelection,Point2i(4,2));	
	releaseSelection->SetVisible(false);
	releaseSelection->Name = "Release";

	Button * createCube = new Button("Create");
	createCube->AddClickDelegate(ClickEventDelegate::from_method<AugmentedView,&AugmentedView::ButtonPressed>(this));
	myGrid->AddChild(createCube,Point2i(4,1));	
	createCube->Name = "Create";
	createCube->FillColor = Colors::LightGreen;

	Button * deleteObject = new Button("Delete");
	deleteObject->AddClickDelegate(ClickEventDelegate::from_method<AugmentedView,&AugmentedView::ButtonPressed>(this));
	myGrid->AddChild(deleteObject,Point2i(4,0));	
	deleteObject->Name = "Delete";
	deleteObject->FillColor = Colors::Orange;

	tabs->AddTab("AR",myGrid);
	LOGD(LOGTAG_ARINPUT,"Laying out tabs %d,%d",engine->imageWidth,engine->imageHeight);
	tabs->DoLayout(Rect(0,0,engine->imageWidth,engine->imageHeight));
	
	tabs->SetTab(0);
}
开发者ID:adamskubel,项目名称:AmplifyReality,代码行数:54,代码来源:AugmentedView.cpp


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