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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 bool enabled() const override { return m_enabled; } | 94 bool enabled() const override { return m_enabled; } |
95 void setEnabled(bool) override; | 95 void setEnabled(bool) override; |
96 | 96 |
97 int scrollbarThickness() const; | 97 int scrollbarThickness() const; |
98 | 98 |
99 // Called by the ScrollableArea when the scroll offset changes. | 99 // Called by the ScrollableArea when the scroll offset changes. |
100 // Will trigger paint invalidation if required. | 100 // Will trigger paint invalidation if required. |
101 void offsetDidChange(); | 101 void offsetDidChange(); |
102 | 102 |
103 void disconnectFromScrollableArea(); | 103 void disconnectFromScrollableArea(); |
104 ScrollableArea* scrollableArea() const { return m_scrollableArea; } | 104 ScrollableArea* getScrollableArea() const { return m_scrollableArea; } |
105 | 105 |
106 int pressedPos() const { return m_pressedPos; } | 106 int pressedPos() const { return m_pressedPos; } |
107 | 107 |
108 virtual void setHoveredPart(ScrollbarPart); | 108 virtual void setHoveredPart(ScrollbarPart); |
109 virtual void setPressedPart(ScrollbarPart); | 109 virtual void setPressedPart(ScrollbarPart); |
110 | 110 |
111 void setProportion(int visibleSize, int totalSize); | 111 void setProportion(int visibleSize, int totalSize); |
112 void setPressedPos(int p) { m_pressedPos = p; } | 112 void setPressedPos(int p) { m_pressedPos = p; } |
113 | 113 |
114 void paint(GraphicsContext&, const CullRect&) const final; | 114 void paint(GraphicsContext&, const CullRect&) const final; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 227 |
228 bool m_trackNeedsRepaint; | 228 bool m_trackNeedsRepaint; |
229 bool m_thumbNeedsRepaint; | 229 bool m_thumbNeedsRepaint; |
230 }; | 230 }; |
231 | 231 |
232 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); | 232 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); |
233 | 233 |
234 } // namespace blink | 234 } // namespace blink |
235 | 235 |
236 #endif // Scrollbar_h | 236 #endif // Scrollbar_h |
OLD | NEW |