def main(self):

        self.pyshell_locals['controller'] = self
        
        gmlfile = self.gmlfile
        toolkit = self.toolkit
        
        self.view = view = toolkit.mainView()
        view.controller = self
        self.pyshell_locals[ 'view' ] = view
        
        from luban.gml import gml2gui
        view = gml2gui( gmlfile, self, toolkit.renderer() )

        view.start()
        return
    def main(self):

        self.pyshell_locals['controller'] = self

        gmlfile = self.gmlfile
        toolkit = self.toolkit

        self.view = view = toolkit.mainView()
        view.controller = self
        self.pyshell_locals['view'] = view

        from luban.gml import gml2gui
        view = gml2gui(gmlfile, self, toolkit.renderer())

        view.start()
        return
    def main(self):

        self.pyshell_locals['_controller'] = self
        
        gmlfile = self.gmlfile
        toolkit = self.toolkit
        
        self.view = view = toolkit.mainView()
        view.controller = self
        self.pyshell_locals['_view'] = view
        
        from luban.gml import gml2gui
        view = gml2gui(gmlfile, self, toolkit.renderer())
        
        import pylab
        self.pyshell_locals['pylab'] = pylab

        import histogram
        self.pyshell_locals['histogram'] = histogram.histogram
        self.pyshell_locals['axis'] = histogram.axis
        self.pyshell_locals['arange'] = histogram.arange
        
        plotwindow = view.getSubview('histogramfigure')
        plotwindow.makePylabUsable()

        self.pyshell_locals['refresh'] = self.refreshPlot
        def _plot(): return plotwindow.plot
        self.pyshell_locals['_plot'] = _plot
        
        self.plotCmdHistory = {}

        #add "." to sys.path
        import sys
        sys.path = ['.'] + sys.path

        from Tools import Tools
        self._tools = Tools(self)

        self.addDefaultTools()
        view.start()
        return
    def main(self):
        from luban.View import View
        view = View()
        self.view = view

        from luban.gml import gml2gui
        hellogml = self.hellogml
        view = gml2gui( hellogml, self, self.toolkit.renderer() )
        
        dialog = view.getSubview( 'hellodialog' )
        dialog.show()

        ret = None
        
        if dialog.ok():
            name = view.getSubview('namefield').value()
            greetings = view.getSubview('greetingsfield').value()
            ret = name, greetings
            pass
        
        dialog.destroy()

        return ret
    def main(self):
        from luban.View import View
        view = View()
        self.view = view

        from luban.gml import gml2gui
        hellogml = self.hellogml
        view = gml2gui(hellogml, self, self.toolkit.renderer())

        dialog = view.getSubview('hellodialog')
        dialog.show()

        ret = None

        if dialog.ok():
            name = view.getSubview('namefield').value()
            greetings = view.getSubview('greetingsfield').value()
            ret = name, greetings
            pass

        dialog.destroy()

        return ret