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
This commit is contained in:
parent
ce020bad2c
commit
a94c3386de
@ -10,11 +10,13 @@ Author: Sikosis
|
|||||||
|
|
||||||
// Includes ------------------------------------------------------------------------------------------ //
|
// Includes ------------------------------------------------------------------------------------------ //
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
|
#include <List.h>
|
||||||
|
#include <ListView.h>
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
#include <ScrollView.h>
|
#include <ScrollView.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <String.h>
|
||||||
#include <TabView.h>
|
#include <TabView.h>
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
#include <View.h>
|
#include <View.h>
|
||||||
@ -61,10 +63,17 @@ void ResourceUsageWindow::InitWindow(void)
|
|||||||
{
|
{
|
||||||
BRect r;
|
BRect r;
|
||||||
BRect rtab;
|
BRect rtab;
|
||||||
r = Bounds(); // the whole view
|
BRect rlist;
|
||||||
|
r = Bounds();
|
||||||
rtab = Bounds();
|
rtab = Bounds();
|
||||||
|
rtab.top += 10;
|
||||||
|
rlist = Bounds();
|
||||||
|
rlist.top += 44;
|
||||||
|
rlist.left += 12;
|
||||||
|
rlist.right -= 12;
|
||||||
|
rlist.bottom -= 12;
|
||||||
|
|
||||||
rtab.InsetBy(0,10);
|
// Create the TabView and Tabs
|
||||||
tabView = new BTabView(rtab,"resource_usage_tabview");
|
tabView = new BTabView(rtab,"resource_usage_tabview");
|
||||||
tabView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
tabView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
rtab = tabView->Bounds();
|
rtab = tabView->Bounds();
|
||||||
@ -82,9 +91,28 @@ void ResourceUsageWindow::InitWindow(void)
|
|||||||
tabView->AddTab(new MemoryRangeView(r), tab);
|
tabView->AddTab(new MemoryRangeView(r), tab);
|
||||||
tab->SetLabel("Memory Range");
|
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
|
// Create the Views
|
||||||
AddChild(ptrResourceUsageView = new ResourceUsageView(r));
|
AddChild(ptrResourceUsageView = new ResourceUsageView(r));
|
||||||
ptrResourceUsageView->AddChild(tabView);
|
ptrResourceUsageView->AddChild(tabView);
|
||||||
|
AddChild(IRQListView);
|
||||||
|
|
||||||
|
IRQListView->MakeFocus();
|
||||||
|
DMAListView->Hide();
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------------------------------- //
|
// -------------------------------------------------------------------------------------------------- //
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user