Ejemplo n.º 1
0
    def _create_view_frame(self):
        """This will create the self._view_frame for this module.

        objectDict is a dictionary with VTK object descriptions as keys and
        the actual corresponding instances as values.  If you specify
        objectDict as none, the introspection controls won't get added.
        """

        parent_window = self._module_manager.get_module_view_parent_window()

        viewFrame = wx.Frame(parent_window, -1,
                             module_utils.create_module_view_frame_title(self))
        viewFrame.viewFramePanel = wx.Panel(viewFrame, -1)

        viewFramePanelSizer = wx.BoxSizer(wx.VERTICAL)
        # make sure there's a 7px border at the top
        # FIXME: changed 10, 7 to tuple for wxPython 2.6
        viewFramePanelSizer.Add((10, 7), 0, wx.EXPAND)
        viewFrame.viewFramePanel.SetAutoLayout(True)
        viewFrame.viewFramePanel.SetSizer(viewFramePanelSizer)

        viewFrameSizer = wx.BoxSizer(wx.VERTICAL)
        viewFrameSizer.Add(viewFrame.viewFramePanel, 1, wx.EXPAND, 0)
        viewFrame.SetAutoLayout(True)
        viewFrame.SetSizer(viewFrameSizer)

        if self._object_dict != None:
            module_utils.create_standard_object_introspection(
                self, viewFrame, viewFrame.viewFramePanel, self._object_dict,
                None)

        module_utils.create_eoca_buttons(self, viewFrame,
                                         viewFrame.viewFramePanel)

        # make sure that a close of that window does the right thing
        wx.EVT_CLOSE(viewFrame, lambda e: viewFrame.Show(False))

        # set cute icon
        viewFrame.SetIcon(module_utils.get_module_icon())

        # follow ModuleBase convention to indicate that view is
        # available
        self.view_initialised = True

        self._view_frame = viewFrame
        return viewFrame
Ejemplo n.º 2
0
    def _create_view_frame(self):

        """This will create the self._view_frame for this module.

        objectDict is a dictionary with VTK object descriptions as keys and
        the actual corresponding instances as values.  If you specify
        objectDict as none, the introspection controls won't get added.
        """

        parent_window = self._module_manager.get_module_view_parent_window()

        viewFrame = wx.Frame(parent_window, -1, module_utils.create_module_view_frame_title(self))
        viewFrame.viewFramePanel = wx.Panel(viewFrame, -1)

        viewFramePanelSizer = wx.BoxSizer(wx.VERTICAL)
        # make sure there's a 7px border at the top
        # FIXME: changed 10, 7 to tuple for wxPython 2.6
        viewFramePanelSizer.Add((10, 7), 0, wx.EXPAND)
        viewFrame.viewFramePanel.SetAutoLayout(True)
        viewFrame.viewFramePanel.SetSizer(viewFramePanelSizer)

        viewFrameSizer = wx.BoxSizer(wx.VERTICAL)
        viewFrameSizer.Add(viewFrame.viewFramePanel, 1, wx.EXPAND, 0)
        viewFrame.SetAutoLayout(True)
        viewFrame.SetSizer(viewFrameSizer)

        if self._object_dict != None:
            module_utils.create_standard_object_introspection(
                self, viewFrame, viewFrame.viewFramePanel, self._object_dict, None
            )

        module_utils.create_eoca_buttons(self, viewFrame, viewFrame.viewFramePanel)

        # make sure that a close of that window does the right thing
        wx.EVT_CLOSE(viewFrame, lambda e: viewFrame.Show(False))

        # set cute icon
        viewFrame.SetIcon(module_utils.get_module_icon())

        # follow ModuleBase convention to indicate that view is
        # available
        self.view_initialised = True

        self._view_frame = viewFrame
        return viewFrame
Ejemplo n.º 3
0
 def rename(self, new_name):
     if self._view_frame:
         self._view_frame.SetTitle(
             module_utils.create_module_view_frame_title(self))
Ejemplo n.º 4
0
 def rename(self, new_name):
     if self._view_frame:
         self._view_frame.SetTitle(module_utils.create_module_view_frame_title(self))