fixed closing bug

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4238 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty
2003-08-06 21:20:08 +00:00
parent 8c33a25737
commit 128133c081
4 changed files with 18 additions and 5 deletions
+3 -1
View File
@@ -1,15 +1,17 @@
#include <ScrollBarApp.h>
#include <ScrollBarWindow.h>
ScrollBarApp * scroll_bar_app = 0;
ScrollBarApp::ScrollBarApp()
: BApplication("application/x-vnd.obos.scroll-bar")
{
window = new ScrollBarWindow();
scroll_bar_app = this;
}
ScrollBarApp::~ScrollBarApp()
{
delete window;
}
void
+2
View File
@@ -15,4 +15,6 @@ class ScrollBarApp : public BApplication
ScrollBarWindow * window;
};
extern ScrollBarApp * scroll_bar_app;
#endif // SCROLL_BAR_APP_H
+10 -2
View File
@@ -4,8 +4,9 @@
#include <Button.h>
#include <StringView.h>
#include <ScrollBarWindow.h>
#include <ScrollBarApp.h>
ScrollBarWindow::ScrollBarWindow()
ScrollBarWindow::ScrollBarWindow(void)
: BWindow( BRect(50,50,398,325), "Scroll Bar", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE )
{
BBox* bigBox = new BBox( BRect(0,0,348,275), NULL, B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP, B_PLAIN_BORDER );
@@ -73,6 +74,13 @@ ScrollBarWindow::ScrollBarWindow()
mainView->AddChild( revertButton );
}
ScrollBarWindow::~ScrollBarWindow()
ScrollBarWindow::~ScrollBarWindow(void)
{
}
bool
ScrollBarWindow::QuitRequested(void)
{
scroll_bar_app->PostMessage(B_QUIT_REQUESTED);
return true;
}
+3 -2
View File
@@ -5,8 +5,9 @@
class ScrollBarWindow : public BWindow {
public:
ScrollBarWindow();
virtual ~ScrollBarWindow();
ScrollBarWindow(void);
virtual ~ScrollBarWindow(void);
virtual bool QuitRequested(void);
};
#endif // SCROLL_BAR_WINDOW_H