2 * Copyright 2010, Haiku, Inc. All Rights Reserved.
3 * Copyright 2009, Pier Luigi Fiorini.
4 * Distributed under the terms of the MIT License.
7 * Pier Luigi Fiorini, pierluigi.fiorini@gmail.com
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
)
36 GeneralView
* general
= new GeneralView(host
);
37 DisplayView
* display
= new DisplayView(host
);
38 NotificationsView
* apps
= new NotificationsView(host
);
41 BTab
* tab
= new BTab();
43 tab
->SetLabel(B_TRANSLATE("General"));
47 tab
->SetLabel(B_TRANSLATE("Display"));
51 tab
->SetLabel(B_TRANSLATE("Notifications"));
56 PrefletView::CurrentPage()
58 return PageAt(FocusTab());
63 PrefletView::CountPages() const
70 PrefletView::PageAt(int32 index
)
72 return TabAt(index
)->View();