mirror of
https://review.haiku-os.org/haiku
synced 2025-02-13 09:09:03 +01:00
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13263 a95241bf-73f2-0310-859d-f6bbb57e9c96
75 lines
1.1 KiB
C++
75 lines
1.1 KiB
C++
/*
|
|
* Time.cpp
|
|
* Time mccall@@digitalparadise.co.uk
|
|
*
|
|
*/
|
|
|
|
#include <Alert.h>
|
|
|
|
#include "Time.h"
|
|
#include "TimeSettings.h"
|
|
#include "TimeMessages.h"
|
|
|
|
|
|
int main()
|
|
{
|
|
new TimeApplication();
|
|
|
|
be_app->Run();
|
|
|
|
delete be_app;
|
|
return(0);
|
|
}
|
|
|
|
|
|
TimeApplication::TimeApplication()
|
|
:BApplication(HAIKU_APP_SIGNATURE)
|
|
{
|
|
f_settings = new TimeSettings();
|
|
f_window = new TTimeWindow();
|
|
}
|
|
|
|
|
|
TimeApplication::~TimeApplication()
|
|
{
|
|
delete f_settings;
|
|
}
|
|
|
|
|
|
void
|
|
TimeApplication::MessageReceived(BMessage *message)
|
|
{
|
|
switch(message->what) {
|
|
case ERROR_DETECTED:
|
|
{
|
|
(new BAlert("Error", "Something has gone wrong!","OK",NULL,NULL,B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT))->Go();
|
|
be_app->PostMessage(B_QUIT_REQUESTED);
|
|
}
|
|
break;
|
|
default:
|
|
BApplication::MessageReceived(message);
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
void
|
|
TimeApplication::ReadyToRun(void)
|
|
{
|
|
f_window->Show();
|
|
}
|
|
|
|
|
|
void
|
|
TimeApplication::AboutRequested(void)
|
|
{
|
|
(new BAlert("about", "...by Andrew Edward McCall\n...Mike Berg too", "Big Deal"))->Go();
|
|
}
|
|
|
|
|
|
void
|
|
TimeApplication::SetWindowCorner(BPoint corner)
|
|
{
|
|
f_settings->SetWindowCorner(corner);
|
|
}
|