diff options
author | Johnathan Corgan | 2009-10-15 11:00:30 -0700 |
---|---|---|
committer | Johnathan Corgan | 2009-10-29 07:00:34 -0700 |
commit | 00613b260a36923509eab1811256815269dcd99c (patch) | |
tree | 40d874e03bd032af901593e90978495e446a5d54 /gr-wxgui | |
parent | 92f2da3450b3ae0a5d16d322ad42c7812c4ffc62 (diff) | |
download | gnuradio-00613b260a36923509eab1811256815269dcd99c.tar.gz gnuradio-00613b260a36923509eab1811256815269dcd99c.tar.bz2 gnuradio-00613b260a36923509eab1811256815269dcd99c.zip |
Add placeholder panel for console, use old style window size
Diffstat (limited to 'gr-wxgui')
-rw-r--r-- | gr-wxgui/src/python/term_window.py | 25 | ||||
-rw-r--r-- | gr-wxgui/src/python/termsink.py | 7 |
2 files changed, 28 insertions, 4 deletions
diff --git a/gr-wxgui/src/python/term_window.py b/gr-wxgui/src/python/term_window.py index cae19c07a..8658e54a6 100644 --- a/gr-wxgui/src/python/term_window.py +++ b/gr-wxgui/src/python/term_window.py @@ -22,7 +22,28 @@ 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) diff --git a/gr-wxgui/src/python/termsink.py b/gr-wxgui/src/python/termsink.py index 92aba47f4..2c583b115 100644 --- a/gr-wxgui/src/python/termsink.py +++ b/gr-wxgui/src/python/termsink.py @@ -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, ) - |