tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / preferences / notifications / PrefletView.cpp
blobdf155e4672eaad010fe648a6ac1ea4452ed7e049
1 /*
2 * Copyright 2010, Haiku, Inc. All Rights Reserved.
3 * Copyright 2009, Pier Luigi Fiorini.
4 * Distributed under the terms of the MIT License.
6 * Authors:
7 * Pier Luigi Fiorini, pierluigi.fiorini@gmail.com
8 */
10 #include <Catalog.h>
11 #include <Message.h>
12 #include <GroupLayout.h>
13 #include <GroupLayoutBuilder.h>
14 #include <CardLayout.h>
15 #include <LayoutItem.h>
17 #include "SettingsHost.h"
18 #include "PrefletView.h"
19 #include "GeneralView.h"
20 #include "DisplayView.h"
21 #include "NotificationsView.h"
24 #undef B_TRANSLATION_CONTEXT
25 #define B_TRANSLATION_CONTEXT "PrefletView"
28 const int32 kPageSelected = '_LCH';
31 PrefletView::PrefletView(SettingsHost* host)
33 BTabView("pages")
35 // Pages
36 GeneralView* general = new GeneralView(host);
37 DisplayView* display = new DisplayView(host);
38 NotificationsView* apps = new NotificationsView(host);
40 // Page selector
41 BTab* tab = new BTab();
42 AddTab(general, tab);
43 tab->SetLabel(B_TRANSLATE("General"));
45 tab = new BTab();
46 AddTab(display, tab);
47 tab->SetLabel(B_TRANSLATE("Display"));
49 tab = new BTab();
50 AddTab(apps, tab);
51 tab->SetLabel(B_TRANSLATE("Notifications"));
55 BView*
56 PrefletView::CurrentPage()
58 return PageAt(FocusTab());
62 int32
63 PrefletView::CountPages() const
65 return 3;
69 BView*
70 PrefletView::PageAt(int32 index)
72 return TabAt(index)->View();