Creates Filemenu.

This commit is contained in:
Julien Lengrand-Lambert
2012-08-18 10:07:58 +02:00
parent dbe21cb6b6
commit 71d956e5fa
2 changed files with 31 additions and 8 deletions

View File

@@ -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)

View File

@@ -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