26 lines
581 B
C++
26 lines
581 B
C++
#include "App.h"
|
|
#include <Application.h>
|
|
#include <Rect.h>
|
|
#include <Window.h>
|
|
#include <String.h>
|
|
#include <StringView.h>
|
|
|
|
App::App(void) : BApplication("application/x-vnd.hex-Renga")
|
|
{
|
|
BRect frame(100, 100, 500, 400);
|
|
BWindow *myWindow = new BWindow(frame, "Hello World!", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE);
|
|
frame.Set(10,10,11,11);
|
|
BStringView *label = new BStringView(frame, "melabel", "This is a label!");
|
|
label->ResizeToPreferred();
|
|
myWindow->AddChild(label);
|
|
myWindow->Show();
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
App *app = new App();
|
|
app->Run();
|
|
|
|
delete app;
|
|
return 0;
|
|
}
|