xref: /haiku/src/apps/bootmanager/DescriptionPage.cpp (revision e1c4049fed1047bdb957b0529e1921e97ef94770)
1 /*
2  * Copyright 2008-2011, Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Michael Pfeiffer <laplace@users.sourceforge.net>
7  */
8 
9 
10 #include "DescriptionPage.h"
11 
12 #include <string.h>
13 
14 #include <LayoutBuilder.h>
15 #include <RadioButton.h>
16 #include <TextView.h>
17 
18 
19 DescriptionPage::DescriptionPage(const char* name,
20 	const char* description, bool hasHeading)
21 	:
22 	WizardPageView(NULL, name)
23 {
24 	_BuildUI(description, hasHeading);
25 }
26 
27 
28 DescriptionPage::~DescriptionPage()
29 {
30 }
31 
32 
33 void
34 DescriptionPage::_BuildUI(const char* description, bool hasHeading)
35 {
36 	fDescription = CreateDescription("description", description);
37 	if (hasHeading)
38 		MakeHeading(fDescription);
39 	fDescription->SetTabWidth(120);
40 
41 	SetLayout(new BGroupLayout(B_VERTICAL));
42 
43 	BLayoutBuilder::Group<>((BGroupLayout*)GetLayout())
44 		.Add(fDescription)
45 		.AddGlue();
46 }
47