mirror of
https://review.haiku-os.org/haiku
synced 2025-01-31 02:35:03 +01:00
b045287228
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29815 a95241bf-73f2-0310-859d-f6bbb57e9c96
85 lines
1.2 KiB
C++
85 lines
1.2 KiB
C++
/*
|
|
* Copyright 2009, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
|
|
|
|
#include "CharacterMap.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <Alert.h>
|
|
#include <Application.h>
|
|
#include <TextView.h>
|
|
|
|
#include "CharacterWindow.h"
|
|
|
|
|
|
const char* kSignature = "application/x-vnd.Haiku-CharacterMap";
|
|
|
|
|
|
CharacterMap::CharacterMap()
|
|
: BApplication(kSignature)
|
|
{
|
|
}
|
|
|
|
|
|
CharacterMap::~CharacterMap()
|
|
{
|
|
}
|
|
|
|
|
|
void
|
|
CharacterMap::ReadyToRun()
|
|
{
|
|
fWindow = new CharacterWindow();
|
|
fWindow->Show();
|
|
}
|
|
|
|
|
|
void
|
|
CharacterMap::RefsReceived(BMessage* message)
|
|
{
|
|
fWindow->PostMessage(message);
|
|
}
|
|
|
|
|
|
void
|
|
CharacterMap::MessageReceived(BMessage* message)
|
|
{
|
|
BApplication::MessageReceived(message);
|
|
}
|
|
|
|
|
|
void
|
|
CharacterMap::AboutRequested()
|
|
{
|
|
BAlert *alert = new BAlert("about", "CharacterMap\n"
|
|
"\twritten by Axel Dörfler\n"
|
|
"\tCopyright 2009, Haiku Inc.\n", "Ok");
|
|
BTextView *view = alert->TextView();
|
|
BFont font;
|
|
|
|
view->SetStylable(true);
|
|
|
|
view->GetFont(&font);
|
|
font.SetSize(18);
|
|
font.SetFace(B_BOLD_FACE);
|
|
view->SetFontAndColor(0, 12, &font);
|
|
|
|
alert->Go();
|
|
}
|
|
|
|
|
|
// #pragma mark -
|
|
|
|
|
|
int
|
|
main(int /*argc*/, char** /*argv*/)
|
|
{
|
|
CharacterMap app;
|
|
app.Run();
|
|
|
|
return 0;
|
|
}
|