Initial implementation of the common BAboutWindow class. Of course I just

realized that calling it a window may not be strictly correct since it isn't a
decendent of BWindow, but just uses a BAlert. Oh well, it can be changed if
need be.

I'm also checking in the first use of it, in ShowImage. Since ShowImage can
still be compiled for R5 I've added a #ifdef around the new BAboutWindow
related code.

I'm open for suggestions for the interface for this class, well mostly the
constructor. I'm not a big fan of having to specify the number of authors.

For now I'm making the header private, but I don't think it would be a big deal
to expose it publically.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21389 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ryan Leavengood
2007-06-11 00:14:32 +00:00
parent 59ab99e7c6
commit a8a83855b0
5 changed files with 108 additions and 1 deletions
+28
View File
@@ -0,0 +1,28 @@
/*
* Copyright 2007 Haiku, Inc.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ryan Leavengood, [email protected]
*/
#ifndef B_ABOUT_WINDOW_H
#define B_ABOUT_WINDOW_H
#include <String.h>
class BAboutWindow {
public:
BAboutWindow(char *appName, int32 firstCopyrightYear,
int32 numAuthors, const char **authors, char *extraInfo = NULL);
virtual ~BAboutWindow();
void Show();
private:
BString* fAppName;
BString* fText;
};
#endif // B_ABOUT_WINDOW_H