parameters: (self, page, text, select=False, imageId=-1)
docstring: Adds a page to the book.
  
          :param `page`: specifies the new page;
          :param `text`: specifies the text for the new page;
          :param `select`: specifies whether the page should be selected;
          :param `imageId`: specifies the optional image index for the new page.
          
          :note: The call to this function generates the page changing events.
docstring_summary: Adds a page to the book.
docstring_tokens: Adds a page to the book .
function: def AddPage(self, page, text, select=False, imageId=-1):
          """
          Adds a page to the book.
  
          :param `page`: specifies the new page;
          :param `text`: specifies the text for the new page;
          :param `select`: specifies whether the page should be selected;
          :param `imageId`: specifies the optional image index for the new page.
          
          :note: The call to this function generates the page changing events.
          """
  
          if not page:
              return
  
          page.Reparent(self)
  
          self._windows.append(page)
          
          if select or len(self._windows) == 1:
              self.SetSelection(len(self._windows)-1)
          else:
              page.Hide()
  
          self._pages.AddPage(text, select, imageId)
          self.ResizeTabArea()
          self.Refresh()
function_tokens: def AddPage ( self , page , text , select = False , imageId = - 1 ) : if not page : return page . Reparent ( self ) self . _windows . append ( page ) if select or len ( self . _windows ) == 1 : self . SetSelection ( len ( self . _windows ) - 1 ) else : page . Hide ( ) self . _pages . AddPage ( text , select , imageId ) self . ResizeTabArea ( ) self . Refresh ( )