Files
haiku-beta6/src/prefs/time/TimeView.cpp
T

59 lines
1.2 KiB
C++
Raw Normal View History

2002-08-28 18:46:25 +00:00
/*
TimeView.cpp
*/
#include <InterfaceDefs.h>
2002-08-29 20:04:21 +00:00
#include <TabView.h>
#include <View.h>
2002-08-28 18:46:25 +00:00
#include "TimeView.h"
#include "TimeMessages.h"
2002-08-28 18:46:25 +00:00
TimeView::TimeView(BRect rect)
: BBox(rect, "time_view",
2004-05-06 12:55:26 +00:00
B_FOLLOW_ALL, B_FRAME_EVENTS | B_NAVIGABLE_JUMP,
2002-08-28 18:46:25 +00:00
B_PLAIN_BORDER)
{
2002-08-29 20:04:21 +00:00
BTabView *fTabView;
BTab *fTab;
BView *fView;
BRect frame;
2002-08-28 18:46:25 +00:00
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
2002-08-29 20:04:21 +00:00
frame = Bounds();
2004-05-06 12:55:26 +00:00
frame.top = 100;
2002-08-29 20:04:21 +00:00
fTabView = new BTabView(frame,"tab_view");
2004-05-06 12:55:26 +00:00
2002-08-29 20:04:21 +00:00
// Settings Tab...
fTab = new BTab();
2004-05-06 12:55:26 +00:00
fView = new BView(BRect(fTabView->Bounds().InsetByCopy(10, 10)),"settings_view",B_FOLLOW_ALL,
B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP);
2002-08-29 20:04:21 +00:00
fView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
fTabView->AddTab(fView,fTab);
fTab->SetLabel("Settings");
// Time Zone Tab...
fTab = new BTab();
2004-05-06 12:55:26 +00:00
fView = new BView(BRect(fTabView->Bounds().InsetByCopy(10, 10)),"time_zone_view",B_FOLLOW_ALL,
B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP);
2002-08-29 20:04:21 +00:00
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);
2002-08-28 18:46:25 +00:00
}
2002-08-28 18:46:25 +00:00
void TimeView::Draw(BRect updateFrame)
{
inherited::Draw(updateFrame);
2002-09-28 03:22:22 +00:00
}