def main():
    import wx
    from frame_view  import FrameView
    from frame_model import FrameModel


    logfile =  "_error.log"
    app = wx.App(redirect=False, filename=logfile)
    fv, fm = FrameView(), FrameModel()
    fp = FramePresenter(fm, fv)
    panel = wx.Panel(fv, -1)
    fv.append_panel(panel)

    # menubar
    from menubar_view      import MenubarView
    from menubar_model     import MenubarModel
    from menubar_presenter import MenubarPresenter
    mm, mv = MenubarModel(), MenubarView(fv)
    mp = MenubarPresenter(mm, mv)
    mm.init_event.fire()
    fv.set_menubar(mv)

    fv.Show()

    try:
        app.MainLoop()
    except:
        app.RedirectStdio()
def main():
    import wx
    from frame_view       import FrameView
    from frame_interactor import FrameInteractor

    logfile =  "_error.log"
    app = wx.App(redirect=False, filename=logfile)

    fv = FrameView()
    fp = FramePresenter(fv)
    panel = wx.Panel(fv, -1)
    fv.append_pane(panel)

    fv.Show()

    try:
        app.MainLoop()
    except:
        app.RedirectStdio()
Exemplo n.º 3
0
class Frame(object):

    def __init__(self):
        from frame_view  import FrameView
        from frame_presenter import FramePresenter

        self.view = FrameView()
        self.presen = FramePresenter(view=self.view)

    def get_view(self):
        return self.view

    def append_pane(self, pane, paneinfo):
        self.presen.append_pane(pane, paneinfo)

    def set_menubar(self, menubar):
        self.view.set_menubar(menubar)

    def show(self):
        self.view.show()

    def init(self):
        self.presen.init()
Exemplo n.º 4
0
    def __init__(self):
        from frame_view  import FrameView
        from frame_presenter import FramePresenter

        self.view = FrameView()
        self.presen = FramePresenter(view=self.view)