d1854cb931
* Implemented a text input box to name a new theme. * Made loading of themes asynchronous in a thread, controls are disabled but at least the window appears ASAP. * fixed app sig * Implemented setting colors and fonts on Haiku. * Implemented setting the window decor, but doesn't work as we don't have any decorator installed. * Enable all addons. TODO: forbid quitting while themes are loading! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23508 a95241bf-73f2-0310-859d-f6bbb57e9c96
53 lines
874 B
C++
53 lines
874 B
C++
#include <Screen.h>
|
|
#include <Window.h>
|
|
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
#include "ThemesApp.h"
|
|
#include "ThemeInterfaceView.h"
|
|
|
|
const char *kThemesAppSig = "application/x-vnd.mmu_man-Themes";
|
|
|
|
|
|
ThemesApp::ThemesApp()
|
|
: BApplication(kThemesAppSig)
|
|
{
|
|
}
|
|
|
|
|
|
ThemesApp::~ThemesApp()
|
|
{
|
|
}
|
|
|
|
|
|
void
|
|
ThemesApp::ReadyToRun()
|
|
{
|
|
BScreen s;
|
|
BRect frame(0, 0, 550, 300);
|
|
frame.OffsetBySelf(s.Frame().Width()/2 - frame.Width()/2,
|
|
s.Frame().Height()/2 - frame.Height()/2);
|
|
BWindow *w = new BWindow(frame, "Themes", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_QUIT_ON_WINDOW_CLOSE);
|
|
ThemeInterfaceView *v = new ThemeInterfaceView(w->Bounds());
|
|
w->AddChild(v);
|
|
w->Show();
|
|
}
|
|
|
|
|
|
void
|
|
ThemesApp::MessageReceived(BMessage *message)
|
|
{
|
|
switch (message->what) {
|
|
default:
|
|
BApplication::MessageReceived(message);
|
|
}
|
|
}
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
ThemesApp app;
|
|
app.Run();
|
|
}
|