parameters: (self, pane_window, pt, offset)
return_statement: return rect
docstring: Calculates the drop hint rectangle.
  
          The method first calls :meth:`DoDrop` to determine the exact position the pane would
          be at were if dropped. If the pane would indeed become docked at the
          specified drop point, the the rectangle hint will be returned in
          screen coordinates. Otherwise, an empty rectangle is returned.
  
          :param Window `pane_window`: it is the window pointer of the pane being dragged;
          :param Point `pt`: is the mouse position, in client coordinates;
          :param Point `offset`: describes the offset that the mouse is from the upper-left
           corner of the item being dragged.
docstring_summary: Calculates the drop hint rectangle.
docstring_tokens: Calculates the drop hint rectangle .
function: def CalculateHintRect(self, pane_window, pt, offset):
          """
          Calculates the drop hint rectangle.
  
          The method first calls :meth:`DoDrop` to determine the exact position the pane would
          be at were if dropped. If the pane would indeed become docked at the
          specified drop point, the the rectangle hint will be returned in
          screen coordinates. Otherwise, an empty rectangle is returned.
  
          :param Window `pane_window`: it is the window pointer of the pane being dragged;
          :param Point `pt`: is the mouse position, in client coordinates;
          :param Point `offset`: describes the offset that the mouse is from the upper-left
           corner of the item being dragged.
          """
  
          # we need to paint a hint rectangle to find out the exact hint rectangle,
          # we will create a new temporary layout and then measure the resulting
          # rectangle we will create a copy of the docking structures (self._docks)
          # so that we don't modify the real thing on screen
  
          rect = wx.Rect()
          pane = self.GetPane(pane_window)
  
          attrs = self.GetAttributes(pane)
          hint = AuiPaneInfo()
          hint = self.SetAttributes(hint, attrs)
  
          if hint.name != "__HINT__":
              self._oldname = hint.name
  
          hint.name = "__HINT__"
          hint.PaneBorder(True)
          hint.Show()
  
          if not hint.IsOk():
              hint.name = self._oldname
              return rect
  
          docks, panes = CopyDocksAndPanes2(self._docks, self._panes)
  
          # remove any pane already there which bears the same window
          # this happens when you are moving a pane around in a dock
          for ii in xrange(len(panes)):
              if panes[ii].window == pane_window:
                  docks = RemovePaneFromDocks(docks, panes[ii])
                  panes.pop(ii)
                  break
  
          # find out where the new pane would be
          allow, hint = self.DoDrop(docks, panes, hint, pt, offset)
  
          if not allow:
              return rect
  
          panes.append(hint)
  
          sizer, panes, docks, uiparts = self.LayoutAll(panes, docks, [], True, False)
  
          client_size = self._frame.GetClientSize()
          sizer.SetDimension(0, 0, client_size.x, client_size.y)
          sizer.Layout()
  
          sought = "__HINT__"
  
          # For a notebook page, actually look for the notebook itself.
          if hint.IsNotebookPage():
              id = hint.notebook_id
              for pane in panes:
                  if pane.IsNotebookControl() and pane.notebook_id==id:
                      sought = pane.name
                      break
  
          for part in uiparts:
              if part.pane and part.pane.name == sought:
                  rect.Union(wx.RectPS(part.sizer_item.GetPosition(),
                                       part.sizer_item.GetSize()))
  
          sizer.Destroy()
  
          # check for floating frame ...
          if rect.IsEmpty():
              for p in panes:
                  if p.name == sought and p.IsFloating():
                      return wx.RectPS(p.floating_pos, p.floating_size)
  
          if rect.IsEmpty():
              return rect
  
          # actually show the hint rectangle on the screen
          rect.x, rect.y = self._frame.ClientToScreen((rect.x, rect.y))
          if self._frame.GetLayoutDirection() == wx.Layout_RightToLeft:
              # Mirror rectangle in RTL mode
              rect.x -= rect.GetWidth()
  
          return rect
function_tokens: def CalculateHintRect ( self , pane_window , pt , offset ) : # we need to paint a hint rectangle to find out the exact hint rectangle, # we will create a new temporary layout and then measure the resulting # rectangle we will create a copy of the docking structures (self._docks) # so that we don't modify the real thing on screen rect = wx . Rect ( ) pane = self . GetPane ( pane_window ) attrs = self . GetAttributes ( pane ) hint = AuiPaneInfo ( ) hint = self . SetAttributes ( hint , attrs ) if hint . name != "__HINT__" : self . _oldname = hint . name hint . name = "__HINT__" hint . PaneBorder ( True ) hint . Show ( ) if not hint . IsOk ( ) : hint . name = self . _oldname return rect docks , panes = CopyDocksAndPanes2 ( self . _docks , self . _panes ) # remove any pane already there which bears the same window # this happens when you are moving a pane around in a dock for ii in xrange ( len ( panes ) ) : if panes [ ii ] . window == pane_window : docks = RemovePaneFromDocks ( docks , panes [ ii ] ) panes . pop ( ii ) break # find out where the new pane would be allow , hint = self . DoDrop ( docks , panes , hint , pt , offset ) if not allow : return rect panes . append ( hint ) sizer , panes , docks , uiparts = self . LayoutAll ( panes , docks , [ ] , True , False ) client_size = self . _frame . GetClientSize ( ) sizer . SetDimension ( 0 , 0 , client_size . x , client_size . y ) sizer . Layout ( ) sought = "__HINT__" # For a notebook page, actually look for the notebook itself. if hint . IsNotebookPage ( ) : id = hint . notebook_id for pane in panes : if pane . IsNotebookControl ( ) and pane . notebook_id == id : sought = pane . name break for part in uiparts : if part . pane and part . pane . name == sought : rect . Union ( wx . RectPS ( part . sizer_item . GetPosition ( ) , part . sizer_item . GetSize ( ) ) ) sizer . Destroy ( ) # check for floating frame ... if rect . IsEmpty ( ) : for p in panes : if p . name == sought and p . IsFloating ( ) : return wx . RectPS ( p . floating_pos , p . floating_size ) if rect . IsEmpty ( ) : return rect # actually show the hint rectangle on the screen rect . x , rect . y = self . _frame . ClientToScreen ( ( rect . x , rect . y ) ) if self . _frame . GetLayoutDirection ( ) == wx . Layout_RightToLeft : # Mirror rectangle in RTL mode rect . x -= rect . GetWidth ( ) return rect