OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
33 #include "platform/scroll/ScrollTypes.h" | 33 #include "platform/scroll/ScrollTypes.h" |
34 #include "platform/scroll/ScrollbarThemeClient.h" | 34 #include "platform/scroll/ScrollbarThemeClient.h" |
35 #include "wtf/MathExtras.h" | 35 #include "wtf/MathExtras.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class GraphicsContext; | 39 class GraphicsContext; |
40 class HostWindow; | 40 class HostWindow; |
41 class IntRect; | 41 class IntRect; |
42 class PlatformGestureEvent; | |
43 class PlatformMouseEvent; | 42 class PlatformMouseEvent; |
44 class ScrollableArea; | 43 class ScrollableArea; |
45 class ScrollbarTheme; | 44 class ScrollbarTheme; |
| 45 class WebGestureEvent; |
46 | 46 |
47 class PLATFORM_EXPORT Scrollbar : public Widget, | 47 class PLATFORM_EXPORT Scrollbar : public Widget, |
48 public ScrollbarThemeClient, | 48 public ScrollbarThemeClient, |
49 public DisplayItemClient { | 49 public DisplayItemClient { |
50 public: | 50 public: |
51 static Scrollbar* create(ScrollableArea* scrollableArea, | 51 static Scrollbar* create(ScrollableArea* scrollableArea, |
52 ScrollbarOrientation orientation, | 52 ScrollbarOrientation orientation, |
53 ScrollbarControlSize size, | 53 ScrollbarControlSize size, |
54 HostWindow* hostWindow) { | 54 HostWindow* hostWindow) { |
55 return new Scrollbar(scrollableArea, orientation, size, hostWindow); | 55 return new Scrollbar(scrollableArea, orientation, size, hostWindow); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 void paint(GraphicsContext&, const CullRect&) const final; | 128 void paint(GraphicsContext&, const CullRect&) const final; |
129 | 129 |
130 bool isOverlayScrollbar() const override; | 130 bool isOverlayScrollbar() const override; |
131 bool shouldParticipateInHitTesting(); | 131 bool shouldParticipateInHitTesting(); |
132 | 132 |
133 bool isWindowActive() const; | 133 bool isWindowActive() const; |
134 | 134 |
135 // Return if the gesture event was handled. |shouldUpdateCapture| | 135 // Return if the gesture event was handled. |shouldUpdateCapture| |
136 // will be set to true if the handler should update the capture | 136 // will be set to true if the handler should update the capture |
137 // state for this scrollbar. | 137 // state for this scrollbar. |
138 bool gestureEvent(const PlatformGestureEvent&, bool* shouldUpdateCapture); | 138 bool gestureEvent(const WebGestureEvent&, bool* shouldUpdateCapture); |
139 | 139 |
140 // These methods are used for platform scrollbars to give :hover feedback. | 140 // These methods are used for platform scrollbars to give :hover feedback. |
141 // They will not get called when the mouse went down in a scrollbar, since it | 141 // They will not get called when the mouse went down in a scrollbar, since it |
142 // is assumed the scrollbar will start | 142 // is assumed the scrollbar will start |
143 // grabbing all events in that case anyway. | 143 // grabbing all events in that case anyway. |
144 void mouseMoved(const PlatformMouseEvent&); | 144 void mouseMoved(const PlatformMouseEvent&); |
145 void mouseEntered(); | 145 void mouseEntered(); |
146 void mouseExited(); | 146 void mouseExited(); |
147 | 147 |
148 // Used by some platform scrollbars to know when they've been released from | 148 // Used by some platform scrollbars to know when they've been released from |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 DEFINE_TYPE_CASTS(Scrollbar, | 256 DEFINE_TYPE_CASTS(Scrollbar, |
257 Widget, | 257 Widget, |
258 widget, | 258 widget, |
259 widget->isScrollbar(), | 259 widget->isScrollbar(), |
260 widget.isScrollbar()); | 260 widget.isScrollbar()); |
261 | 261 |
262 } // namespace blink | 262 } // namespace blink |
263 | 263 |
264 #endif // Scrollbar_h | 264 #endif // Scrollbar_h |
OLD | NEW |