parameters: (self, base)
docstring: Initializes the perspective manager. The auimgr parameter is
          a reference to the windows AuiManager instance, base is the base
          path to where perspectives should be loaded from and saved to.
          @param base: path to configuration cache
docstring_summary: Initializes the perspective manager. The auimgr parameter is
          a reference to the windows AuiManager instance, base is the base
          path to where perspectives should be loaded from and saved to.
          @param base: path to configuration cache
docstring_tokens: Initializes the perspective manager . The auimgr parameter is a reference to the windows AuiManager instance base is the base path to where perspectives should be loaded from and saved to . @param base : path to configuration cache
function: def __init__(self, base):
          """Initializes the perspective manager. The auimgr parameter is
          a reference to the windows AuiManager instance, base is the base
          path to where perspectives should be loaded from and saved to.
          @param base: path to configuration cache
  
          """
          super(PerspectiveManager, self).__init__()
  
          hint = aui.AUI_MGR_TRANSPARENT_HINT
          if wx.Platform == '__WXGTK__':
              # Use venetian blinds style as transparent can cause crashes
              # on linux when desktop compositing is used.
              hint = aui.AUI_MGR_VENETIAN_BLINDS_HINT
  
          self._mgr = ed_fmgr.EdFrameManager(flags=aui.AUI_MGR_DEFAULT |
                                                   aui.AUI_MGR_TRANSPARENT_DRAG |
                                                   hint |
                                                   aui.AUI_MGR_ALLOW_ACTIVE_PANE)
          self._mgr.SetManagedWindow(self)
  
          # Attributes
          self._ids = list()                          # List of menu ids
          self._base = os.path.join(base, DATA_FILE)  # Path to config
          self._viewset = dict()                      # Set of Views
          self.LoadPerspectives()
          self._menu = ed_menu.EdMenu()               # Control menu
          self._currview = Profile_Get('DEFAULT_VIEW')    # Currently used view
  
          # Setup Menu
          self._menu.Append(ID_SAVE_PERSPECTIVE, _("Save Current View"),
                      _("Save the current window layout"))
          self._menu.Append(ID_DELETE_PERSPECTIVE, _("Delete Saved View"))
          self._menu.AppendSeparator()
          self._menu.Append(ID_AUTO_PERSPECTIVE, _("Automatic"),
                            _("Automatically save/use window state from last session"),
                            wx.ITEM_CHECK)
          self._menu.AppendSeparator()
          for name in self._viewset:
              self.AddPerspectiveMenuEntry(name)
  
          # Restore the managed windows previous position preference if available.
          pos = Profile_Get('WPOS', "size_tuple", False)
          if Profile_Get('SET_WPOS') and pos:
              # Ensure window is on screen
              if not self.IsPositionOnScreen(pos):
                  pos = self.GetPrimaryDisplayOrigin()
              self.SetPosition(pos)
  
          # Event Handlers
          self.Bind(wx.EVT_MENU, self.OnPerspectiveMenu)
function_tokens: def __init__ ( self , base ) : super ( PerspectiveManager , self ) . __init__ ( ) hint = aui . AUI_MGR_TRANSPARENT_HINT if wx . Platform == '__WXGTK__' : # Use venetian blinds style as transparent can cause crashes # on linux when desktop compositing is used. hint = aui . AUI_MGR_VENETIAN_BLINDS_HINT self . _mgr = ed_fmgr . EdFrameManager ( flags = aui . AUI_MGR_DEFAULT | aui . AUI_MGR_TRANSPARENT_DRAG | hint | aui . AUI_MGR_ALLOW_ACTIVE_PANE ) self . _mgr . SetManagedWindow ( self ) # Attributes self . _ids = list ( ) # List of menu ids self . _base = os . path . join ( base , DATA_FILE ) # Path to config self . _viewset = dict ( ) # Set of Views self . LoadPerspectives ( ) self . _menu = ed_menu . EdMenu ( ) # Control menu self . _currview = Profile_Get ( 'DEFAULT_VIEW' ) # Currently used view # Setup Menu self . _menu . Append ( ID_SAVE_PERSPECTIVE , _ ( "Save Current View" ) , _ ( "Save the current window layout" ) ) self . _menu . Append ( ID_DELETE_PERSPECTIVE , _ ( "Delete Saved View" ) ) self . _menu . AppendSeparator ( ) self . _menu . Append ( ID_AUTO_PERSPECTIVE , _ ( "Automatic" ) , _ ( "Automatically save/use window state from last session" ) , wx . ITEM_CHECK ) self . _menu . AppendSeparator ( ) for name in self . _viewset : self . AddPerspectiveMenuEntry ( name ) # Restore the managed windows previous position preference if available. pos = Profile_Get ( 'WPOS' , "size_tuple" , False ) if Profile_Get ( 'SET_WPOS' ) and pos : # Ensure window is on screen if not self . IsPositionOnScreen ( pos ) : pos = self . GetPrimaryDisplayOrigin ( ) self . SetPosition ( pos ) # Event Handlers self . Bind ( wx . EVT_MENU , self . OnPerspectiveMenu )