* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32466 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005, Haiku Inc.
|
||||
* Copyright 2005-2009, Haiku Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@@ -23,8 +23,26 @@ class View : public BView {
|
||||
};
|
||||
|
||||
|
||||
class Window : public BWindow {
|
||||
public:
|
||||
Window();
|
||||
virtual ~Window();
|
||||
|
||||
virtual bool QuitRequested();
|
||||
};
|
||||
|
||||
|
||||
class Application : public BApplication {
|
||||
public:
|
||||
Application();
|
||||
|
||||
virtual void ReadyToRun();
|
||||
};
|
||||
|
||||
|
||||
View::View(BRect rect)
|
||||
: BView(rect, "view state", B_FOLLOW_ALL, B_WILL_DRAW)
|
||||
:
|
||||
BView(rect, "view state", B_FOLLOW_ALL, B_WILL_DRAW)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -76,18 +94,10 @@ View::Draw(BRect updateRect)
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
class Window : public BWindow {
|
||||
public:
|
||||
Window();
|
||||
virtual ~Window();
|
||||
|
||||
virtual bool QuitRequested();
|
||||
};
|
||||
|
||||
|
||||
Window::Window()
|
||||
: BWindow(BRect(100, 100, 400, 400), "ViewState-Test",
|
||||
B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS)
|
||||
:
|
||||
BWindow(BRect(100, 100, 400, 400), "ViewState-Test", B_TITLED_WINDOW,
|
||||
B_ASYNCHRONOUS_CONTROLS)
|
||||
{
|
||||
BView* view = new View(BRect(10, 10, 290, 290));
|
||||
AddChild(view);
|
||||
@@ -109,22 +119,15 @@ Window::QuitRequested()
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
class Application : public BApplication {
|
||||
public:
|
||||
Application();
|
||||
|
||||
virtual void ReadyToRun(void);
|
||||
};
|
||||
|
||||
|
||||
Application::Application()
|
||||
: BApplication("application/x-vnd.haiku-view_state")
|
||||
:
|
||||
BApplication("application/x-vnd.haiku-view_state")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Application::ReadyToRun(void)
|
||||
Application::ReadyToRun()
|
||||
{
|
||||
Window* window = new Window();
|
||||
window->Show();
|
||||
@@ -137,8 +140,8 @@ Application::ReadyToRun(void)
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
Application app;// app;
|
||||
|
||||
Application app;
|
||||
app.Run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user