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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 ScrollableArea* scrollableArea() const { return m_scrollableArea; } | 100 ScrollableArea* scrollableArea() const { return m_scrollableArea; } |
101 | 101 |
102 int pressedPos() const { return m_pressedPos; } | 102 int pressedPos() const { return m_pressedPos; } |
103 | 103 |
104 virtual void setHoveredPart(ScrollbarPart); | 104 virtual void setHoveredPart(ScrollbarPart); |
105 virtual void setPressedPart(ScrollbarPart); | 105 virtual void setPressedPart(ScrollbarPart); |
106 | 106 |
107 void setProportion(int visibleSize, int totalSize); | 107 void setProportion(int visibleSize, int totalSize); |
108 void setPressedPos(int p) { m_pressedPos = p; } | 108 void setPressedPos(int p) { m_pressedPos = p; } |
109 | 109 |
110 void paint(GraphicsContext*, const IntRect& damageRect) const final; | 110 void paint(GraphicsContext*, const CullRect&) const final; |
111 | 111 |
112 bool isOverlayScrollbar() const override; | 112 bool isOverlayScrollbar() const override; |
113 bool shouldParticipateInHitTesting(); | 113 bool shouldParticipateInHitTesting(); |
114 | 114 |
115 bool isWindowActive() const; | 115 bool isWindowActive() const; |
116 | 116 |
117 bool gestureEvent(const PlatformGestureEvent&); | 117 bool gestureEvent(const PlatformGestureEvent&); |
118 | 118 |
119 // These methods are used for platform scrollbars to give :hover feedback.
They will not get called | 119 // These methods are used for platform scrollbars to give :hover feedback.
They will not get called |
120 // when the mouse went down in a scrollbar, since it is assumed the scrollba
r will start | 120 // when the mouse went down in a scrollbar, since it is assumed the scrollba
r will start |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 bool isScrollbar() const override { return true; } | 205 bool isScrollbar() const override { return true; } |
206 | 206 |
207 float scrollableAreaCurrentPos() const; | 207 float scrollableAreaCurrentPos() const; |
208 }; | 208 }; |
209 | 209 |
210 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); | 210 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); |
211 | 211 |
212 } // namespace blink | 212 } // namespace blink |
213 | 213 |
214 #endif // Scrollbar_h | 214 #endif // Scrollbar_h |
OLD | NEW |