| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Holger Hans Peter Freyther | 3 * Copyright (C) 2009 Holger Hans Peter Freyther |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // ScrollableArea functions. | 48 // ScrollableArea functions. |
| 49 virtual int scrollSize(ScrollbarOrientation) const OVERRIDE; | 49 virtual int scrollSize(ScrollbarOrientation) const OVERRIDE; |
| 50 virtual void setScrollOffset(const IntPoint&) OVERRIDE; | 50 virtual void setScrollOffset(const IntPoint&) OVERRIDE; |
| 51 virtual bool isScrollCornerVisible() const OVERRIDE; | 51 virtual bool isScrollCornerVisible() const OVERRIDE; |
| 52 virtual void scrollbarStyleChanged() OVERRIDE; | 52 virtual void scrollbarStyleChanged() OVERRIDE; |
| 53 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE; | 53 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE; |
| 54 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE; | 54 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE; |
| 55 | 55 |
| 56 virtual void notifyPageThatContentAreaWillPaint() const; | 56 virtual void notifyPageThatContentAreaWillPaint() const; |
| 57 | 57 |
| 58 // NOTE: This should only be called by the overriden setScrollOffset from Sc
rollableArea. | |
| 59 virtual void scrollTo(const IntSize& newOffset); | |
| 60 | |
| 61 // The window that hosts the ScrollView. The ScrollView will communicate scr
olls and repaints to the | 58 // The window that hosts the ScrollView. The ScrollView will communicate scr
olls and repaints to the |
| 62 // host window in the window's coordinate space. | 59 // host window in the window's coordinate space. |
| 63 virtual HostWindow* hostWindow() const = 0; | 60 virtual HostWindow* hostWindow() const = 0; |
| 64 | 61 |
| 65 // Returns a clip rect in host window coordinates. Used to clip the blit on
a scroll. | 62 // Returns a clip rect in host window coordinates. Used to clip the blit on
a scroll. |
| 66 virtual IntRect windowClipRect(IncludeScrollbarsInRect = ExcludeScrollbars)
const = 0; | 63 virtual IntRect windowClipRect(IncludeScrollbarsInRect = ExcludeScrollbars)
const = 0; |
| 67 | 64 |
| 68 // Functions for child manipulation and inspection. | 65 // Functions for child manipulation and inspection. |
| 69 const HashSet<RefPtr<Widget> >* children() const { return &m_children; } | 66 const HashSet<RefPtr<Widget> >* children() const { return &m_children; } |
| 70 virtual void addChild(PassRefPtr<Widget>); | 67 virtual void addChild(PassRefPtr<Widget>); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons
t IntPoint&) const OVERRIDE; | 244 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons
t IntPoint&) const OVERRIDE; |
| 248 | 245 |
| 249 void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRe
ct); | 246 void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRe
ct); |
| 250 void calculateAndPaintOverhangBackground(GraphicsContext*, const IntRect& di
rtyRect); | 247 void calculateAndPaintOverhangBackground(GraphicsContext*, const IntRect& di
rtyRect); |
| 251 | 248 |
| 252 virtual bool isScrollView() const OVERRIDE FINAL { return true; } | 249 virtual bool isScrollView() const OVERRIDE FINAL { return true; } |
| 253 | 250 |
| 254 protected: | 251 protected: |
| 255 ScrollView(); | 252 ScrollView(); |
| 256 | 253 |
| 254 // NOTE: This should only be called by the overriden setScrollOffset from Sc
rollableArea. |
| 255 virtual void scrollTo(const IntSize& newOffset); |
| 256 |
| 257 virtual void contentRectangleForPaintInvalidation(const IntRect&); | 257 virtual void contentRectangleForPaintInvalidation(const IntRect&); |
| 258 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0; | 258 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0; |
| 259 | 259 |
| 260 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO
verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect); | 260 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO
verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect); |
| 261 | 261 |
| 262 virtual void scrollbarExistenceDidChange() = 0; | 262 virtual void scrollbarExistenceDidChange() = 0; |
| 263 // These functions are used to create/destroy scrollbars. | 263 // These functions are used to create/destroy scrollbars. |
| 264 void setHasHorizontalScrollbar(bool); | 264 void setHasHorizontalScrollbar(bool); |
| 265 void setHasVerticalScrollbar(bool); | 265 void setHasVerticalScrollbar(bool); |
| 266 | 266 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 342 |
| 343 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR
ect& verticalOverhangRect); | 343 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR
ect& verticalOverhangRect); |
| 344 void updateOverhangAreas(); | 344 void updateOverhangAreas(); |
| 345 }; // class ScrollView | 345 }; // class ScrollView |
| 346 | 346 |
| 347 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS
crollView()); | 347 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS
crollView()); |
| 348 | 348 |
| 349 } // namespace blink | 349 } // namespace blink |
| 350 | 350 |
| 351 #endif // ScrollView_h | 351 #endif // ScrollView_h |
| OLD | NEW |