| BlockListEditorView::BlockListEditorView( BRect rect )
|
| : BView(rect, "generic_input_view", B_FOLLOW_NONE, B_WILL_DRAW)
|
| {
|
| SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
| SetHighUIColor(B_PANEL_TEXT_COLOR);
|
|
|
| // make the new listview
|
| list = new BListView(BRect(0, 0, 1, 200), "list_view", B_SINGLE_SELECTION_LIST, B_FOLLOW_ALL);
|
| list->SetSelectionMessage( new BMessage(LIST_SEL_MSG) );
|
| list->SetFontSize(12.0);
|
|
|
| // make the new button
|
| addButton = new BButton(BRect(0, 0, 1, 1), "add", "Add" B_UTF8_ELLIPSIS, new BMessage(BL_ADD_ITEM), B_FOLLOW_ALL, B_NAVIGABLE | B_NAVIGABLE_JUMP | B_WILL_DRAW );
|
| removeButton = new BButton(BRect(0, 0, 1, 1), "remove", "Remove", new BMessage(BL_REMOVE_ITEM), B_FOLLOW_ALL, B_NAVIGABLE | B_WILL_DRAW);
|
| removeButton->SetEnabled(false);
|
| closeButton = new BButton(BRect(0, 0, 1, 1), "close", "Close", new BMessage(B_QUIT_REQUESTED), B_FOLLOW_ALL, B_NAVIGABLE | B_WILL_DRAW);
|
| closeButton->MakeDefault(true);
|
|
|
| SetLayout(new BGroupLayout(B_HORIZONTAL));
|
|
|
| AddChild(BLayoutBuilder::Group<>(B_HORIZONTAL, B_USE_HALF_ITEM_SPACING)
|
| .SetInsets(B_USE_HALF_ITEM_INSETS)
|
| .Add(new BScrollView("text_scroll_view", list, B_FOLLOW_NONE, 0, false, true))
|
| .AddGroup(B_VERTICAL, B_USE_HALF_ITEM_SPACING)
|
| .Add(addButton)
|
| .Add(removeButton)
|
| .AddGlue()
|
| .Add(closeButton)
|
| .End()
|
| );
|
| }
|