1 #include <Application.h>
2 #include <Archivable.h>
7 #include <ScrollView.h>
13 #include "TermConst.h"
14 // for the Terminal's signature
16 class App
: public BApplication
{
22 class Window
: public BWindow
{
25 void AttachTermView();
41 :BApplication("application/x-vnd-terminal-replicant")
43 Window
*window
= new Window();
50 :BWindow(BRect(100, 100, 400, 360), "RepliTerminal",
51 B_TITLED_WINDOW
, B_ASYNCHRONOUS_CONTROLS
|B_QUIT_ON_WINDOW_CLOSE
)
58 Window::AttachTermView()
60 // BMessage containing the class name and the app_signature
61 // for Terminal and TermView
63 message
.AddString("class", "TermView");
64 message
.AddString("add_on", TERM_SIGNATURE
);
65 message
.AddBool("use_rect", true);
67 BRect viewFrame
= Bounds();
68 viewFrame
.right
-= 15;
69 message
.AddRect("_frame", viewFrame
);
71 BView
*termView
= dynamic_cast<BView
*>(instantiate_object(&message
));
75 termView
->SetResizingMode(B_FOLLOW_ALL
);
77 BScrollView
*scrollView
= new BScrollView("scrollview", termView
,
78 B_FOLLOW_ALL
, B_WILL_DRAW
, false, true);