/*
	
	HelloWorld.cpp
	
	Copyright 1995 Be Incorporated, All Rights Reserved.
	
*/

#ifndef HELLO_WINDOW_H
#include "HelloWindow.h"
#endif
#ifndef HELLO_VIEW_H
#include "HelloView.h"
#endif
#ifndef HELLO_WORLD_H
#include "HelloWorld.h"
#endif

#include "README.h"

main()
{	
	HelloApplication *myApplication;

	myApplication = new HelloApplication();
	myApplication->Run();
	
	delete(myApplication);
	return(0);
}

HelloApplication::HelloApplication()
		  		  : BApplication(kSignature)
{
	HelloWindow		*aWindow;
	HelloView		*aView;
	BRect			aRect;

	// set up a rectangle and instantiate a new window
	aRect.Set(22, 80, 300, 300);
	aWindow = new HelloWindow(aRect);
	
	// set up a rectangle and instantiate a new view
	// view rect should be same size as window rect but with left top at (0, 0)
	aRect.OffsetTo(B_ORIGIN);
	aView = new HelloView(aRect, "HelloView");
	
	// add view to window
	aWindow->AddChild(aView);
	
	// make window visible
	aWindow->Show();
}
