| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 ScrollableArea* scrollableArea() const { return m_scrollableArea; } | 97 ScrollableArea* scrollableArea() const { return m_scrollableArea; } |
| 98 | 98 |
| 99 int pressedPos() const { return m_pressedPos; } | 99 int pressedPos() const { return m_pressedPos; } |
| 100 | 100 |
| 101 virtual void setHoveredPart(ScrollbarPart); | 101 virtual void setHoveredPart(ScrollbarPart); |
| 102 virtual void setPressedPart(ScrollbarPart); | 102 virtual void setPressedPart(ScrollbarPart); |
| 103 | 103 |
| 104 void setProportion(int visibleSize, int totalSize); | 104 void setProportion(int visibleSize, int totalSize); |
| 105 void setPressedPos(int p) { m_pressedPos = p; } | 105 void setPressedPos(int p) { m_pressedPos = p; } |
| 106 | 106 |
| 107 void paint(GraphicsContext*, const CullRect&) const final; | 107 void paint(GraphicsContext&, const CullRect&) const final; |
| 108 | 108 |
| 109 bool isOverlayScrollbar() const override; | 109 bool isOverlayScrollbar() const override; |
| 110 bool shouldParticipateInHitTesting(); | 110 bool shouldParticipateInHitTesting(); |
| 111 | 111 |
| 112 void windowActiveChangedForSnowLeopardOnly(); | 112 void windowActiveChangedForSnowLeopardOnly(); |
| 113 bool isWindowActive() const; | 113 bool isWindowActive() const; |
| 114 | 114 |
| 115 bool gestureEvent(const PlatformGestureEvent&); | 115 bool gestureEvent(const PlatformGestureEvent&); |
| 116 | 116 |
| 117 // These methods are used for platform scrollbars to give :hover feedback.
They will not get called | 117 // These methods are used for platform scrollbars to give :hover feedback.
They will not get called |
| 118 // when the mouse went down in a scrollbar, since it is assumed the scrollba
r will start | 118 // when the mouse went down in a scrollbar, since it is assumed the scrollba
r will start |
| 119 // grabbing all events in that case anyway. | 119 // grabbing all events in that case anyway. |
| 120 void mouseMoved(const PlatformMouseEvent&); | 120 void mouseMoved(const PlatformMouseEvent&); |
| 121 void mouseEntered(); | 121 void mouseEntered(); |
| 122 void mouseExited(); | 122 void mouseExited(); |
| 123 | 123 |
| 124 // Used by some platform scrollbars to know when they've been released from
capture. | 124 // Used by some platform scrollbars to know when they've been released from
capture. |
| 125 void mouseUp(const PlatformMouseEvent&); | 125 void mouseUp(const PlatformMouseEvent&); |
| 126 void mouseDown(const PlatformMouseEvent&); | 126 void mouseDown(const PlatformMouseEvent&); |
| 127 | 127 |
| 128 ScrollbarTheme* theme() const { return m_theme; } | 128 ScrollbarTheme& theme() const { return m_theme; } |
| 129 | 129 |
| 130 IntRect convertToContainingWidget(const IntRect&) const override; | 130 IntRect convertToContainingWidget(const IntRect&) const override; |
| 131 IntRect convertFromContainingWidget(const IntRect&) const override; | 131 IntRect convertFromContainingWidget(const IntRect&) const override; |
| 132 | 132 |
| 133 IntPoint convertToContainingWidget(const IntPoint&) const override; | 133 IntPoint convertToContainingWidget(const IntPoint&) const override; |
| 134 IntPoint convertFromContainingWidget(const IntPoint&) const override; | 134 IntPoint convertFromContainingWidget(const IntPoint&) const override; |
| 135 | 135 |
| 136 void moveThumb(int pos, bool draggingDocument = false); | 136 void moveThumb(int pos, bool draggingDocument = false); |
| 137 | 137 |
| 138 bool isAlphaLocked() const override { return m_isAlphaLocked; } | 138 bool isAlphaLocked() const override { return m_isAlphaLocked; } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 void autoscrollTimerFired(Timer<Scrollbar>*); | 170 void autoscrollTimerFired(Timer<Scrollbar>*); |
| 171 void startTimerIfNeeded(double delay); | 171 void startTimerIfNeeded(double delay); |
| 172 void stopTimerIfNeeded(); | 172 void stopTimerIfNeeded(); |
| 173 void autoscrollPressedPart(double delay); | 173 void autoscrollPressedPart(double delay); |
| 174 ScrollDirectionPhysical pressedPartScrollDirectionPhysical(); | 174 ScrollDirectionPhysical pressedPartScrollDirectionPhysical(); |
| 175 ScrollGranularity pressedPartScrollGranularity(); | 175 ScrollGranularity pressedPartScrollGranularity(); |
| 176 | 176 |
| 177 RawPtrWillBeMember<ScrollableArea> m_scrollableArea; | 177 RawPtrWillBeMember<ScrollableArea> m_scrollableArea; |
| 178 ScrollbarOrientation m_orientation; | 178 ScrollbarOrientation m_orientation; |
| 179 ScrollbarControlSize m_controlSize; | 179 ScrollbarControlSize m_controlSize; |
| 180 ScrollbarTheme* m_theme; | 180 ScrollbarTheme& m_theme; |
| 181 | 181 |
| 182 int m_visibleSize; | 182 int m_visibleSize; |
| 183 int m_totalSize; | 183 int m_totalSize; |
| 184 float m_currentPos; | 184 float m_currentPos; |
| 185 float m_dragOrigin; | 185 float m_dragOrigin; |
| 186 | 186 |
| 187 ScrollbarPart m_hoveredPart; | 187 ScrollbarPart m_hoveredPart; |
| 188 ScrollbarPart m_pressedPart; | 188 ScrollbarPart m_pressedPart; |
| 189 int m_pressedPos; | 189 int m_pressedPos; |
| 190 float m_scrollPos; | 190 float m_scrollPos; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 210 | 210 |
| 211 bool m_trackNeedsRepaint; | 211 bool m_trackNeedsRepaint; |
| 212 bool m_thumbNeedsRepaint; | 212 bool m_thumbNeedsRepaint; |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); | 215 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); |
| 216 | 216 |
| 217 } // namespace blink | 217 } // namespace blink |
| 218 | 218 |
| 219 #endif // Scrollbar_h | 219 #endif // Scrollbar_h |
| OLD | NEW |