parameters: (self)
docstring: Creates the notebook to use for the tabbed document interface.
docstring_summary: Creates the notebook to use for the tabbed document interface.
docstring_tokens: Creates the notebook to use for the tabbed document interface .
function: def CreateNotebook(self):
          """
          Creates the notebook to use for the tabbed document interface.
          """
          if wx.Platform != "__WXMAC__":
              self._notebook = wx.Notebook(self, wx.NewId())
          else:
              self._notebook = wx.Listbook(self, wx.NewId(), style=wx.LB_LEFT)
          # self._notebook.SetSizer(wx.NotebookSizer(self._notebook))
          if wx.Platform != "__WXMAC__":
              wx.EVT_NOTEBOOK_PAGE_CHANGED(self, self._notebook.GetId(), self.OnNotebookPageChanged)
          else:
              wx.EVT_LISTBOOK_PAGE_CHANGED(self, self._notebook.GetId(), self.OnNotebookPageChanged)
          wx.EVT_RIGHT_DOWN(self._notebook, self.OnNotebookRightClick)
          wx.EVT_MIDDLE_DOWN(self._notebook, self.OnNotebookMiddleClick)
  
          # wxBug: wx.Listbook does not implement HitTest the same way wx.Notebook
          # does, so for now don't fire MouseOver events.
          if wx.Platform != "__WXMAC__":
              wx.EVT_MOTION(self._notebook, self.OnNotebookMouseOver)
  
          templates = wx.GetApp().GetDocumentManager().GetTemplates()
          iconList = wx.ImageList(16, 16, initialCount = len(templates))
          self._iconIndexLookup = []
          for template in templates:
              icon = template.GetIcon()
              if icon:
                  if icon.GetHeight() != 16 or icon.GetWidth() != 16:
                      icon.SetHeight(16)
                      icon.SetWidth(16)
                      if wx.GetApp().GetDebug():
                          print "Warning: icon for '%s' isn't 16x16, not crossplatform" % template._docTypeName
                  iconIndex = iconList.AddIcon(icon)
                  self._iconIndexLookup.append((template, iconIndex))
  
          icon = Blank.GetIcon()
          if icon.GetHeight() != 16 or icon.GetWidth() != 16:
              icon.SetHeight(16)
              icon.SetWidth(16)
              if wx.GetApp().GetDebug():
                  print "Warning: getBlankIcon isn't 16x16, not crossplatform"
          self._blankIconIndex = iconList.AddIcon(icon)
          self._notebook.AssignImageList(iconList)
function_tokens: def CreateNotebook ( self ) : if wx . Platform != "__WXMAC__" : self . _notebook = wx . Notebook ( self , wx . NewId ( ) ) else : self . _notebook = wx . Listbook ( self , wx . NewId ( ) , style = wx . LB_LEFT ) # self._notebook.SetSizer(wx.NotebookSizer(self._notebook)) if wx . Platform != "__WXMAC__" : wx . EVT_NOTEBOOK_PAGE_CHANGED ( self , self . _notebook . GetId ( ) , self . OnNotebookPageChanged ) else : wx . EVT_LISTBOOK_PAGE_CHANGED ( self , self . _notebook . GetId ( ) , self . OnNotebookPageChanged ) wx . EVT_RIGHT_DOWN ( self . _notebook , self . OnNotebookRightClick ) wx . EVT_MIDDLE_DOWN ( self . _notebook , self . OnNotebookMiddleClick ) # wxBug: wx.Listbook does not implement HitTest the same way wx.Notebook # does, so for now don't fire MouseOver events. if wx . Platform != "__WXMAC__" : wx . EVT_MOTION ( self . _notebook , self . OnNotebookMouseOver ) templates = wx . GetApp ( ) . GetDocumentManager ( ) . GetTemplates ( ) iconList = wx . ImageList ( 16 , 16 , initialCount = len ( templates ) ) self . _iconIndexLookup = [ ] for template in templates : icon = template . GetIcon ( ) if icon : if icon . GetHeight ( ) != 16 or icon . GetWidth ( ) != 16 : icon . SetHeight ( 16 ) icon . SetWidth ( 16 ) if wx . GetApp ( ) . GetDebug ( ) : print "Warning: icon for '%s' isn't 16x16, not crossplatform" % template . _docTypeName iconIndex = iconList . AddIcon ( icon ) self . _iconIndexLookup . append ( ( template , iconIndex ) ) icon = Blank . GetIcon ( ) if icon . GetHeight ( ) != 16 or icon . GetWidth ( ) != 16 : icon . SetHeight ( 16 ) icon . SetWidth ( 16 ) if wx . GetApp ( ) . GetDebug ( ) : print "Warning: getBlankIcon isn't 16x16, not crossplatform" self . _blankIconIndex = iconList . AddIcon ( icon ) self . _notebook . AssignImageList ( iconList )