hooke.ui.gui was getting complicated, so I stripped it down for a moment.
[hooke.git] / hooke / ui / gui / panel / welcome.py
index a9f852733bf00cbe6f8aff7808301becb5a21fc8..5b5a5ae35ce0e9f4f903454b518ba37a48af6433 100644 (file)
@@ -5,10 +5,12 @@
 
 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 +27,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)),
+            }