本文整理汇总了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);
}