本文整理汇总了C++中BGLView::Hide方法的典型用法代码示例。如果您正苦于以下问题:C++ BGLView::Hide方法的具体用法?C++ BGLView::Hide怎么用?C++ BGLView::Hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BGLView
的用法示例。
在下文中一共展示了BGLView::Hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BGLView
OpenGLView::OpenGLView()
:
BGroupView("OpenGLView", B_VERTICAL)
{
BGLView* glView = new BGLView(BRect(0, 0, 1, 1), "gl info", B_FOLLOW_NONE, 0,
BGL_RGB | BGL_DOUBLE);
glView->Hide();
AddChild(glView);
glView->LockGL();
float tabViewWidth = this->StringWidth("M") * 42;
float tabViewHeight = this->StringWidth("M") * 16;
BTabView *tabView = new BTabView("tab view", B_WIDTH_FROM_LABEL);
tabView->SetExplicitMinSize(BSize(tabViewWidth, tabViewHeight));
tabView->AddTab(new CapabilitiesView());
tabView->AddTab(new ExtensionsView());
glView->UnlockGL();
GroupLayout()->SetSpacing(0);
BLayoutBuilder::Group<>(this)
.AddGroup(B_HORIZONTAL, 0)
.Add(new GearsView())
.AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING)
.SetInsets(0, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
.Add(new InfoView())
.Add(tabView)
.End()
.AddGlue()
.End();
}
示例2: BMessage
OpenGLView::OpenGLView()
:
BGroupView("OpenGLView", B_VERTICAL)
{
BGLView* glView = new BGLView(BRect(0, 0, 1, 1), "gl info", B_FOLLOW_NONE, 0,
BGL_RGB | BGL_DOUBLE);
glView->Hide();
AddChild(glView);
glView->LockGL();
BMenu* menu = new BMenu(B_TRANSLATE("Automatic"));
menu->SetRadioMode(true);
menu->SetLabelFromMarked(true);
menu->AddItem(new BMenuItem(B_TRANSLATE("Automatic"),
new BMessage(MENU_AUTO_MESSAGE)));
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem(B_TRANSLATE("Software Rasterizer"),
new BMessage(MENU_SWRAST_MESSAGE)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Gallium Software Pipe"),
new BMessage(MENU_SWPIPE_MESSAGE)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Gallium LLVM Pipe"),
new BMessage(MENU_SWLLVM_MESSAGE)));
BMenuField* menuField = new BMenuField("renderer",
B_TRANSLATE("3D Rendering Engine:"), menu);
// TODO: Set current Renderer
menuField->SetEnabled(false);
BTabView *tabView = new BTabView("tab view", B_WIDTH_FROM_LABEL);
tabView->AddTab(new InfoView());
tabView->AddTab(new CapabilitiesView());
tabView->AddTab(new ExtensionsView());
glView->UnlockGL();
GroupLayout()->SetSpacing(0);
BLayoutBuilder::Group<>(this)
.SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
.Add(menuField)
.AddGroup(B_HORIZONTAL)
.Add(tabView)
.SetInsets(0, B_USE_DEFAULT_SPACING, 0, 0);
}