Пример #1
0
    def MainWindow(self, show=True):
        '''
		Main window.
		'''
        self.icons = nanogui.loadImageDirectory(self.screen.nvgContext(),
                                                "icons")

        self.main_wnd = Widget(self.screen)
        layout = GroupLayout()
        layout.setMargin(3)
        self.main_wnd.setLayout(layout)
        self.main_wnd.setFixedSize((self.main_width, self.main_height))

        b = Button(self.main_wnd, "Export")
        b.setFixedHeight(25)
        b.setCallback(ps_act.ExportFiles)

        # Slots.
        slots = Widget(self.main_wnd)
        slots.setPosition((20, 60))
        slots.setFixedHeight(345)

        self.DrawSlots(slots)

        # Tools.
        self.Tools(self.main_wnd)

        # Final draw.
        self.screen.setBackground(backgr_color)
        self.screen.drawAll()
        self.screen.drawContents()
        self.screen.performLayout()