2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00: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-21 22:46:15 +00: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 16:10:08 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2000-03-31 07:02:06 +00:00
|
|
|
#include "nsBoxFrame.h"
|
1999-04-21 22:46:15 +00:00
|
|
|
|
2000-03-31 07:02:06 +00:00
|
|
|
class nsDeckFrame : public nsBoxFrame
|
1999-04-21 22:46:15 +00:00
|
|
|
{
|
|
|
|
public:
|
2011-10-26 23:57:55 +00:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsDeckFrame)
|
|
|
|
NS_DECL_QUERYFRAME
|
2009-09-12 16:49:24 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
1999-04-21 22:46:15 +00:00
|
|
|
|
2005-10-26 21:46:39 +00:00
|
|
|
friend nsIFrame* NS_NewDeckFrame(nsIPresShell* aPresShell,
|
2009-01-19 18:31:33 +00:00
|
|
|
nsStyleContext* aContext);
|
1999-05-09 21:46:24 +00:00
|
|
|
|
2014-02-18 07:47:48 +00:00
|
|
|
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
|
2014-02-18 08:36:33 +00:00
|
|
|
nsIAtom* aAttribute,
|
2015-03-21 16:28:04 +00:00
|
|
|
int32_t aModType) override;
|
1999-04-21 22:46:15 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
NS_IMETHOD DoLayout(nsBoxLayoutState& aState) override;
|
1999-10-29 22:13:57 +00:00
|
|
|
|
2013-02-14 11:12:27 +00:00
|
|
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
2015-03-21 16:28:04 +00:00
|
|
|
const nsDisplayListSet& aLists) override;
|
2006-01-26 02:29:17 +00:00
|
|
|
|
2014-08-02 12:22:06 +00:00
|
|
|
virtual void RemoveFrame(ChildListID aListID,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsIFrame* aOldFrame) override;
|
2014-08-02 12:22:06 +00:00
|
|
|
|
2013-02-14 11:12:27 +00:00
|
|
|
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
2015-03-21 16:28:04 +00:00
|
|
|
const nsDisplayListSet& aLists) override;
|
2006-01-26 02:29:17 +00:00
|
|
|
|
2014-05-24 22:20:40 +00:00
|
|
|
virtual void Init(nsIContent* aContent,
|
|
|
|
nsContainerFrame* aParent,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsIFrame* aPrevInFlow) override;
|
2000-06-22 00:48:49 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual nsIAtom* GetType() const override;
|
2000-06-22 00:48:49 +00:00
|
|
|
|
2014-01-05 23:31:14 +00:00
|
|
|
#ifdef DEBUG_FRAME_DUMP
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual nsresult GetFrameName(nsAString& aResult) const 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-09 22:02:40 +00:00
|
|
|
{
|
2001-11-14 01:33:42 +00: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-09 22:02:40 +00:00
|
|
|
}
|
2000-04-11 23:55:15 +00: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-09 22:02:40 +00:00
|
|
|
|
2015-01-06 09:27:56 +00:00
|
|
|
explicit nsDeckFrame(nsStyleContext* aContext);
|
2000-04-05 00:19:00 +00:00
|
|
|
|
2011-10-26 23:57:55 +00:00
|
|
|
nsIFrame* GetSelectedBox();
|
|
|
|
|
1999-04-21 22:46:15 +00:00
|
|
|
protected:
|
|
|
|
|
2011-10-26 23:57:55 +00:00
|
|
|
void IndexChanged();
|
2012-08-22 15:56:38 +00:00
|
|
|
int32_t GetSelectedIndex();
|
2012-08-06 03:00:57 +00:00
|
|
|
void HideBox(nsIFrame* aBox);
|
1999-04-21 22:46:15 +00:00
|
|
|
|
1999-04-25 20:07:45 +00:00
|
|
|
private:
|
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
int32_t mIndex;
|
1999-04-25 20:07:45 +00:00
|
|
|
|
1999-04-21 22:46:15 +00:00
|
|
|
}; // class nsDeckFrame
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|