def __init__(self, master, skeleton): PanedWindow.__init__(self, master=master, height=400) self.skeleton = skeleton self.figure = Figure(figsize=(5,4), dpi=100) self.subplots = {} nrows = len(self.skeleton.units) ncols = 3 plot_counter = 1 for u in self.skeleton.units.keys(): subplots = [None, None, None] history = self.skeleton.units[u].history() t = range(0, len(history[0])) for a in range(0, 3): subplot = self.figure.add_subplot(nrows, ncols, plot_counter, xlim=[0,200], ylim=[-90,90]) s = history[a] subplot.plot(t,s) plot_counter += 1 subplots[a] = subplot self.subplots[u] = subplots self.canvas = FigureCanvasTkAgg(self.figure, master=self) self.canvas.show() self.canvas.get_tk_widget().pack(side="top", fill="both", expand=1) self.canvas.mpl_connect("key_press_event", self.pressed_key) self.pack(fill="both", expand="yes")
def __init__(self, master, color="gray", size=60, sashpad=2, disallow_dragging=False, on_click=None, image=None, cursor=None, opaqueresize=True): Tk_PanedWindow.__init__(self, master, showhandle = False, orient=self.ORIENT, sashpad=sashpad, opaqueresize=opaqueresize) self._active_sash = None self._on_click = on_click self._image = image self._color = color self._cursor = cursor self._configure_callbacks = [] if not opaqueresize: disallow_dragging = True self._disallow_dragging = disallow_dragging self._handle_list = [] self._list_of_panes = [] if self.ORIENT == VERTICAL: self._width= size self._height = 2*sashpad else: self._width = 2*sashpad self._height= size if opaqueresize: self.bind('<Button-1>', self._on_mark_sash) self.bind('<B1-Motion>', self._on_drag_sash) self.bind('<ButtonRelease-1>', self._on_release)
def __init__(self, gesture, master=None): self.gesture = gesture PanedWindow.__init__(self, master=master, height=500, orient="vertical") self.pack(fill="both", expand="yes") self.gesture_view = GestureView(gesture=self.gesture, master=self) self.tools_view = ToolsView(gesture=self.gesture, master=self)
def __init__(self, root, title, map, width=WINDOW_W, height=WINDOW_H): PanedWindow.__init__(self) self.root = root self.set_title(title) self.set_map(map) self.width = width self.height = height self.add_pane() self.add_panel()
def __init__(self, master, color="gray", size=60, sashpad=2, disallow_dragging=False, on_click=None, image=None, cursor=None, opaqueresize=True): Tk_PanedWindow.__init__(self, master, showhandle=False, orient=self.ORIENT, sashpad=sashpad, opaqueresize=opaqueresize) self._active_sash = None self._on_click = on_click self._image = image self._color = color self._cursor = cursor self._configure_callbacks = [] if not opaqueresize: disallow_dragging = True self._disallow_dragging = disallow_dragging self._handle_list = [] self._list_of_panes = [] if self.ORIENT == VERTICAL: self._width = size self._height = 2 * sashpad else: self._width = 2 * sashpad self._height = size if opaqueresize: self.bind('<Button-1>', self._on_mark_sash) self.bind('<B1-Motion>', self._on_drag_sash) self.bind('<ButtonRelease-1>', self._on_release)
def __init__(self, data, master=None): PanedWindow.__init__(self, master=master) self.data = data self.create_widgets() self.pack(fill="both", expand="yes")
def __init__(self, parent, pack_location=None, **kwargs): pw.__init__(self, parent, **kwargs) if pack_location: self.pack(side=pack_location, fill='both', expand=True) self.elements = {}