本文整理汇总了C++中BTabView::SetViewUIColor方法的典型用法代码示例。如果您正苦于以下问题:C++ BTabView::SetViewUIColor方法的具体用法?C++ BTabView::SetViewUIColor怎么用?C++ BTabView::SetViewUIColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BTabView
的用法示例。
在下文中一共展示了BTabView::SetViewUIColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitWindow
// ResourceUsageWindow::InitWindow -- Initialization Commands here
void ResourceUsageWindow::InitWindow(BList &list)
{
BRect rtab = Bounds();
BRect rlist = Bounds();
rtab.top += 10;
rlist.top += 10;
rlist.left += 12;
rlist.right -= 15 + B_V_SCROLL_BAR_WIDTH;
rlist.bottom -= 47;
// Create the TabView and Tabs
BTabView *tabView = new BTabView(rtab,"resource_usage_tabview");
tabView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
rtab = tabView->Bounds();
rtab.InsetBy(5,5);
// Create the ListViews
BListView *IRQListView = new BListView(rlist, "IRQListView",
B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP,
B_WILL_DRAW | B_NAVIGABLE);
BListView *DMAListView = new BListView(rlist, "DMAListView",
B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP,
B_WILL_DRAW | B_NAVIGABLE);
BListView *IORangeListView = new BListView(rlist, "IORangeListView",
B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP,
B_WILL_DRAW | B_NAVIGABLE);
BListView *memoryListView = new BListView(rlist, "memoryListView",
B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP,
B_WILL_DRAW | B_NAVIGABLE);
BScrollView *IRQScrollView = new BScrollView("scroll_list1", IRQListView,
B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true, B_FANCY_BORDER);
BScrollView *DMAScrollView = new BScrollView("scroll_list2", DMAListView,
B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true, B_FANCY_BORDER);
BScrollView *IORangeScrollView = new BScrollView("scroll_list3",
IORangeListView, B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true,
B_FANCY_BORDER);
BScrollView *memoryScrollView = new BScrollView("scroll_list4",
memoryListView, B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true,
B_FANCY_BORDER);
BTab *tab = new BTab();
tabView->AddTab(IRQScrollView, tab);
tab->SetLabel(B_TRANSLATE("IRQ"));
tab = new BTab();
tabView->AddTab(DMAScrollView, tab);
tab->SetLabel(B_TRANSLATE("DMA"));
tab = new BTab();
tabView->AddTab(IORangeScrollView, tab);
tab->SetLabel(B_TRANSLATE("IO Range"));
tab = new BTab();
tabView->AddTab(memoryScrollView, tab);
tab->SetLabel(B_TRANSLATE("Memory Range"));
{
uint32 mask = 1;
for (int i=0;i<16;mask<<=1,i++) {
bool first = true;
for (int32 j=0; j<list.CountItems(); j++) {
DevicesInfo *deviceInfo = (DevicesInfo *)list.ItemAt(j);
struct device_configuration *current = deviceInfo->GetCurrent();
resource_descriptor r;
int32 num = count_resource_descriptors_of_type(current,
B_IRQ_RESOURCE);
for (int32 k=0;k<num;k++) {
get_nth_resource_descriptor_of_type(current, k, B_IRQ_RESOURCE,
&r, sizeof(resource_descriptor));
if (mask & r.d.m.mask) {
IRQListView->AddItem(new IRQDMAItem(first ? i : -1,
deviceInfo->GetCardName()));
first = false;
}
}
}
if (first) {
IRQListView->AddItem(new IRQDMAItem(i, ""));
}
}
}
{
uint32 mask = 1;
for (int i=0;i<8;mask<<=1,i++) {
bool first = true;
for (int32 j=0; j<list.CountItems(); j++) {
DevicesInfo *deviceInfo = (DevicesInfo *)list.ItemAt(j);
struct device_configuration *current = deviceInfo->GetCurrent();
resource_descriptor r;
int32 num = count_resource_descriptors_of_type(current,
//.........这里部分代码省略.........