BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / poorman / PoorManSiteView.cpp
blobeb602dc51b6160f3530bd1b3ada1181288df3e6a
1 /* PoorManSiteView.cpp
3 * Philip Harrison
4 * Started: 5/07/2004
5 * Version: 0.1
6 */
8 #include <Box.h>
9 #include <LayoutBuilder.h>
11 #include "constants.h"
12 #include "PoorManSiteView.h"
13 #include "PoorManWindow.h"
14 #include "PoorManApplication.h"
16 PoorManSiteView::PoorManSiteView(const char* name)
17 : BView(name, B_WILL_DRAW, NULL)
19 PoorManWindow* win;
20 win = ((PoorManApplication *)be_app)->GetPoorManWindow();
22 SetLayout(new BGroupLayout(B_VERTICAL));
24 // Web Site Location BBox
25 BBox* webSiteLocation = new BBox("Web Location");
26 webSiteLocation->SetLabel(STR_BBX_LOCATION);
28 // Web Site Options BBox
29 BBox* webSiteOptions = new BBox("Web Options");
30 webSiteOptions->SetLabel(STR_BBX_OPTIONS);
32 // Send Directory List if No Index
33 fSendDir = new BCheckBox("Send Dir", STR_CBX_DIR_LIST_LABEL,
34 new BMessage(MSG_PREF_SITE_CBX_INDEX));
35 // set the checkbox to the value the program has
36 SetSendDirValue(win->DirListFlag());
38 // Web Directory Text Control
39 fWebDir = new BTextControl(STR_TXT_DIRECTORY, NULL, NULL);
40 SetWebDir(win->WebDir());
42 // Select Web Directory Button
43 fSelectWebDir = new BButton("Select Web Dir", STR_BTN_DIRECTORY,
44 new BMessage(MSG_PREF_SITE_BTN_SELECT));
46 // Index File Name Text Control
47 fIndexFileName = new BTextControl(STR_TXT_INDEX, NULL, NULL);
48 SetIndexFileName(win->IndexFileName());
51 BGroupLayout* webSiteLocationLayout = new BGroupLayout(B_VERTICAL, 0);
52 webSiteLocation->SetLayout(webSiteLocationLayout);
54 BGroupLayout* webSiteOptionsLayout = new BGroupLayout(B_VERTICAL, 0);
55 webSiteOptions->SetLayout(webSiteOptionsLayout);
57 BLayoutBuilder::Group<>(this, B_VERTICAL)
58 .SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
59 B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING)
60 .AddGroup(webSiteLocationLayout)
61 .SetInsets(B_USE_ITEM_INSETS)
62 .AddGrid(B_USE_SMALL_SPACING, B_USE_SMALL_SPACING)
63 .SetInsets(0, B_USE_ITEM_INSETS, 0, 0)
64 .AddTextControl(fWebDir, 0, 0, B_ALIGN_LEFT, 1, 2)
65 .Add(fSelectWebDir, 2, 1)
66 .AddTextControl(fIndexFileName, 0, 2, B_ALIGN_LEFT, 1, 2)
67 .SetColumnWeight(1, 10.f)
68 .End()
69 .End()
70 .AddGroup(webSiteOptionsLayout)
71 .SetInsets(B_USE_ITEM_INSETS)
72 .AddStrut(B_USE_ITEM_SPACING)
73 .AddGroup(B_HORIZONTAL)
74 .SetInsets(0)
75 .Add(fSendDir)
76 .AddGlue()
77 .End()
78 .AddGlue();