Files
@ eb6c3126cf26
Branch filter:
Location: OneEye/src/gui/menu.py - annotation
eb6c3126cf26
608 B
text/x-python
StateBag: optimized estimateDistance, tests for dealing with wrong states
5f2136fcbebd bc96e653888e 5f2136fcbebd 5f2136fcbebd bc96e653888e bc96e653888e 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd bc96e653888e 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd bc96e653888e 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd | import tkinter as tk
from .util import MsgMixin
from .settings import Settings
class MainMenu(MsgMixin):
def __init__(self,parent,root):
self.root=root
self.parent=parent
self._createWidgets()
def _createWidgets(self):
bar=self._createTopBar()
file = tk.Menu(bar)
help_ = tk.Menu(bar)
bar.add_cascade(menu=file, label='File')
bar.add_cascade(menu=help_, label='Help')
file.add_command(label="Settings",command=lambda: Settings(self.parent))
help_.add_command(label="About")
def _createTopBar(self):
menubar = tk.Menu(self.root)
self.root['menu'] = menubar
return menubar
|