Esempio n. 1
0
 def __init__(self, controller_uid):
     UIViewObject.__init__(self, controller_uid)
     _UIM = UIManager()
     parent_controller_uid = _UIM._getparentuid(self._controller_uid)
     parent_controller = _UIM.get(parent_controller_uid)
     wx.StatusBar.__init__(self, parent_controller.view)
     parent_controller.view.SetStatusBar(self)
Esempio n. 2
0
 def __init__(self, controller_uid):
     """
     """
     #
     # Basic WorkPage interface structure
     # ==================================
     #   Top: ToolBar
     #   Center: A (main) panel where the 'things happens' ;-)
     #   Bottom: StatusBar
     #
     UIViewObject.__init__(self, controller_uid)
     UIM = UIManager()
     controller = UIM.get(controller_uid)
     parent_uid = UIM._getparentuid(controller.uid)
     parent_controller = UIM.get(parent_uid)
     parent_view = parent_controller.view.main_area_panel
     wx.Panel.__init__(self, parent_view)
     if controller.pos == -1:
         controller.pos = parent_controller.view.get_notebook_page_count()
     #
     result = parent_controller.insert_notebook_page(
         controller.pos, self, controller.title, True)
     #
     if not result:
         log.error('Page could not be inserted in MainWindow notebook.')
     #
     controller.subscribe(self._set_title, 'change.title')
     controller.subscribe(self._set_pos, 'change.pos')
     controller.subscribe(self._set_float_mode, 'change.float_mode')
     # Set notebook page name
     self._set_own_name()
Esempio n. 3
0
    def __init__(self, controller_uid):
        UIViewObject.__init__(self, controller_uid)
        UIM = UIManager()
        #        controller = UIM.get(self._controller_uid)
        parent_controller_uid = UIM._getparentuid(self._controller_uid)
        parent_controller = UIM.get(parent_controller_uid)

        wx.TreeCtrl.__init__(self, parent_controller.view, -1, wx.Point(0, 0), wx.Size(200, 250),
                             wx.TR_DEFAULT_STYLE | wx.NO_BORDER)

        self._rootid = self.AddRoot(wx.EmptyString)
        self._set_project_name()

        # self.SetItemData(self._rootid, (controller._PSEUDOROOTUID, None))

        self.Bind(wx.EVT_TREE_ITEM_RIGHT_CLICK, self.on_rightclick)

        '''
        imglist = wx.ImageList(16, 16, True, 2)
        imglist.Add(wx.ArtProvider_GetBitmap(wx.ART_FOLDER, wx.ART_OTHER, wx.Size(16,16)))
        tree.AssignImageList(imglist)
        items.append(tree.AppendItem(root, "Item 1", 0))
        '''
        parent_controller.view._mgr.AddPane(self, wx.aui.AuiPaneInfo().Name("tree").
                                            Caption("Object Manager").Left().Layer(1).Position(1).
                                            PinButton(True).MinimizeButton(True).
                                            CloseButton(False).MaximizeButton(True)
                                            )
        parent_controller.view._mgr.Update()

        self.Bind(wx.EVT_TREE_BEGIN_DRAG, self._on_begin_drag)
Esempio n. 4
0
 def __init__(self, controller_uid):
     UIViewObject.__init__(self, controller_uid)
     UIM = UIManager()
     controller = UIM.get(self._controller_uid)
     if controller.id == wx.ID_ANY:
         controller.id = UIM.new_wx_id()
     wx.Menu.__init__(self)
Esempio n. 5
0
 def __init__(self, controller_uid):
     UIViewObject.__init__(self, controller_uid)
     UIM = UIManager()
     controller = UIM.get(self._controller_uid)
     # MainWindow subscribing MainWindowController PubSub messages
     controller.subscribe(self._set_maximized, 'change.maximized')
     controller.subscribe(self._set_size, 'change.size')
     controller.subscribe(self._set_position, 'change.pos')
     controller.subscribe(self._set_title, 'change.title')
Esempio n. 6
0
 def __init__(self, controller_uid):
     UIViewObject.__init__(self, controller_uid)
     wx.MenuBar.__init__(self)
     #
     UIM = UIManager()
     parent_controller_uid = UIM._getparentuid(controller_uid)
     parent_controller = UIM.get(parent_controller_uid)
     wx_parent = parent_controller._get_wx_parent()
     wx_parent.SetMenuBar(self)
Esempio n. 7
0
 def __init__(self, controller_uid):
     UIViewObject.__init__(self, controller_uid)
     _UIM = UIManager()
     controller = _UIM.get(self._controller_uid)
     if controller.id == wx.ID_ANY:
         controller.id = _UIM.new_wx_id()
     try:
         wx.MenuItem.__init__(self, None, controller.id, controller.label,
                              controller.help, controller.kind)
     except Exception as e:
         print(e)
         raise
Esempio n. 8
0
 def __init__(self, controller_uid):
     UIViewObject.__init__(self, controller_uid)
     _UIM = UIManager()
     controller = _UIM.get(self._controller_uid)
     parent_controller_uid = _UIM._getparentuid(self._controller_uid)
     parent_controller = _UIM.get(parent_controller_uid)
     #wx.SystemOptions.SetOption("msw.remap", '0')
     wx.ToolBar.__init__(self, parent_controller.view, controller.id,
                         controller.pos, controller.size, controller.style)
     self.Realize()
     if isinstance(parent_controller, MainWindowController):
         mgr = wx.aui.AuiManager.GetManager(parent_controller.view)
         mgr.AddPane(self, self.paneinfo)
         mgr.Update()
Esempio n. 9
0
 def __init__(self, controller_uid):
     UIViewObject.__init__(self, controller_uid)
     UIM = UIManager()
     parent_uid = UIM._getparentuid(self._controller_uid)
     parent_controller = UIM.get(parent_uid)
     wx_parent = parent_controller._get_wx_parent(self.tid)
     wx.Panel.__init__(self, wx_parent)
     #
     self.track_view_object = wx_parent
     self._visual_objects = []
     self.SetBackgroundColour('white')
     self.SetSizer(wx.BoxSizer(wx.VERTICAL))
     #
     self.Bind(wx.EVT_LEFT_DOWN, self._on_button_press)
     self.Bind(wx.EVT_MIDDLE_DOWN, self._on_button_press)
     self.Bind(wx.EVT_RIGHT_DOWN, self._on_button_press)
Esempio n. 10
0
    def __init__(self, controller_uid):
        try:
            UIViewObject.__init__(self, controller_uid)
            UIM = UIManager()
            parent_controller_uid = UIM._getparentuid(self._controller_uid)
            parent_controller = UIM.get(parent_controller_uid)
            wx_parent = parent_controller._get_wx_parent(self.tid)
            pg.PropertyGrid.__init__(
                self,
                wx_parent,
                style=pg.PG_SPLITTER_AUTO_CENTER  # |\
                # pg.PG_HIDE_MARGIN
            )
            self.SetMarginColour('white')
            self.SetCaptionBackgroundColour(BLUE_COLORS_SCALE[2])
            self.SetCaptionTextColour('white')

        except Exception as e:
            print('ERRO PropertyGridView.__init__:', e)
Esempio n. 11
0
 def __init__(self, controller_uid):
     UIViewObject.__init__(self, controller_uid)
     self._mplot_objects = OrderedDict()
Esempio n. 12
0
 def __init__(self, controller_uid):
     UIViewObject.__init__(self, controller_uid)