コード例 #1
0
    def __init__(self, mainwindow):
        wx.SplitterWindow.__init__(self,
                                   mainwindow.tabs,
                                   style=wx.SP_LIVE_UPDATE)
        self.world = None
        self.debug_mcp = None

        self.input_pane = InputPane(self, self)
        self.output_pane = OutputPane(self, self)
        self.main_window = wx.GetApp().GetTopWindow()

        # these two are set with dns_com_awns_serverinfo but hypothetically
        # -could- come from the saved world also
        # EDIT: and/or from MSSP, which should also be mashed into the world
        self.home_url = ''
        self.help_url = ''

        self.decompressor = zlib.decompressobj()

        # bin for Telnet IAC commands to stash any status info (on/off, etc)
        self.iac = {}

        # re-queue stuff for re-processing (ie if we turn on compression)
        self.filter_queue = b''

        self.reader = self.writer = None

        self.SplitHorizontally(self.output_pane, self.input_pane)
        self.SetMinimumPaneSize(self.input_pane.font_size()[1] * 2)

        self.Bind(wx.EVT_SPLITTER_SASH_POS_CHANGED, self.saveSplitterSize)
        self.Bind(wx.EVT_SIZE, self.HandleResize)
        self.output_pane.Bind(EVT_ROW_COL_CHANGED, self.on_row_col_changed)

        mainwindow.Bind(EVT_PREFS_CHANGED, self.doPrefsChanged)