layout/xul/nsDeckFrame.h

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 /**
     8   Eric D Vaughan
     9   A frame that can have multiple children. Only one child may be displayed at one time. So the
    10   can be flipped though like a deck of cards.
    12 **/
    14 #ifndef nsDeckFrame_h___
    15 #define nsDeckFrame_h___
    17 #include "mozilla/Attributes.h"
    18 #include "nsBoxFrame.h"
    20 class nsDeckFrame : public nsBoxFrame
    21 {
    22 public:
    23   NS_DECL_QUERYFRAME_TARGET(nsDeckFrame)
    24   NS_DECL_QUERYFRAME
    25   NS_DECL_FRAMEARENA_HELPERS
    27   friend nsIFrame* NS_NewDeckFrame(nsIPresShell* aPresShell,
    28                                    nsStyleContext* aContext);
    30   virtual nsresult AttributeChanged(int32_t         aNameSpaceID,
    31                                     nsIAtom*        aAttribute,
    32                                     int32_t         aModType) MOZ_OVERRIDE;
    34   NS_IMETHOD DoLayout(nsBoxLayoutState& aState) MOZ_OVERRIDE;
    36   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
    37                                 const nsRect&           aDirtyRect,
    38                                 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
    40   virtual void BuildDisplayListForChildren(nsDisplayListBuilder*   aBuilder,
    41                                            const nsRect&           aDirtyRect,
    42                                            const nsDisplayListSet& aLists) MOZ_OVERRIDE;
    44   virtual void Init(nsIContent*      aContent,
    45                     nsIFrame*        aParent,
    46                     nsIFrame*        aPrevInFlow) MOZ_OVERRIDE;
    48   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
    50 #ifdef DEBUG_FRAME_DUMP
    51   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
    52   {
    53       return MakeFrameName(NS_LITERAL_STRING("Deck"), aResult);
    54   }
    55 #endif
    57   nsDeckFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
    59   nsIFrame* GetSelectedBox();
    61 protected:
    63   void IndexChanged();
    64   int32_t GetSelectedIndex();
    65   void HideBox(nsIFrame* aBox);
    67 private:
    69   int32_t mIndex;
    71 }; // class nsDeckFrame
    73 #endif

mercurial