parameters: (self, event)
docstring: Handles the ``wx.EVT_MOTION`` event for :class:`RibbonBar`.
  
          :param `event`: a :class:`MouseEvent` event to be processed.
docstring_summary: Handles the ``wx.EVT_MOTION`` event for :class:`RibbonBar`.
docstring_tokens: Handles the wx . EVT_MOTION event for : class : RibbonBar .
function: def OnMouseMove(self, event):
          """
          Handles the ``wx.EVT_MOTION`` event for :class:`RibbonBar`.
  
          :param `event`: a :class:`MouseEvent` event to be processed.
          """
  
          x, y = event.GetX(), event.GetY()
          hovered_page = -1
          refresh_tabs = False
          
          if y < self._tab_height:
              # It is quite likely that the mouse moved a small amount and is still over the same tab
              if self._current_hovered_page != -1 and self._pages[self._current_hovered_page].rect.Contains((x, y)):
                  hovered_page = self._current_hovered_page
                  # But be careful, if tabs can be scrolled, then parts of the tab rect may not be valid
                  if self._tab_scroll_buttons_shown:
                      if x >= self._tab_scroll_right_button_rect.GetX() or x < self._tab_scroll_left_button_rect.GetRight():
                          hovered_page = -1
                      
              else:
              
                  hovered_page, dummy = self.HitTestTabs(event.GetPosition())
  
          if hovered_page != self._current_hovered_page:
              if self._current_hovered_page != -1:
                  self._pages[self._current_hovered_page].hovered = False
              
              self._current_hovered_page = hovered_page
              if self._current_hovered_page != -1:
                  self._pages[self._current_hovered_page].hovered = True
              
              refresh_tabs = True
          
          if self._tab_scroll_buttons_shown:
              if self._tab_scroll_left_button_rect.Contains((x, y)):
                  self._tab_scroll_left_button_state, refresh_tabs = SET_FLAG(self._tab_scroll_left_button_state, RIBBON_SCROLL_BTN_HOVERED)
              else:
                  self._tab_scroll_left_button_state, refresh_tabs = UNSET_FLAG(self._tab_scroll_left_button_state, RIBBON_SCROLL_BTN_HOVERED)
  
              if self._tab_scroll_right_button_rect.Contains((x, y)):
                  self._tab_scroll_right_button_state, refresh_tabs = SET_FLAG(self._tab_scroll_right_button_state, RIBBON_SCROLL_BTN_HOVERED)
              else:
                  self._tab_scroll_right_button_state, refresh_tabs = UNSET_FLAG(self._tab_scroll_right_button_state, RIBBON_SCROLL_BTN_HOVERED)
          
          if refresh_tabs:
              self.RefreshTabBar()
function_tokens: def OnMouseMove ( self , event ) : x , y = event . GetX ( ) , event . GetY ( ) hovered_page = - 1 refresh_tabs = False if y < self . _tab_height : # It is quite likely that the mouse moved a small amount and is still over the same tab if self . _current_hovered_page != - 1 and self . _pages [ self . _current_hovered_page ] . rect . Contains ( ( x , y ) ) : hovered_page = self . _current_hovered_page # But be careful, if tabs can be scrolled, then parts of the tab rect may not be valid if self . _tab_scroll_buttons_shown : if x >= self . _tab_scroll_right_button_rect . GetX ( ) or x < self . _tab_scroll_left_button_rect . GetRight ( ) : hovered_page = - 1 else : hovered_page , dummy = self . HitTestTabs ( event . GetPosition ( ) ) if hovered_page != self . _current_hovered_page : if self . _current_hovered_page != - 1 : self . _pages [ self . _current_hovered_page ] . hovered = False self . _current_hovered_page = hovered_page if self . _current_hovered_page != - 1 : self . _pages [ self . _current_hovered_page ] . hovered = True refresh_tabs = True if self . _tab_scroll_buttons_shown : if self . _tab_scroll_left_button_rect . Contains ( ( x , y ) ) : self . _tab_scroll_left_button_state , refresh_tabs = SET_FLAG ( self . _tab_scroll_left_button_state , RIBBON_SCROLL_BTN_HOVERED ) else : self . _tab_scroll_left_button_state , refresh_tabs = UNSET_FLAG ( self . _tab_scroll_left_button_state , RIBBON_SCROLL_BTN_HOVERED ) if self . _tab_scroll_right_button_rect . Contains ( ( x , y ) ) : self . _tab_scroll_right_button_state , refresh_tabs = SET_FLAG ( self . _tab_scroll_right_button_state , RIBBON_SCROLL_BTN_HOVERED ) else : self . _tab_scroll_right_button_state , refresh_tabs = UNSET_FLAG ( self . _tab_scroll_right_button_state , RIBBON_SCROLL_BTN_HOVERED ) if refresh_tabs : self . RefreshTabBar ( )