2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
Eric D Vaughan
|
|
|
|
A frame that can have multiple children. Only one child may be displayed at one time. So the
|
|
|
|
can be flipped though like a deck of cards.
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef nsDeckFrame_h___
|
|
|
|
#define nsDeckFrame_h___
|
|
|
|
|
|
|
|
#include "nsBoxFrame.h"
|
|
|
|
|
|
|
|
class nsDeckFrame : public nsBoxFrame
|
|
|
|
{
|
|
|
|
public:
|
2011-10-26 16:57:55 -07:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsDeckFrame)
|
|
|
|
NS_DECL_QUERYFRAME
|
2009-09-12 09:49:24 -07:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
friend nsIFrame* NS_NewDeckFrame(nsIPresShell* aPresShell,
|
2009-01-19 10:31:33 -08:00
|
|
|
nsStyleContext* aContext);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
2007-03-22 10:30:00 -07:00
|
|
|
nsIAtom* aAttribute,
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t aModType);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
NS_IMETHOD DoLayout(nsBoxLayoutState& aState);
|
|
|
|
|
|
|
|
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
const nsDisplayListSet& aLists);
|
|
|
|
|
|
|
|
NS_IMETHOD BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
const nsDisplayListSet& aLists);
|
|
|
|
|
|
|
|
NS_IMETHOD Init(nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIFrame* aPrevInFlow);
|
|
|
|
|
2009-07-29 19:54:42 -07:00
|
|
|
virtual nsIAtom* GetType() const;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-06-25 12:59:42 -07:00
|
|
|
#ifdef DEBUG
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
|
|
|
{
|
|
|
|
return MakeFrameName(NS_LITERAL_STRING("Deck"), aResult);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-01-19 10:31:33 -08:00
|
|
|
nsDeckFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-10-26 16:57:55 -07:00
|
|
|
nsIFrame* GetSelectedBox();
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
protected:
|
|
|
|
|
2011-10-26 16:57:55 -07:00
|
|
|
void IndexChanged();
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t GetSelectedIndex();
|
2012-08-05 20:00:57 -07:00
|
|
|
void HideBox(nsIFrame* aBox);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t mIndex;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
}; // class nsDeckFrame
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|