1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 // A simple frame class for XUL frames that are leafs on the tree but need
8 // background / border painting, and for some reason or another need special
9 // code (like event handling code) which we haven't ported to the DOM.
11 // This should generally not be used for new frame classes.
13 #ifndef mozilla_SimpleXULLeafFrame_h
14 #define mozilla_SimpleXULLeafFrame_h
16 #include "nsLeafFrame.h"
20 // Shared class for thumb and scrollbar buttons.
21 class SimpleXULLeafFrame
: public nsLeafFrame
{
23 NS_DECL_FRAMEARENA_HELPERS(SimpleXULLeafFrame
)
25 // TODO: Look at appearance instead maybe?
26 nscoord
GetIntrinsicISize() override
{ return 0; }
27 nscoord
GetIntrinsicBSize() override
{ return 0; }
29 void Reflow(nsPresContext
* aPresContext
, ReflowOutput
& aDesiredSize
,
30 const ReflowInput
& aReflowInput
,
31 nsReflowStatus
& aStatus
) override
;
32 explicit SimpleXULLeafFrame(ComputedStyle
* aStyle
,
33 nsPresContext
* aPresContext
, ClassID aClassID
)
34 : nsLeafFrame(aStyle
, aPresContext
, aClassID
) {}
36 explicit SimpleXULLeafFrame(ComputedStyle
* aStyle
,
37 nsPresContext
* aPresContext
)
38 : SimpleXULLeafFrame(aStyle
, aPresContext
, kClassID
) {}
40 friend nsIFrame
* NS_NewSimpleXULLeafFrame(mozilla::PresShell
* aPresShell
,
41 ComputedStyle
* aStyle
);
44 } // namespace mozilla