Ejemplo n.º 1
0
    def __init__(self, parent, connection):
        BasePane.__init__(self, parent, connection, style=wx.TE_PROCESS_ENTER | wx.TE_MULTILINE)

        self.cmd_history = CommandHistory(self)
        self.tab_completion = TabCompletion(self, connection)

        self.tabs = wx.GetApp().GetTopWindow().tabs

        self.Bind(wx.EVT_TEXT_ENTER, self.send_to_connection)
        self.Bind(wx.EVT_TEXT, self.onTextChange)
        self.Bind(wx.EVT_KEY_DOWN, self.check_for_interesting_keystrokes)

        if prefs.get("use_x_copy_paste") == "True":
            self.Bind(wx.EVT_MIDDLE_DOWN, self.paste_from_selection)
            self.Bind(rtc.EVT_RICHTEXT_SELECTION_CHANGED, self.copy_from_selection)

        self.Clear()
        self.restyle_thyself()
Ejemplo n.º 2
0
    def __init__(self, parent, connection):
        BasePane.__init__(
            self, parent, connection, style=wx.TE_AUTO_URL | wx.TE_READONLY | wx.TE_NOHIDESEL | wx.TE_MULTILINE
        )

        # state toggles for ANSI processing
        self.intensity = ""
        self.inverse = False

        self.theme = Theme()

        # TODO - this probably should be a preference, but for now, this is the
        # least-bad default behavior.
        self.Bind(wx.EVT_SIZE, self.on_size)
        self.Bind(wx.EVT_SET_FOCUS, self.focus_input)
        self.Bind(wx.EVT_TEXT_URL, self.process_url_click)
        self.Bind(wx.EVT_MIDDLE_DOWN, self.connection.input_pane.paste_from_selection)
        self.Bind(rtc.EVT_RICHTEXT_SELECTION_CHANGED, self.copy_from_selection)
        self.Bind(EVT_ROW_COL_CHANGED, self.on_row_col_changed)
Ejemplo n.º 3
0
    def __init__(self, parent, connection):
        BasePane.__init__(self,
                          parent,
                          connection,
                          style=wx.TE_PROCESS_ENTER | wx.TE_MULTILINE)

        self.cmd_history = CommandHistory(self)
        self.tab_completion = TabCompletion(self, connection)

        self.tabs = wx.GetApp().GetTopWindow().tabs

        self.Bind(wx.EVT_TEXT_ENTER, self.send_to_connection)
        self.Bind(wx.EVT_TEXT, self.onTextChange)
        self.Bind(wx.EVT_KEY_DOWN, self.check_for_interesting_keystrokes)
        self.Bind(wx.EVT_CHAR_HOOK, self.do_keyboard_copy)

        self.AddClearAllToMenu()

        self.Clear()
        self.restyle_thyself()
Ejemplo n.º 4
0
    def __init__(self, parent, connection):
        BasePane.__init__(self,
                          parent,
                          connection,
                          style=wx.TE_AUTO_URL | wx.TE_READONLY
                          | wx.TE_NOHIDESEL | wx.TE_MULTILINE)

        # state toggles for ANSI processing
        self.intensity = ''
        self.conceal = self.inverse = False
        self.blink = self.fast_blink = False
        self.blink_timer = self.fast_blink_timer = False
        self.blink_chars = []
        self.fast_blink_chars = []

        self.initial_style = rtc.RichTextAttr()
        self.initial_style.SetLeftIndent(10, 50)  # TODO make this a pref?
        self.current_style = rtc.RichTextAttr(self.initial_style)

        self.is_scrolled_back = False

        # output filters can register themselves
        self.filters = [self.lm_localedit_filter]
        self.localedit_contents = None

        # "holding bin" for line-based filters to enqueue partial lines
        self.global_queue = ''

        # TODO - this probably should be a preference, but for now, this is the
        # least-bad default behavior.
        self.Bind(wx.EVT_SIZE, self.on_size)
        self.Bind(wx.EVT_SET_FOCUS, self.on_set_focus)
        self.Bind(wx.EVT_TEXT_URL, self.on_url_click)
        self.Bind(wx.EVT_SCROLLWIN, self.on_scroll)

        self.Bind(EVT_ROW_COL_CHANGED, self.on_row_col_changed)
Ejemplo n.º 5
0
    def __init__(self, parent, connection):
        BasePane.__init__(self,
                          parent,
                          connection,
                          style=wx.TE_AUTO_URL | wx.TE_READONLY
                          | wx.TE_NOHIDESEL | wx.TE_MULTILINE)

        # state toggles for ANSI processing
        self.intensity = ''
        self.inverse = False

        # output filters can register themselves
        self.filters = [self.lm_localedit_filter]
        self.localedit_contents = None

        # "holding bin" for line-based filters to enqueue partial lines
        self.global_queue = ''

        # TODO - this probably should be a preference, but for now, this is the
        # least-bad default behavior.
        self.Bind(wx.EVT_SIZE, self.on_size)
        self.Bind(wx.EVT_SET_FOCUS, self.focus_input)
        self.Bind(wx.EVT_TEXT_URL, self.process_url_click)
        self.Bind(EVT_ROW_COL_CHANGED, self.on_row_col_changed)