Add placeholder panel for console, use old style window size
authorJohnathan Corgan <jcorgan@corganenterprises.com>
Thu, 15 Oct 2009 18:00:30 +0000 (11:00 -0700)
committerJohnathan Corgan <jcorgan@corganenterprises.com>
Thu, 29 Oct 2009 14:00:34 +0000 (07:00 -0700)
gr-wxgui/src/python/term_window.py
gr-wxgui/src/python/termsink.py

index cae19c07aad7b70c30b5f72292214bb4d7d97457..8658e54a6e096396a097101b6ad4fc5e05057e5e 100644 (file)
 import wx
 import pubsub
 
+DEFAULT_WIN_SIZE = (600, 300)
+
 class term_window(wx.Panel, pubsub.pubsub):
-       def __init__(self, parent):
+       def __init__(self,
+                    parent,
+                    size,
+                    ):
+
                pubsub.pubsub.__init__(self)
-               wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
+               wx.Panel.__init__(self,
+                                 parent,
+                                 size=size,
+                                 style=wx.SIMPLE_BORDER,
+                                 )
+
+               self.text_ctrl = wx.TextCtrl(self,
+                                            wx.ID_ANY,
+                                            value="BOO",
+                                            size=size,
+                                            style=wx.TE_MULTILINE|wx.TE_READONLY,
+                                       )
+
+               main_sizer = wx.BoxSizer(wx.VERTICAL)
+               main_sizer.Add(self.text_ctrl, 1, wx.EXPAND)
+               self.SetSizerAndFit(main_sizer)
index 92aba47f4f57085a918480b1c6b7c50865c34331..2c583b1150c66d4fcde6522d49dbc2142a0dbe00 100644 (file)
@@ -24,7 +24,10 @@ import common
 from gnuradio import gr
 
 class termsink(gr.hier_block2, common.wxgui_hb):
-       def __init__(self,parent):
+       def __init__(self,
+                    parent,
+                    ):
+
                gr.hier_block2.__init__(
                        self,
                        "termsink",
@@ -34,5 +37,5 @@ class termsink(gr.hier_block2, common.wxgui_hb):
 
                self.win = term_window.term_window(
                        parent=parent,
+                       size=term_window.DEFAULT_WIN_SIZE,
                )
-