예제 #1
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()
예제 #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
class CommandLine(Window):
    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()

    def enter(self, widget):
        if self.command.text != "":
            s = string.split(self.command.text, maxsplit=1)
            self.command.setText("")
            self.setDirty()
            if len(s) > 1:
                Events.do("command-" + s[0], s[1])
            else:
                Events.do("command-" + s[0])
예제 #4
0
class CommandLine(Window):
    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()

    def enter(self, widget):
        if (self.command.text != ''):
            s = string.split(self.command.text, maxsplit=1)
            self.command.setText('')
            self.setDirty()
            if (len(s) > 1):
                Events.do('command-' + s[0], s[1])
            else:
                Events.do('command-' + s[0])