Ejemplo n.º 1
0
    def __init__(self, *args, **kwargs):
        wx.Frame.__init__(self, *args, **kwargs)

        self.stateName = "LibraryAUIFrame"
        self.mgr = wx.aui.AuiManager()
        self.mgr.SetManagedWindow(self)

        self.mainView = MainView(self, -1)
        self.mgr.AddPane(self.mainView, wx.aui.AuiPaneInfo().Name("Main Window").CenterPane())

        self.props = Props.PropsView(self, -1)
        self.mgr.AddPane(self.props, wx.aui.AuiPaneInfo().Name(Props.getName()).Bottom().MinSize((-1, 200)))

        self.propsFrame = self.mgr.GetPane(Props.getName())

        self.LoadState(self.stateName)

        self.mgr.Update()

        app = wx.GetApp()
        for eventID in frameEvents:
            app.AddHandlerForID(eventID, self.mainView.menuEventHandler)
            # app.AddUIHandlerForID(eventID, self.ProcessUpdateUIEvent)

        self.CreateStatusBar()

        self.Bind(wx.EVT_CLOSE, self.OnClose)
Ejemplo n.º 2
0
    def __init__(self, *args, **kwargs):
        sc.SizedFrame.__init__(self, *args, **kwargs)
        pane = self.GetContentsPane()

        self.view = MainView(pane, -1)
        self.view.SetSizerProps(expand=True, proportion=1)

        self.palettes = []

        self.CreateStatusBar()

        import logging

        globals.errorLog = logging.getLogger("EClass.Library")

        # Re-enable this when plugins are further along.

        # for palette in wx.GetApp().palettes:
        #    if "createFrame" in dir(palette):
        #        frame = palette.createFrame(self)
        #        frame.LoadState("Library" + palette.getName() + "Frame")
        #        self.palettes.append(frame)

        self.propsFrame = Props.createFrame(self, -1)
        self.propsFrame.LoadState("LibraryPropsFrame")
        self.propsFrame.Show()

        self.props = self.propsFrame.props

        app = wx.GetApp()
        for eventID in frameEvents:
            app.AddHandlerForID(eventID, self.props.menuEventHandler)
            # app.AddUIHandlerForID(eventID, self.ProcessUpdateUIEvent)

        # self.metadataFrame = Metadata.MetadataMiniFrame(self, -1, _("Field Editor"), style=wx.CAPTION | wx.RESIZE_BORDER | wx.CLOSE_BOX)
        # self.metadataFrame.LoadState("LibraryMetadataFrame")
        # self.metadataFrame.Show()

        self.Bind(wx.EVT_CLOSE, self.OnClose)

        self.LoadState("LibraryMainFrame")