From a94c3386def5cf85232f05eba7beb1073e313b36 Mon Sep 17 00:00:00 2001 From: Phil Greenway Date: Mon, 21 Jul 2003 13:16:54 +0000 Subject: [PATCH] Added dummy listviews so I can play around with the tabs as I've not used them before. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4039 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/prefs/devices/ResourceUsageWindow.cpp | 36 ++++++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/src/prefs/devices/ResourceUsageWindow.cpp b/src/prefs/devices/ResourceUsageWindow.cpp index 81c4ac453e..85c42787af 100644 --- a/src/prefs/devices/ResourceUsageWindow.cpp +++ b/src/prefs/devices/ResourceUsageWindow.cpp @@ -10,11 +10,13 @@ Author: Sikosis // Includes ------------------------------------------------------------------------------------------ // #include +#include +#include #include #include #include #include -#include +#include #include #include #include @@ -61,10 +63,17 @@ void ResourceUsageWindow::InitWindow(void) { BRect r; BRect rtab; - r = Bounds(); // the whole view + BRect rlist; + r = Bounds(); rtab = Bounds(); - - rtab.InsetBy(0,10); + rtab.top += 10; + rlist = Bounds(); + rlist.top += 44; + rlist.left += 12; + rlist.right -= 12; + rlist.bottom -= 12; + + // Create the TabView and Tabs tabView = new BTabView(rtab,"resource_usage_tabview"); tabView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); rtab = tabView->Bounds(); @@ -82,9 +91,28 @@ void ResourceUsageWindow::InitWindow(void) tabView->AddTab(new MemoryRangeView(r), tab); tab->SetLabel("Memory Range"); + // Create the ListViews + BListView *IRQListView; + BListView *DMAListView; + + IRQListView = new BListView(rlist, "IRQListView", B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP, + B_WILL_DRAW | B_NAVIGABLE); + DMAListView = new BListView(rlist, "DMAListView", B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP, + B_WILL_DRAW | B_NAVIGABLE); + + BString tmp; + tmp.SetTo("0 Timer"); + Lock(); + IRQListView->AddItem(new BStringItem(tmp.String())); + Unlock(); + // Create the Views AddChild(ptrResourceUsageView = new ResourceUsageView(r)); ptrResourceUsageView->AddChild(tabView); + AddChild(IRQListView); + + IRQListView->MakeFocus(); + DMAListView->Hide(); } // -------------------------------------------------------------------------------------------------- //