/src/mozilla-central/layout/xul/nsButtonBoxFrame.h
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | #ifndef nsButtonBoxFrame_h___ |
7 | | #define nsButtonBoxFrame_h___ |
8 | | |
9 | | #include "mozilla/Attributes.h" |
10 | | #include "nsIDOMEventListener.h" |
11 | | #include "nsBoxFrame.h" |
12 | | |
13 | | class nsButtonBoxFrame : public nsBoxFrame |
14 | | { |
15 | | public: |
16 | | NS_DECL_FRAMEARENA_HELPERS(nsButtonBoxFrame) |
17 | | |
18 | | friend nsIFrame* NS_NewButtonBoxFrame(nsIPresShell* aPresShell); |
19 | | |
20 | | explicit nsButtonBoxFrame(ComputedStyle* aStyle, ClassID = kClassID); |
21 | | |
22 | | virtual void Init(nsIContent* aContent, |
23 | | nsContainerFrame* aParent, |
24 | | nsIFrame* aPrevInFlow) override; |
25 | | |
26 | | virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder, |
27 | | const nsDisplayListSet& aLists) override; |
28 | | |
29 | | virtual void DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData) override; |
30 | | |
31 | | virtual nsresult HandleEvent(nsPresContext* aPresContext, |
32 | | mozilla::WidgetGUIEvent* aEvent, |
33 | | nsEventStatus* aEventStatus) override; |
34 | | |
35 | | virtual void MouseClicked(mozilla::WidgetGUIEvent* aEvent); |
36 | | |
37 | | void Blurred(); |
38 | | |
39 | | #ifdef DEBUG_FRAME_DUMP |
40 | | virtual nsresult GetFrameName(nsAString& aResult) const override { |
41 | | return MakeFrameName(NS_LITERAL_STRING("ButtonBoxFrame"), aResult); |
42 | | } |
43 | | #endif |
44 | | |
45 | 0 | void UpdateMouseThrough() override { AddStateBits(NS_FRAME_MOUSE_THROUGH_NEVER); } |
46 | | |
47 | | private: |
48 | | class nsButtonBoxListener final : public nsIDOMEventListener |
49 | | { |
50 | | public: |
51 | | explicit nsButtonBoxListener(nsButtonBoxFrame* aButtonBoxFrame) : |
52 | | mButtonBoxFrame(aButtonBoxFrame) |
53 | 0 | { } |
54 | | |
55 | | NS_DECL_NSIDOMEVENTLISTENER |
56 | | |
57 | | NS_DECL_ISUPPORTS |
58 | | |
59 | | private: |
60 | | friend class nsButtonBoxFrame; |
61 | 0 | virtual ~nsButtonBoxListener() { } |
62 | | nsButtonBoxFrame* mButtonBoxFrame; |
63 | | }; |
64 | | |
65 | | RefPtr<nsButtonBoxListener> mButtonBoxListener; |
66 | | bool mIsHandlingKeyEvent; |
67 | | }; // class nsButtonBoxFrame |
68 | | |
69 | | #endif /* nsButtonBoxFrame_h___ */ |