From da48864fc7669d9545047bfa7ba76cb508838ce3 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Thu, 8 Oct 1998 18:21:32 +0000 Subject: [PATCH] Moved HandlePress,HandleDrag,HandleRelease from nsIFrame to nsFrame --- layout/base/public/nsIFrame.h | 31 +++++++++++++++++-------------- layout/generic/nsFrame.h | 17 ++++++++++------- layout/generic/nsIFrame.h | 31 +++++++++++++++++-------------- layout/html/base/src/nsFrame.h | 17 ++++++++++------- 4 files changed, 54 insertions(+), 42 deletions(-) diff --git a/layout/base/public/nsIFrame.h b/layout/base/public/nsIFrame.h index c0cb3d05839a..f42003e6c307 100644 --- a/layout/base/public/nsIFrame.h +++ b/layout/base/public/nsIFrame.h @@ -144,6 +144,9 @@ public: /** * Get the index in parent of the frame's content object + * XXX This really doesn't belong in nsIFrame. It's just a helper + * function that asks the content parent for the index-in-container of + * this frame's content object... */ NS_IMETHOD GetContentIndex(PRInt32& aIndexInParent) const = 0; @@ -159,7 +162,7 @@ public: nsIStyleContext* aContext) = 0; /** - * Get the style data associated with this frame + * Get the style data associated with this frame. */ NS_IMETHOD GetStyleData(nsStyleStructID aSID, const nsStyleStruct*& aStyleStruct) const = 0; @@ -196,24 +199,24 @@ public: const nsRect& aDirtyRect) = 0; /** - * Handle an event. + * Event handling of GUI events. + * + * @param aEvent event structure describing the type of event and rge widget + * where the event originated + * @param aEventStatus a return value indicating whether the event was handled + * and whether default processing should be done + * + * XXX From a frame's perspective it's unclear what the effect of the event status + * is. Does it cause the event to continue propagating through the frame hierarchy + * or is it just returned to the widgets? + * + * @see nsGUIEvent + * @see nsEventStatus */ NS_IMETHOD HandleEvent(nsIPresContext& aPresContext, nsGUIEvent* aEvent, nsEventStatus& aEventStatus) = 0; - NS_IMETHOD HandlePress(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus) = 0; - - NS_IMETHOD HandleDrag(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus) = 0; - - NS_IMETHOD HandleRelease(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus) = 0; - NS_IMETHOD GetPosition(nsIPresContext& aPresContext, nsIRenderingContext * aRendContext, nsGUIEvent* aEvent, diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h index fb219f222b9d..8b812fc3ac8b 100644 --- a/layout/generic/nsFrame.h +++ b/layout/generic/nsFrame.h @@ -189,18 +189,21 @@ public: NS_IMETHOD GetReflowMetrics(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aMetrics); - // Selection Methods + // Selection Methods + // XXX Doc me... + // XXX If these are selection specific, then the name should imply selection + // rather than generic event processing, e.g., SelectionHandlePress... NS_IMETHOD HandlePress(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus); + nsGUIEvent * aEvent, + nsEventStatus& aEventStatus); NS_IMETHOD HandleDrag(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus); + nsGUIEvent * aEvent, + nsEventStatus& aEventStatus); NS_IMETHOD HandleRelease(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus); + nsGUIEvent * aEvent, + nsEventStatus& aEventStatus); NS_IMETHOD GetPosition(nsIPresContext& aPresContext, nsIRenderingContext * aRendContext, diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index c0cb3d05839a..f42003e6c307 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -144,6 +144,9 @@ public: /** * Get the index in parent of the frame's content object + * XXX This really doesn't belong in nsIFrame. It's just a helper + * function that asks the content parent for the index-in-container of + * this frame's content object... */ NS_IMETHOD GetContentIndex(PRInt32& aIndexInParent) const = 0; @@ -159,7 +162,7 @@ public: nsIStyleContext* aContext) = 0; /** - * Get the style data associated with this frame + * Get the style data associated with this frame. */ NS_IMETHOD GetStyleData(nsStyleStructID aSID, const nsStyleStruct*& aStyleStruct) const = 0; @@ -196,24 +199,24 @@ public: const nsRect& aDirtyRect) = 0; /** - * Handle an event. + * Event handling of GUI events. + * + * @param aEvent event structure describing the type of event and rge widget + * where the event originated + * @param aEventStatus a return value indicating whether the event was handled + * and whether default processing should be done + * + * XXX From a frame's perspective it's unclear what the effect of the event status + * is. Does it cause the event to continue propagating through the frame hierarchy + * or is it just returned to the widgets? + * + * @see nsGUIEvent + * @see nsEventStatus */ NS_IMETHOD HandleEvent(nsIPresContext& aPresContext, nsGUIEvent* aEvent, nsEventStatus& aEventStatus) = 0; - NS_IMETHOD HandlePress(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus) = 0; - - NS_IMETHOD HandleDrag(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus) = 0; - - NS_IMETHOD HandleRelease(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus) = 0; - NS_IMETHOD GetPosition(nsIPresContext& aPresContext, nsIRenderingContext * aRendContext, nsGUIEvent* aEvent, diff --git a/layout/html/base/src/nsFrame.h b/layout/html/base/src/nsFrame.h index fb219f222b9d..8b812fc3ac8b 100644 --- a/layout/html/base/src/nsFrame.h +++ b/layout/html/base/src/nsFrame.h @@ -189,18 +189,21 @@ public: NS_IMETHOD GetReflowMetrics(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aMetrics); - // Selection Methods + // Selection Methods + // XXX Doc me... + // XXX If these are selection specific, then the name should imply selection + // rather than generic event processing, e.g., SelectionHandlePress... NS_IMETHOD HandlePress(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus); + nsGUIEvent * aEvent, + nsEventStatus& aEventStatus); NS_IMETHOD HandleDrag(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus); + nsGUIEvent * aEvent, + nsEventStatus& aEventStatus); NS_IMETHOD HandleRelease(nsIPresContext& aPresContext, - nsGUIEvent * aEvent, - nsEventStatus& aEventStatus); + nsGUIEvent * aEvent, + nsEventStatus& aEventStatus); NS_IMETHOD GetPosition(nsIPresContext& aPresContext, nsIRenderingContext * aRendContext,