rem: BApplication app("application/x-vnd.obos-bmp-translator");
add: BApplication app("application/x-vnd.obos-stxt-translator");
context: main(){	BApplication app("application/x-vnd.obos-bmp-translator");	STXTTranslator *ptranslator = new STXTTranslator;	BView *view = NULL;	BRect rect(0, 0, 225, 175);	if (ptranslator->MakeConfigurationView(NULL, &view, &rect)) {		BAlert *err = new BAlert("Error",			"Unable to create the STXTTranslator view.", "OK");		err->Go();		return 1;	}	// release the translator even though I never really used it anyway	ptranslator->Release();	ptranslator = NULL;	STXTWindow *wnd = new STXTWindow(rect);	view->ResizeTo(rect.Width(), rect.Height());	wnd->AddChild(view);	BPoint wndpt = B_ORIGIN;	{		BScreen scrn;		BRect frame = scrn.Frame();		frame.InsetBy(10, 23);		// if the point is outside of the screen frame,		// use the mouse location to find a better point		if (!frame.Contains(wndpt)) {			uint32 dummy;			view->GetMouse(&wndpt, &dummy, false);			wndpt.x -= rect.Width() / 2;			wndpt.y -= rect.Height() / 2;			// clamp location to screen			if (wndpt.x < frame.left)				wndpt.x = frame.left;			if (wndpt.y < frame.top)				wndpt.y = frame.top;			if (wndpt.x > frame.right)				wndpt.x = frame.right;			if (wndpt.y > frame.bottom)				wndpt.y = frame.bottom;		}	}	wnd->MoveTo(wndpt);	wnd->Show();	app.Run();	return 0;}