MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / __init__

Method __init__

mitmproxy/tools/console/tabs.py:5–14  ·  view source on GitHub ↗

onclick is called on click with the tab offset as argument

(self, offset, content, attr, onclick)

Source from the content-addressed store, hash-verified

3
4class Tab(urwid.WidgetWrap):
5 def __init__(self, offset, content, attr, onclick):
6 """
7 onclick is called on click with the tab offset as argument
8 """
9 p = urwid.Text(content, align="center")
10 p = urwid.Padding(p, align="center", width=("relative", 100))
11 p = urwid.AttrMap(p, attr)
12 urwid.WidgetWrap.__init__(self, p)
13 self.offset = offset
14 self.onclick = onclick
15
16 def mouse_event(self, size, event, button, col, row, focus):
17 if event == "mouse press" and button == 1:

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected