예제 #1
0
 def __init__(self, name='MenuVBoxWindow'):
     Window.__init__(self)
     self.set_name(name)
     self.vbox = VBox()
     self.add(self.vbox)
     self.menubar = SimpleMenuBar()
     self.vbox.pack_start(self.menubar, FALSE, FALSE, 0)
     self.vbox.show()
     self.show()
예제 #2
0
 def __init__(self, name='CommandBox'):
     VBox.__init__(self)
     self.set_name(name)
     self.tbar = HandleToolbar()
     self.menubar = SimpleMenuBar()
     self.pack_start(self.menubar, FALSE, FALSE, 0)
     self.pack_end(self.tbar, FALSE, FALSE, 0)
     self.show()
예제 #3
0
 def __init__(self, name='MenuVBoxWindow'):
     Window.__init__(self)
     self.set_name(name)
     self.vbox = VBox()
     self.add(self.vbox)
     self.menubar = SimpleMenuBar()
     self.vbox.pack_start(self.menubar, False, False, 0)
     self.vbox.show()
     self.show()
예제 #4
0
class MenuWindowOrig(Window):
    def __init__(self, name='MenuVBoxWindow'):
        Window.__init__(self)
        self.set_name(name)
        self.vbox = VBox()
        self.add(self.vbox)
        self.menubar = SimpleMenuBar()
        self.vbox.pack_start(self.menubar, False, False, 0)
        self.vbox.show()
        self.show()

    def add_menu(self, commands, name, function, radio=False):
        if radio:
            new_menu = RadioMenu(commands, function)
        else:
            new_menu = SimpleMenu()
            for command in commands:
                new_menu.add(command, function)
        self.menubar.append(new_menu, name)
예제 #5
0
class MenuWindowOrig(Window):
    def __init__(self, name='MenuVBoxWindow'):
        Window.__init__(self)
        self.set_name(name)
        self.vbox = VBox()
        self.add(self.vbox)
        self.menubar = SimpleMenuBar()
        self.vbox.pack_start(self.menubar, FALSE, FALSE, 0)
        self.vbox.show()
        self.show()

    def add_menu(self, commands, name, function, radio=False):
        if radio:
            new_menu = RadioMenu(commands, function)
        else:
            new_menu = SimpleMenu()
            for command in commands:
                new_menu.add(command, function)
        self.menubar.append(new_menu, name)