Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import panelOne, panelTwo, panelThree
- import sys, os
- import wx
- import wx.lib.agw.aui as aui
- import ectworker as EW
- import commonDlgs as dlg
- ########################################################################
- class AUIManager(aui.AuiManager):
- """
- AUI Manager class
- """
- def __init__(self, managed_window):
- """Constructor"""
- aui.AuiManager.__init__(self)
- self.SetManagedWindow(managed_window)
- ########################################################################
- class AUINotebook(aui.AuiNotebook):
- def __init__(self, parent):
- """Constructor"""
- self.d_style = aui.AUI_NB_DEFAULT_STYLE | wx.NO_BORDER
- self.d_style &= ~(aui.AUI_NB_CLOSE_ON_ACTIVE_TAB)
- aui.AuiNotebook.__init__(self, parent=parent, agwStyle=self.d_style)
- self.SetArtProvider(aui.VC71TabArt())
- pages = [panelOne, panelTwo, panelThree]
- for page in pages:
- label = page.TabLabel
- tab = page.TabPanel(self)
- self.AddPage(tab, label, False)
- ########################################################################
- class MainFrame(wx.Frame):
- """
- wx.Frame class
- """
- #----------------------------------------------------------------------
- def __init__(self):
- """Constructor"""
- title = "XML Checking Tool - Beta"
- wx.Frame.__init__(self, None, wx.ID_ANY, title=title, size=(450,640))
- self.SetIcon(wx.Icon('images/temp_logo_no_back.ico', wx.BITMAP_TYPE_ICO))
- self.aui_mgr = AUIManager(self)
- self.notebook = AUINotebook(self)
- self.aui_mgr.AddPane(self.notebook,
- aui.AuiPaneInfo().Name("notebook_content").
- CenterPane().PaneBorder(False))
- self.aui_mgr.Update()
- mBar = wx.MenuBar()
- sBar = self.CreateStatusBar()
- fileMenu = wx.Menu()
- fileMenu.Append(wx.ID_CLOSE,"Close\tCtrl+X","Exit the program")
- self.Bind(wx.EVT_MENU,self.onExit,id=wx.ID_CLOSE)
- mBar.Append(fileMenu, '&File')
- helpMenu = wx.Menu()
- helpMenu.Append(100, '&Help', 'Basic help information - Not quite functional yet.')
- self.Bind(wx.EVT_MENU, self.onHelp, id=100)
- helpMenu.Append(101, '&About', 'About this program')
- self.Bind(wx.EVT_MENU, self.onAboutBox, id=101)
- mBar.Append(helpMenu, '&Help')
- self.SetMenuBar(mBar)
- #----------------------------------------------------------------------
- def onExit(self, event):
- self.Close()
- def onHelp(self, event):
- dlg.showInfoDlg('This feature has not been added yet. It is being worked on, but I do not have an ETA for it.','Information')
- def onAboutBox(self, event):
- """ This section works in the actual program """
- pass
- def RunApp():
- app = wx.App()
- frame = MainFrame()
- frame.Show()
- app.MainLoop()
- #----------------------------------------------------------------------
- if __name__ == "__main__":
- RunApp()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement