mirror of
https://github.com/jlengrand/Ivolution.git
synced 2026-03-10 08:21:18 +00:00
Creates Filemenu.
This commit is contained in:
@@ -16,15 +16,12 @@ from .. import get_data
|
||||
# parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
# os.sys.path.insert(0,parentdir) # import parent folder
|
||||
|
||||
from .. import Facemovie_lib
|
||||
from .. import FaceParams
|
||||
from .. import FacemovieThread
|
||||
|
||||
from ..util.Notifier import Observer
|
||||
from ..util.Notifier import Observer
|
||||
from ..util.Notifier import Observable
|
||||
|
||||
import time
|
||||
|
||||
class IvolutionWindow(Observer, Observable):
|
||||
def __init__(self, name):
|
||||
FacemovieThread.Observer.__init__(self, name)
|
||||
|
||||
@@ -10,7 +10,33 @@
|
||||
|
||||
import wx
|
||||
|
||||
app = wx.App(False) # Create a new app, don't redirect stdout/stderr to a window.
|
||||
frame = wx.Frame(None, wx.ID_ANY, "Hello World") # A Frame is a top-level window.
|
||||
frame.Show(True) # Show the frame.
|
||||
app.MainLoop()
|
||||
|
||||
class IvolutionWindow(wx.Frame):
|
||||
"""
|
||||
Main Window of the application
|
||||
"""
|
||||
def __init__(self, parent, title):
|
||||
"""
|
||||
Overrides init frame wx.Frame
|
||||
"""
|
||||
wx.Frame.__init__(self, parent, title=title, size=(200, 100))
|
||||
self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE)
|
||||
self.CreateStatusBar() # A Statusbar in the bottom of the window
|
||||
|
||||
# Setting up the menu.
|
||||
filemenu = wx.Menu()
|
||||
|
||||
# wx.ID_ABOUT and wx.ID_EXIT are standard IDs provided by wxWidgets.
|
||||
filemenu.Append(wx.ID_ABOUT, "&About", " Information about this program")
|
||||
filemenu.AppendSeparator()
|
||||
filemenu.Append(wx.ID_EXIT, "E&xit", " Terminate the program")
|
||||
|
||||
# Creating the menubar.
|
||||
menuBar = wx.MenuBar()
|
||||
menuBar.Append(filemenu, "&File") # Adding the "filemenu" to the MenuBar
|
||||
self.SetMenuBar(menuBar) # Adding the MenuBar to the Frame content.
|
||||
self.Show(True)
|
||||
|
||||
app = wx.App(False)
|
||||
frame = IvolutionWindow(None, "Ivolution Window")
|
||||
app.MainLoop() # Runs application
|
||||
|
||||
Reference in New Issue
Block a user