gecko-dev/layout/xul/nsScrollbarFrame.h

91 строка
3.0 KiB
C
Исходник Обычный вид История

/* -*- 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-21 01:39:52 +04:00
//
// nsScrollbarFrame
//
#ifndef nsScrollbarFrame_h__
#define nsScrollbarFrame_h__
#include "mozilla/Attributes.h"
#include "nsBoxFrame.h"
2000-06-07 03:13:05 +04:00
class nsIScrollbarMediator;
1999-04-21 01:39:52 +04:00
nsIFrame* NS_NewScrollbarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
1999-04-21 01:39:52 +04:00
class nsScrollbarFrame : public nsBoxFrame
1999-04-21 01:39:52 +04:00
{
public:
nsScrollbarFrame(nsIPresShell* aShell, nsStyleContext* aContext):
nsBoxFrame(aShell, aContext), mScrollbarMediator(nullptr) {}
1999-04-21 01:39:52 +04:00
NS_DECL_QUERYFRAME_TARGET(nsScrollbarFrame)
#ifdef DEBUG_FRAME_DUMP
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
return MakeFrameName(NS_LITERAL_STRING("ScrollbarFrame"), aResult);
1999-04-21 01:39:52 +04:00
}
#endif
// nsIFrame overrides
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType) MOZ_OVERRIDE;
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS
1999-04-21 01:39:52 +04:00
NS_IMETHOD HandlePress(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
1999-08-20 02:16:23 +04:00
NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld) MOZ_OVERRIDE;
1999-08-20 02:16:23 +04:00
NS_IMETHOD HandleDrag(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual void Init(nsIContent* aContent,
nsIFrame* aParent,
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
1999-08-20 02:16:23 +04:00
NS_IMETHOD Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
void SetScrollbarMediatorContent(nsIContent* aMediator);
nsIScrollbarMediator* GetScrollbarMediator();
2000-06-07 03:13:05 +04:00
// nsBox methods
/**
* Treat scrollbars as clipping their children; overflowing children
* will not be allowed to set an overflow rect on this
* frame. This means that when the scroll code decides to hide a
* scrollframe by setting its height or width to zero, that will
* hide the children too.
*/
virtual bool DoesClipChildren() MOZ_OVERRIDE { return true; }
NS_IMETHOD GetMargin(nsMargin& aMargin) MOZ_OVERRIDE;
2000-06-07 03:13:05 +04:00
private:
nsCOMPtr<nsIContent> mScrollbarMediator;
1999-04-21 01:39:52 +04:00
}; // class nsScrollbarFrame
#endif