本文整理汇总了C++中BTab::View方法的典型用法代码示例。如果您正苦于以下问题:C++ BTab::View方法的具体用法?C++ BTab::View怎么用?C++ BTab::View使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BTab
的用法示例。
在下文中一共展示了BTab::View方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: archiver
status_t
BTabView::Archive(BMessage* archive, bool deep) const
{
BArchiver archiver(archive);
status_t ret = BView::Archive(archive, deep);
if (ret == B_OK)
ret = archive->AddInt16("_but_width", fTabWidthSetting);
if (ret == B_OK)
ret = archive->AddFloat("_high", fTabHeight);
if (ret == B_OK)
ret = archive->AddInt32("_sel", fSelection);
if (ret == B_OK && fBorderStyle != B_FANCY_BORDER)
ret = archive->AddInt32("_border_style", fBorderStyle);
if (ret == B_OK && deep) {
for (int32 i = 0; i < CountTabs(); i++) {
BTab* tab = TabAt(i);
if ((ret = archiver.AddArchivable("_l_items", tab, deep)) != B_OK)
break;
ret = archiver.AddArchivable("_view_list", tab->View(), deep);
}
}
return archiver.Finish(ret);
}
示例2: TabAt
BView *
BTabView::ViewForTab(int32 tabIndex) const
{
BTab *tab = TabAt(tabIndex);
if (tab)
return tab->View();
return NULL;
}
示例3: Select
void ArpConfigurePanel::Select(int32 tab)
{
inherited::Select(tab);
if( Parent() ) {
BTab* tabobj = TabAt(tab);
if( tabobj ) {
BView* view = tabobj->View();
BRect frame(Frame());
if( view ) {
view->ResizeTo(frame.Width()-mTabWidth,
frame.Height()-mTabHeight);
}
}
SendSetPanel(tab);
}
}
示例4: SendSetPanel
void ArpConfigurePanel::SendSetPanel(int32 tab)
{
BTab* tabobj = TabAt(tab);
if( tabobj ) {
BView* view = tabobj->View();
if( view ) {
BMessenger target(view);
if( target.IsValid() ) {
BMessage setPanel(ARP_SET_CONFIG_PANEL_MSG);
setPanel.AddMessenger("panel", BMessenger(this));
target.SendMessage(&setPanel);
ArpD(cdb << ADH << "Sent config panel msg: "
<< setPanel << endl);
} else {
ArpD(cdb << ADH << "Invalid messenger for view, "
<< "couldn't send panel message!" << endl);
}
}
}
}