Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: Source/WebCore/platform/ScrollView.h

Issue 13544008: Remove PlatformWidget references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 virtual IntSize overhangAmount() const OVERRIDE; 188 virtual IntSize overhangAmount() const OVERRIDE;
189 189
190 void cacheCurrentScrollPosition() { m_cachedScrollPosition = scrollPosition( ); } 190 void cacheCurrentScrollPosition() { m_cachedScrollPosition = scrollPosition( ); }
191 IntPoint cachedScrollPosition() const { return m_cachedScrollPosition; } 191 IntPoint cachedScrollPosition() const { return m_cachedScrollPosition; }
192 192
193 // Functions for scrolling the view. 193 // Functions for scrolling the view.
194 virtual void setScrollPosition(const IntPoint&); 194 virtual void setScrollPosition(const IntPoint&);
195 void scrollBy(const IntSize& s) { return setScrollPosition(scrollPosition() + s); } 195 void scrollBy(const IntSize& s) { return setScrollPosition(scrollPosition() + s); }
196 196
197 // This function scrolls by lines, pages or pixels.
198 bool scroll(ScrollDirection, ScrollGranularity);
199
200 // A logical scroll that just ends up calling the corresponding physical scr oll() based off the document's writing mode. 197 // A logical scroll that just ends up calling the corresponding physical scr oll() based off the document's writing mode.
201 bool logicalScroll(ScrollLogicalDirection, ScrollGranularity); 198 bool logicalScroll(ScrollLogicalDirection, ScrollGranularity);
202 199
203 // Scroll the actual contents of the view (either blitting or invalidating a s needed). 200 // Scroll the actual contents of the view (either blitting or invalidating a s needed).
204 void scrollContents(const IntSize& scrollDelta); 201 void scrollContents(const IntSize& scrollDelta);
205 202
206 // This gives us a means of blocking painting on our scrollbars until the fi rst layout has occurred. 203 // This gives us a means of blocking painting on our scrollbars until the fi rst layout has occurred.
207 void setScrollbarsSuppressed(bool suppressed, bool repaintOnUnsuppress = fal se); 204 void setScrollbarsSuppressed(bool suppressed, bool repaintOnUnsuppress = fal se);
208 bool scrollbarsSuppressed() const { return m_scrollbarsSuppressed; } 205 bool scrollbarsSuppressed() const { return m_scrollbarsSuppressed; }
209 206
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR ect& verticalOverhangRect); 395 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR ect& verticalOverhangRect);
399 void updateOverhangAreas(); 396 void updateOverhangAreas();
400 397
401 #if PLATFORM(MAC) && defined __OBJC__ 398 #if PLATFORM(MAC) && defined __OBJC__
402 public: 399 public:
403 NSView* documentView() const; 400 NSView* documentView() const;
404 401
405 private: 402 private:
406 NSScrollView<WebCoreFrameScrollView>* scrollView() const; 403 NSScrollView<WebCoreFrameScrollView>* scrollView() const;
407 #endif 404 #endif
408
409 #if PLATFORM(WX)
410 public:
411 virtual void setPlatformWidget(wxWindow*);
412 void adjustScrollbars(int x = -1, int y = -1, bool refresh = true);
413 private:
414 class ScrollViewPrivate;
415 ScrollViewPrivate* m_data;
416 #endif
417
418 }; // class ScrollView 405 }; // class ScrollView
419 406
420 inline ScrollView* toScrollView(Widget* widget) 407 inline ScrollView* toScrollView(Widget* widget)
421 { 408 {
422 ASSERT(!widget || widget->isScrollView()); 409 ASSERT(!widget || widget->isScrollView());
423 return static_cast<ScrollView*>(widget); 410 return static_cast<ScrollView*>(widget);
424 } 411 }
425 412
426 inline const ScrollView* toScrollView(const Widget* widget) 413 inline const ScrollView* toScrollView(const Widget* widget)
427 { 414 {
428 ASSERT(!widget || widget->isScrollView()); 415 ASSERT(!widget || widget->isScrollView());
429 return static_cast<const ScrollView*>(widget); 416 return static_cast<const ScrollView*>(widget);
430 } 417 }
431 418
432 // This will catch anyone doing an unnecessary cast. 419 // This will catch anyone doing an unnecessary cast.
433 void toScrollView(const ScrollView*); 420 void toScrollView(const ScrollView*);
434 421
435 } // namespace WebCore 422 } // namespace WebCore
436 423
437 #endif // ScrollView_h 424 #endif // ScrollView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698