本文整理汇总了C++中BGroupView::SetToolTip方法的典型用法代码示例。如果您正苦于以下问题:C++ BGroupView::SetToolTip方法的具体用法?C++ BGroupView::SetToolTip怎么用?C++ BGroupView::SetToolTip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BGroupView
的用法示例。
在下文中一共展示了BGroupView::SetToolTip方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BStringView
Window::Window()
:
BWindow(BRect(100, 100, 520, 430), "ToolTip-Test",
B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS)
{
BView* simple = new BStringView("1", "Simple Tool Tip");
simple->SetToolTip("This is a really\nsimple tool tip!");
BView* custom = new BStringView("2", "Custom Tool Tip");
custom->SetToolTip(new CustomToolTip("Custom tool tip!"));
BView* changing = new BStringView("3", "Changing Tool Tip");
changing->SetToolTip(new ChangingToolTip());
BView* mouse = new BStringView("4", "Mouse Tool Tip (sticky)");
mouse->SetToolTip(new MouseToolTip());
BView* immediate = new ImmediateView("5", "Immediate Tool Tip (sticky)");
BView* pulseString = new PulseStringView("pulseString",
"Periodically changing tool tip text");
BView* pulseToolTip = new PulseToolTipView("pulseToolTip",
"Periodically changing tool tip");
BGroupView* nested = new BGroupView();
nested->SetViewColor(50, 50, 90);
nested->GroupLayout()->SetInsets(30);
nested->SetToolTip("The outer view has a tool tip,\n"
"the inner one doesn't.");
nested->AddChild(new BGroupView("inner"));
BLayoutBuilder::Group<>(this, B_HORIZONTAL)
.SetInsets(B_USE_DEFAULT_SPACING)
.AddGroup(B_VERTICAL)
.Add(simple)
.Add(custom)
.Add(changing)
.Add(mouse)
.Add(immediate)
.End()
.AddGroup(B_VERTICAL)
.Add(pulseString)
.Add(pulseToolTip)
.Add(nested);
SetPulseRate(1000000LL);
}