| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "core/platform/Widget.h" | 29 #include "core/platform/Widget.h" |
| 30 #include "platform/Timer.h" | 30 #include "platform/Timer.h" |
| 31 #include "platform/scroll/ScrollTypes.h" | 31 #include "platform/scroll/ScrollTypes.h" |
| 32 #include "platform/scroll/ScrollbarThemeClient.h" | 32 #include "platform/scroll/ScrollbarThemeClient.h" |
| 33 #include "wtf/MathExtras.h" | 33 #include "wtf/MathExtras.h" |
| 34 #include "wtf/PassRefPtr.h" | 34 #include "wtf/PassRefPtr.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 class AXObjectCache; |
| 38 class GraphicsContext; | 39 class GraphicsContext; |
| 39 class IntRect; | 40 class IntRect; |
| 40 class PlatformGestureEvent; | 41 class PlatformGestureEvent; |
| 41 class PlatformMouseEvent; | 42 class PlatformMouseEvent; |
| 42 class ScrollableArea; | 43 class ScrollableArea; |
| 43 class ScrollbarTheme; | 44 class ScrollbarTheme; |
| 45 class ScrollView; |
| 44 | 46 |
| 45 class Scrollbar : public Widget, | 47 class Scrollbar : public Widget, |
| 46 public ScrollbarThemeClient { | 48 public ScrollbarThemeClient { |
| 47 | 49 |
| 48 public: | 50 public: |
| 49 static PassRefPtr<Scrollbar> create(ScrollableArea*, ScrollbarOrientation, S
crollbarControlSize); | 51 static PassRefPtr<Scrollbar> create(ScrollableArea*, ScrollbarOrientation, S
crollbarControlSize); |
| 50 | 52 |
| 51 virtual ~Scrollbar(); | 53 virtual ~Scrollbar(); |
| 52 | 54 |
| 53 // ScrollbarThemeClient implementation. | 55 // ScrollbarThemeClient implementation. |
| 54 virtual int x() const { return Widget::x(); } | 56 virtual int x() const { return Widget::x(); } |
| 55 virtual int y() const { return Widget::y(); } | 57 virtual int y() const { return Widget::y(); } |
| 56 virtual int width() const { return Widget::width(); } | 58 virtual int width() const { return Widget::width(); } |
| 57 virtual int height() const { return Widget::height(); } | 59 virtual int height() const { return Widget::height(); } |
| 58 virtual IntSize size() const { return Widget::size(); } | 60 virtual IntSize size() const { return Widget::size(); } |
| 59 virtual IntPoint location() const { return Widget::location(); } | 61 virtual IntPoint location() const { return Widget::location(); } |
| 60 | 62 |
| 61 virtual ScrollView* parent() const { return Widget::parent(); } | 63 virtual Widget* parent() const { return Widget::parent(); } |
| 62 virtual ScrollView* root() const { return Widget::root(); } | 64 virtual Widget* root() const { return Widget::root(); } |
| 65 |
| 66 void removeFromParent(); |
| 67 ScrollView* parentScrollView() const; |
| 68 ScrollView* rootScrollView() const; |
| 63 | 69 |
| 64 virtual void setFrameRect(const IntRect&); | 70 virtual void setFrameRect(const IntRect&); |
| 65 virtual IntRect frameRect() const { return Widget::frameRect(); } | 71 virtual IntRect frameRect() const { return Widget::frameRect(); } |
| 66 | 72 |
| 67 virtual void invalidate() { Widget::invalidate(); } | 73 virtual void invalidate() { Widget::invalidate(); } |
| 68 virtual void invalidateRect(const IntRect&); | 74 virtual void invalidateRect(const IntRect&); |
| 69 | 75 |
| 70 virtual ScrollbarOverlayStyle scrollbarOverlayStyle() const; | 76 virtual ScrollbarOverlayStyle scrollbarOverlayStyle() const; |
| 71 virtual void getTickmarks(Vector<IntRect>&) const; | 77 virtual void getTickmarks(Vector<IntRect>&) const; |
| 72 virtual bool isScrollableAreaActive() const; | 78 virtual bool isScrollableAreaActive() const; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 ASSERT_WITH_SECURITY_IMPLICATION(!widget || widget->isScrollbar()); | 209 ASSERT_WITH_SECURITY_IMPLICATION(!widget || widget->isScrollbar()); |
| 204 return static_cast<const Scrollbar*>(widget); | 210 return static_cast<const Scrollbar*>(widget); |
| 205 } | 211 } |
| 206 | 212 |
| 207 // This will catch anyone doing an unnecessary cast. | 213 // This will catch anyone doing an unnecessary cast. |
| 208 void toScrollbar(const Scrollbar*); | 214 void toScrollbar(const Scrollbar*); |
| 209 | 215 |
| 210 } // namespace WebCore | 216 } // namespace WebCore |
| 211 | 217 |
| 212 #endif // Scrollbar_h | 218 #endif // Scrollbar_h |
| OLD | NEW |