Ejemplo n.º 1
0
void
nsDeckFrame::IndexChanged()
{
    //did the index change?
    PRInt32 index = GetSelectedIndex();
    if (index == mIndex)
        return;

    // redraw
    InvalidateOverflowRect();

    // hide the currently showing box
    nsIBox* currentBox = GetSelectedBox();
    if (currentBox) // only hide if it exists
        HideBox(currentBox);

    mIndex = index;
}
Ejemplo n.º 2
0
void
nsSubDocumentFrame::EndSwapDocShells(nsIFrame* aOther)
{
  nsSubDocumentFrame* other = static_cast<nsSubDocumentFrame*>(aOther);
  ShowViewer();
  other->ShowViewer();

  // Now make sure we reflow both frames, in case their contents
  // determine their size.
  PresContext()->PresShell()->
    FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
  other->PresContext()->PresShell()->
    FrameNeedsReflow(other, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);

  // And repaint them, for good measure, in case there's nothing
  // interesting that happens during reflow.
  InvalidateOverflowRect();
  other->InvalidateOverflowRect();
}
Ejemplo n.º 3
0
void
nsDeckFrame::IndexChanged(nsPresContext* aPresContext)
{
  //did the index change?
  PRInt32 index = GetSelectedIndex();
  if (index == mIndex)
    return;

  // redraw
  InvalidateOverflowRect();

  // hide the currently showing box
  nsIBox* currentBox = GetSelectedBox();
  if (currentBox) // only hide if it exists
     HideBox(aPresContext, currentBox);

  mIndex = index;

  // show the new box
  nsIBox* newBox = GetSelectedBox();
  if (newBox) // only show if it exists
     ShowBox(aPresContext, newBox);
}