Add a BScrollView around the instantiated TermView (only as a test)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34188 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2009-11-22 16:10:02 +00:00
parent abc3e03007
commit 78f94f81ff

View File

@ -4,6 +4,7 @@
#include <Dragger.h>
#include <Message.h>
#include <Path.h>
#include <ScrollView.h>
#include <Shelf.h>
#include <Window.h>
@ -62,14 +63,19 @@ Window::AttachTermView()
message.AddString("class", "TermView");
message.AddString("add_on", TERM_SIGNATURE);
message.AddBool("use_rect", true);
message.AddRect("_frame", Bounds().InsetByCopy(2, 2));
BRect viewFrame = Bounds();
viewFrame.right -= 15;
message.AddRect("_frame", viewFrame);
BView *termView = dynamic_cast<BView *>(instantiate_object(&message));
if (termView == NULL)
return;
if (termView != NULL) {
termView->SetResizingMode(B_FOLLOW_ALL);
AddChild(termView);
termView->ResizeToPreferred();
}
BScrollView *scrollView = new BScrollView("scrollview", termView,
B_FOLLOW_ALL, B_WILL_DRAW, false, true);
AddChild(scrollView);
}