test/data/vclamp_jpk/README: Document sample versions
[hooke.git] / hooke / ui / gui / panel / welcome.py
index a9f852733bf00cbe6f8aff7808301becb5a21fc8..6dc10f20ef69b4315bd405285ba05e96dabb1d15 100644 (file)
@@ -1,14 +1,31 @@
-# Copyright
+# Copyright (C) 2010-2012 W. Trevor King <wking@tremily.us>
+#
+# This file is part of Hooke.
+#
+# Hooke is free software: you can redistribute it and/or modify it under the
+# terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# Hooke is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with Hooke.  If not, see <http://www.gnu.org/licenses/>.
 
 """Welcome panel for Hooke.
 """
 
 import wx
 
+from . import Panel
 
-class Welcome (wx.html.HtmlWindow):
+
+class WelcomeWindow (wx.html.HtmlWindow):
     def __init__(self, *args, **kwargs):
-        super(Welcome, self).__init__(self, *args, **kwargs)
+        super(WelcomeWindow, self).__init__(self, *args, **kwargs)
         lines = [
             '<h1>Welcome to Hooke</h1>',
             '<h3>Features</h3>',
@@ -25,3 +42,13 @@ class Welcome (wx.html.HtmlWindow):
             'for more information</p>',
             ]
         ctrl.SetPage('\n'.join(lines))
+
+class WelcomePanel (Panel, wx.Panel):
+    def __init__(self, callbacks=None, **kwargs):
+        super(WelcomePanel, self).__init__(
+            name='welcome', callbacks=callbacks, **kwargs)
+        self._c = {
+            'window': WelcomeWindow(
+                parent=self,
+                size=wx.Size(400, 300)),
+            }