예제 #1
0
    def __init__(self, x, y, w, h, topmost = 0):
        Window.__init__(self, x, y, w, h, topmost)
        self.setLayout(pyui.layouts.BorderLayoutManager())

        fields = [
            ('string', 'user', 'Name:', 24, 5),
            ('password', 'pass', 'Password:'******'checkbox', 'guest', '', 24, 'Login as a guest?')
            ]

        self.form = FormPanel(fields)
        self.form.widget_user.handler = self.doLogin
        self.form.widget_pass.handler = self.doLogin

        self.registerEvent(pyui.locals.KEYDOWN, self._pyuiKeyDown)
        
        self.login = Button('Login', self.doLogin)
        self.create = Button('Create Account', self.doLogin)
        
        self.botPanel = Panel()
        self.botPanel.addChild(self.login)
        self.botPanel.addChild(self.create)
        
        self.addChild(self.form, pyui.locals.CENTER)
        self.addChild(self.botPanel, pyui.locals.SOUTH)
        self.pack()

        self.form.widget_user.getFocus()
예제 #2
0
    def __init__(self):
        Window.__init__(self, 0, getDesktop().height - 24, getDesktop().width, 24, topmost=1)
        self.setLayout(pyui.layouts.BorderLayoutManager())

        self.command = Edit("Enter commands here.", 255, self.enter)
        self.addChild(self.command, pyui.locals.CENTER)
        self.pack()
예제 #3
0
    def __init__(self, x, y, w, h, topmost=0):
        Window.__init__(self, x, y, w, h, topmost)
        self.setLayout(pyui.layouts.BorderLayoutManager())

        fields = [('string', 'user', 'Name:', 24, 5),
                  ('password', 'pass', 'Password:'******'checkbox', 'guest', '', 24, 'Login as a guest?')]

        self.form = FormPanel(fields)
        self.form.widget_user.handler = self.doLogin
        self.form.widget_pass.handler = self.doLogin

        self.registerEvent(pyui.locals.KEYDOWN, self._pyuiKeyDown)

        self.login = Button('Login', self.doLogin)
        self.create = Button('Create Account', self.doLogin)

        self.botPanel = Panel()
        self.botPanel.addChild(self.login)
        self.botPanel.addChild(self.create)

        self.addChild(self.form, pyui.locals.CENTER)
        self.addChild(self.botPanel, pyui.locals.SOUTH)
        self.pack()

        self.form.widget_user.getFocus()
예제 #4
0
    def __init__(self):
        Window.__init__(self,
                        0,
                        getDesktop().height - 24,
                        getDesktop().width,
                        24,
                        topmost=1)
        self.setLayout(pyui.layouts.BorderLayoutManager())

        self.command = Edit("Enter commands here.", 255, self.enter)
        self.addChild(self.command, pyui.locals.CENTER)
        self.pack()
예제 #5
0
    def __init__(self):
        Window.__init__(self, 0, 0, getDesktop().width, \
                        getDesktop().height/4, topmost = 1)
        self.setLayout(pyui.layouts.BorderLayoutManager())
        self.outputBox = LineDisplay()
        self.addChild(self.outputBox, pyui.locals.CENTER)
        self.pack()

	Events.addCallbacks('keyDown', self.keyDown)
	
        self.oldout = sys.stdout
        sys.stdout = self
예제 #6
0
    def __init__(self):
        Window.__init__(self, 0, 0, getDesktop().width, \
                        getDesktop().height/4, topmost = 1)
        self.setLayout(pyui.layouts.BorderLayoutManager())
        self.outputBox = LineDisplay()
        self.addChild(self.outputBox, pyui.locals.CENTER)
        self.pack()

        Events.addCallbacks('keyDown', self.keyDown)

        self.oldout = sys.stdout
        sys.stdout = self