from wxPython.wx import *

ID_NEW = 101
ID_EXIT  = 102
ID_ABOUT = 103

class HelloFrame(wxFrame):
  def __init__(self, parent, ID, title):
    wxFrame.__init__(self, parent, ID, title,
                     wxDefaultPosition, wxSize(320, 240))

    fileMenu = wxMenu()
    fileMenu.Append(ID_NEW, "&Nouveau", "Nouveau document")
    fileMenu.AppendSeparator()
    fileMenu.Append(ID_EXIT, "&Quitter", "Quitter le programme")

    aboutMenu = wxMenu()
    aboutMenu.Append(ID_ABOUT, "&A Propos", "A propos de ce programme")

    menuBar = wxMenuBar()
    menuBar.Append(fileMenu, "&Fichier");
    menuBar.Append(aboutMenu, "&Aide");

    self.SetMenuBar(menuBar)

    self.CreateStatusBar()
    self.SetStatusText("Login: le magazine")

    EVT_MENU(self, ID_ABOUT, self.AboutBox)

  def AboutBox(self, event):
    dlg = wxMessageDialog(self, "Login:\n(C)2002 Posse Press",
                          "A Propos...", wxOK | wxICON_INFORMATION)
    dlg.ShowModal()
    dlg.Destroy()

class HelloApp(wxApp):
  def OnInit(self):
    frame = HelloFrame(NULL, -1, "BOUM ! V'LA L'REMOULEUR !")
    frame.Show(true)
    self.SetTopWindow(frame)
    return true

app = HelloApp(0)
app.MainLoop()
