Added the tabs...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@937 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Andrew McCall 2002-08-29 20:04:21 +00:00
parent 7a5853853b
commit f6defcf1f4
1 changed files with 30 additions and 0 deletions

View File

@ -4,6 +4,8 @@
*/
#include <InterfaceDefs.h>
#include <TabView.h>
#include <View.h>
#include "TimeView.h"
#include "TimeMessages.h"
@ -13,8 +15,36 @@ TimeView::TimeView(BRect rect)
B_FOLLOW_ALL, B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP,
B_PLAIN_BORDER)
{
BTabView *fTabView;
BTab *fTab;
BView *fView;
BRect frame;
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
frame = Bounds();
fTabView = new BTabView(frame,"tab_view");
// Settings Tab...
fTab = new BTab();
fView = new BView(BRect(fTabView->Bounds()),"settings_view",B_FOLLOW_ALL,
B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP);
fView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
fTabView->AddTab(fView,fTab);
fTab->SetLabel("Settings");
// Time Zone Tab...
fTab = new BTab();
fView = new BView(BRect(fTabView->Bounds()),"time_zone_view",B_FOLLOW_ALL,
B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP);
fView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
fTabView->AddTab(fView,fTab);
fTab->SetLabel("Time Zone");
// Finally lets add the TabView to the view...
AddChild(fTabView);
}