2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04: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/. */
|
1999-04-22 02:46:15 +04: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___
|
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2000-03-31 11:02:06 +04:00
|
|
|
#include "nsBoxFrame.h"
|
1999-04-22 02:46:15 +04:00
|
|
|
|
2000-03-31 11:02:06 +04:00
|
|
|
class nsDeckFrame : public nsBoxFrame
|
1999-04-22 02:46:15 +04:00
|
|
|
{
|
|
|
|
public:
|
2011-10-27 03:57:55 +04:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsDeckFrame)
|
|
|
|
NS_DECL_QUERYFRAME
|
2009-09-12 20:49:24 +04:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
1999-04-22 02:46:15 +04:00
|
|
|
|
2005-10-27 01:46:39 +04:00
|
|
|
friend nsIFrame* NS_NewDeckFrame(nsIPresShell* aPresShell,
|
2009-01-19 21:31:33 +03:00
|
|
|
nsStyleContext* aContext);
|
1999-05-10 01:46:24 +04:00
|
|
|
|
2014-02-18 11:47:48 +04:00
|
|
|
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
|
2014-02-18 12:36:33 +04:00
|
|
|
nsIAtom* aAttribute,
|
|
|
|
int32_t aModType) MOZ_OVERRIDE;
|
1999-04-22 02:46:15 +04:00
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
NS_IMETHOD DoLayout(nsBoxLayoutState& aState) MOZ_OVERRIDE;
|
1999-10-30 02:13:57 +04:00
|
|
|
|
2013-02-14 15:12:27 +04:00
|
|
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
2006-01-26 05:29:17 +03:00
|
|
|
|
2014-08-02 16:22:06 +04:00
|
|
|
virtual void RemoveFrame(ChildListID aListID,
|
|
|
|
nsIFrame* aOldFrame) MOZ_OVERRIDE;
|
|
|
|
|
2013-02-14 15:12:27 +04:00
|
|
|
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
2006-01-26 05:29:17 +03:00
|
|
|
|
2014-05-25 02:20:40 +04:00
|
|
|
virtual void Init(nsIContent* aContent,
|
|
|
|
nsContainerFrame* aParent,
|
|
|
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
2000-06-22 04:48:49 +04:00
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
2000-06-22 04:48:49 +04:00
|
|
|
|
2014-01-06 03:31:14 +04:00
|
|
|
#ifdef DEBUG_FRAME_DUMP
|
2014-02-18 11:47:48 +04:00
|
|
|
virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
1) implememted box reflow coelescing.
2) implemented gfx scrollbars for list boxes
3) fixed progess meter to be an animated gif
4) fixed bugs 23521, 24721, 19114, 20546, 24385, 24457, 23156, 20226, 22543
-r hyatt, troy, rod
2000-02-10 01:02:40 +03:00
|
|
|
{
|
2001-11-14 04:33:42 +03:00
|
|
|
return MakeFrameName(NS_LITERAL_STRING("Deck"), aResult);
|
1) implememted box reflow coelescing.
2) implemented gfx scrollbars for list boxes
3) fixed progess meter to be an animated gif
4) fixed bugs 23521, 24721, 19114, 20546, 24385, 24457, 23156, 20226, 22543
-r hyatt, troy, rod
2000-02-10 01:02:40 +03:00
|
|
|
}
|
2000-04-12 03:55:15 +04:00
|
|
|
#endif
|
1) implememted box reflow coelescing.
2) implemented gfx scrollbars for list boxes
3) fixed progess meter to be an animated gif
4) fixed bugs 23521, 24721, 19114, 20546, 24385, 24457, 23156, 20226, 22543
-r hyatt, troy, rod
2000-02-10 01:02:40 +03:00
|
|
|
|
2015-01-06 12:27:56 +03:00
|
|
|
explicit nsDeckFrame(nsStyleContext* aContext);
|
2000-04-05 04:19:00 +04:00
|
|
|
|
2011-10-27 03:57:55 +04:00
|
|
|
nsIFrame* GetSelectedBox();
|
|
|
|
|
1999-04-22 02:46:15 +04:00
|
|
|
protected:
|
|
|
|
|
2011-10-27 03:57:55 +04:00
|
|
|
void IndexChanged();
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t GetSelectedIndex();
|
2012-08-06 07:00:57 +04:00
|
|
|
void HideBox(nsIFrame* aBox);
|
1999-04-22 02:46:15 +04:00
|
|
|
|
1999-04-26 00:07:45 +04:00
|
|
|
private:
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t mIndex;
|
1999-04-26 00:07:45 +04:00
|
|
|
|
1999-04-22 02:46:15 +04:00
|
|
|
}; // class nsDeckFrame
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|