1 #include <Application.h>
6 class View
: public BView
{
10 virtual void FrameMoved(BPoint location
);
14 View::View(BRect frame
)
15 : BView(frame
, NULL
, B_FOLLOW_NONE
, B_FRAME_EVENTS
)
22 View::FrameMoved(BPoint point
)
24 point
.PrintToStream();
31 class Window
: public BWindow
{
36 virtual bool QuitRequested();
37 virtual void FrameResized(float width
, float height
);
42 : BWindow(BRect(100, 100, 101, 101), "Test", /*B_TITLED_WINDOW*/ B_DOCUMENT_WINDOW
43 /*B_BORDERED_WINDOW*/, B_NOT_ZOOMABLE
/*| B_NOT_RESIZABLE*/)
47 snooze(500000); // .5 secs
49 Bounds().PrintToStream();
51 Bounds().PrintToStream();
53 snooze(500000); // .5 secs
55 SetSizeLimits(5, 500, 5, 500);
57 Bounds().PrintToStream();
59 snooze(500000); // .5 secs
61 SetSizeLimits(80, 500, 80, 500);
62 Bounds().PrintToStream();
72 Window::FrameResized(float width
, float height
)
74 CurrentMessage()->PrintToStream();
79 Window::QuitRequested()
81 be_app
->PostMessage(B_QUIT_REQUESTED
);
89 class Application
: public BApplication
{
93 virtual void ReadyToRun(void);
97 Application::Application()
98 : BApplication("application/x-vnd.haiku.resizelimits-test")
100 Window
*window
= new Window();
106 Application::ReadyToRun(void)
112 main(int argc
, char **argv
)