Ejemplo n.º 1
0
 def _init_ui(self):
     splitter = wx.SplitterWindow(self, style=wx.SP_LIVE_UPDATE)
     self.notebook = NoteBook(splitter, self._application)
     mb = MenuBar(self)
     self.toolbar = ToolBar(self)
     self.actions = ActionRegisterer(mb, self.toolbar,
                                     ShortcutRegistry(self))
     self.tree = Tree(splitter, self.actions, self._application.settings)
     self.actions.register_actions(ActionInfoCollection(_menudata, self, self.tree))
     mb.take_menu_bar_into_use()
     splitter.SetMinimumPaneSize(100)
     splitter.SplitVertically(self.tree, self.notebook, 300)
     self.CreateStatusBar()
     self.SetIcons(ImageProvider().PROGICONS)
Ejemplo n.º 2
0
    def _init_ui(self):
        # self._mgr.AddPane(wx.Panel(self), aui.AuiPaneInfo().CenterPane())
        ##### self.splitter = wx.SplitterWindow(self, style=wx.SP_LIVE_UPDATE)
        # self._mgr.AddPane(wx.Panel(self), aui.AuiPaneInfo().CenterPane())
        # set up default notebook style
        self._notebook_style = aui.AUI_NB_DEFAULT_STYLE | \
                               aui.AUI_NB_TAB_EXTERNAL_MOVE | wx.NO_BORDER
        # TODO self._notebook_theme = 0 (allow to select themes for notebooks)
        # self.notebook = NoteBook(self.splitter, self._application,
        #                         self._notebook_style)
        self.notebook = NoteBook(self, self._application, self._notebook_style)
        self._mgr.AddPane(
            self.notebook,
            aui.AuiPaneInfo().Name("notebook_editors").CenterPane().PaneBorder(
                False))
        ################ Test
        # self._mgr.AddPane(self.CreateTextCtrl(),
        #                   aui.AuiPaneInfo().Name("text_content").
        #                   CenterPane().Hide().MinimizeButton(True))
        #
        # self._mgr.AddPane(self.CreateHTMLCtrl(),
        #                   aui.AuiPaneInfo().Name("html_content").
        #                   CenterPane().Hide().MinimizeButton(True))
        #
        # self._mgr.AddPane(self.CreateNotebook(),
        #                   aui.AuiPaneInfo().Name("notebook_content").
        #                   CenterPane().PaneBorder(False))
        ####################
        # self._mgr.AddPane(self.CreateSizeReportCtrl(), aui.AuiPaneInfo().
        #                   Name("test1").Caption(
        #     "Pane Caption").Top().MinimizeButton(True))

        mb = MenuBar(self)
        self.toolbar = ToolBar(self)
        self.toolbar.SetMinSize(wx.Size(100, 60))
        # self.SetToolBar(self.toolbar.GetToolBar())
        self._mgr.AddPane(
            self.toolbar,
            aui.AuiPaneInfo().Name("maintoolbar").ToolbarPane().Top())
        self.actions = ActionRegisterer(self._mgr, mb, self.toolbar,
                                        ShortcutRegistry(self))
        """
        ##### Test
        tb3 = self.testToolbar()

        self._mgr.AddPane(tb3,
                          aui.AuiPaneInfo().Name("tb3").Caption("Toolbar 3").
                          ToolbarPane().Top().Row(1).Position(1))
        
        ##### End Test
        """
        # Tree is always created here
        self.tree = Tree(self, self.actions, self._application.settings)
        self.tree.SetMinSize(wx.Size(120, 200))
        # TreePlugin will manage showing the Tree
        self.actions.register_actions(
            ActionInfoCollection(_menudata, self, self.tree))
        ###### File explorer panel is always created here
        self.filemgr = FileExplorer(self, self._controller)
        self.filemgr.SetMinSize(wx.Size(120, 200))

        mb.take_menu_bar_into_use()
        self.CreateStatusBar()
        self.SetIcons(ImageProvider().PROGICONS)
        # tell the manager to "commit" all the changes just made
        self._mgr.Update()
Ejemplo n.º 3
0
    def _init_ui(self):
        # self._mgr.AddPane(wx.Panel(self), aui.AuiPaneInfo().CenterPane())
        ##### self.splitter = wx.SplitterWindow(self, style=wx.SP_LIVE_UPDATE)
        # self._mgr.AddPane(wx.Panel(self), aui.AuiPaneInfo().CenterPane())
        # set up default notebook style
        self._notebook_style = aui.AUI_NB_DEFAULT_STYLE | \
                               aui.AUI_NB_TAB_EXTERNAL_MOVE | wx.NO_BORDER
        # TODO self._notebook_theme = 0 (allow to select themes for notebooks)
        # self.notebook = NoteBook(self.splitter, self._application,
        #                         self._notebook_style)
        self.notebook = NoteBook(self, self._application, self._notebook_style)
        self._mgr.AddPane(
            self.notebook,
            aui.AuiPaneInfo().Name("notebook_editors").CenterPane().PaneBorder(
                False))
        ################ Test
        # self._mgr.AddPane(self.CreateTextCtrl(),
        #                   aui.AuiPaneInfo().Name("text_content").
        #                   CenterPane().Hide().MinimizeButton(True))
        #
        # self._mgr.AddPane(self.CreateHTMLCtrl(),
        #                   aui.AuiPaneInfo().Name("html_content").
        #                   CenterPane().Hide().MinimizeButton(True))
        #
        # self._mgr.AddPane(self.CreateNotebook(),
        #                   aui.AuiPaneInfo().Name("notebook_content").
        #                   CenterPane().PaneBorder(False))
        ####################
        # self._mgr.AddPane(self.CreateSizeReportCtrl(), aui.AuiPaneInfo().
        #                   Name("test1").Caption(
        #     "Pane Caption").Top().MinimizeButton(True))

        mb = MenuBar(self)
        self.toolbar = ToolBar(self)
        self.toolbar.SetMinSize(wx.Size(100, 60))
        # self.SetToolBar(self.toolbar.GetToolBar())
        self._mgr.AddPane(
            self.toolbar,
            aui.AuiPaneInfo().Name("maintoolbar").ToolbarPane().Top())
        self.actions = ActionRegisterer(self._mgr, mb, self.toolbar,
                                        ShortcutRegistry(self))
        """
        ##### Test
        tb3 = self.testToolbar()

        self._mgr.AddPane(tb3,
                          aui.AuiPaneInfo().Name("tb3").Caption("Toolbar 3").
                          ToolbarPane().Top().Row(1).Position(1))
        
        ##### End Test
        """
        # self._mgr.AddPane(self.CreateTreeControl(),
        #                  aui.AuiPaneInfo().Name("tree_content").
        #                  CenterPane().Hide().MinimizeButton(True))
        ###### self.tree = Tree(self.splitter, self.actions, self._application.settings)
        self.tree = Tree(self, self.actions, self._application.settings)
        #self.tree.SetMinSize(wx.Size(100, 200))
        self.tree.SetMinSize(wx.Size(120, 200))
        self._mgr.AddPane(
            self.tree,
            aui.AuiPaneInfo().Name("tree_content").Caption(
                "Test Suites").LeftDockable(True).CloseButton(False))
        # MaximizeButton(True).MinimizeButton(True))
        self.actions.register_actions(
            ActionInfoCollection(_menudata, self, self.tree))
        ###### File explorer pane
        self.filemgr = wx.GenericDirCtrl(self,
                                         -1,
                                         size=(200, 225),
                                         style=wx.DIRCTRL_3D_INTERNAL)
        self.filemgr.SetMinSize(wx.Size(120, 200))
        # wx.CallAfter(self.filemgr.SetPath(self.tree.get_selected_datafile()))
        self._mgr.AddPane(
            self.filemgr,
            aui.AuiPaneInfo().Name("file_manager").Caption(
                "Files").LeftDockable(True).CloseButton(True))

        mb.take_menu_bar_into_use()
        #### self.splitter.SetMinimumPaneSize(100)
        #### self.splitter.SplitVertically(self.tree, self.notebook, 300)
        self.CreateStatusBar()
        self.SetIcons(ImageProvider().PROGICONS)
        # tell the manager to "commit" all the changes just made
        self._mgr.Update()