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

Side by Side Diff: sky/engine/platform/scroll/Scrollbar.h

Issue 874823002: Move GestureEvent to NewEventDispatcher (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Build fixes Created 5 years, 11 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
« no previous file with comments | « sky/engine/platform/PlatformGestureEvent.h ('k') | sky/engine/platform/scroll/Scrollbar.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
30 #include "sky/engine/platform/Widget.h" 30 #include "sky/engine/platform/Widget.h"
31 #include "sky/engine/platform/scroll/ScrollTypes.h" 31 #include "sky/engine/platform/scroll/ScrollTypes.h"
32 #include "sky/engine/platform/scroll/Scrollbar.h" 32 #include "sky/engine/platform/scroll/Scrollbar.h"
33 #include "sky/engine/wtf/MathExtras.h" 33 #include "sky/engine/wtf/MathExtras.h"
34 #include "sky/engine/wtf/PassRefPtr.h" 34 #include "sky/engine/wtf/PassRefPtr.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class GraphicsContext; 38 class GraphicsContext;
39 class IntRect; 39 class IntRect;
40 class PlatformGestureEvent;
41 class ScrollableArea; 40 class ScrollableArea;
42 41
43 class PLATFORM_EXPORT Scrollbar final : public Widget { 42 class PLATFORM_EXPORT Scrollbar final : public Widget {
44 public: 43 public:
45 static PassRefPtr<Scrollbar> create(ScrollableArea*, ScrollbarOrientation); 44 static PassRefPtr<Scrollbar> create(ScrollableArea*, ScrollbarOrientation);
46 45
47 virtual ~Scrollbar(); 46 virtual ~Scrollbar();
48 47
49 bool isScrollableAreaActive() const; 48 bool isScrollableAreaActive() const;
50 49
(...skipping 18 matching lines...) Expand all
69 void setPressedPart(ScrollbarPart); 68 void setPressedPart(ScrollbarPart);
70 69
71 void setProportion(int visibleSize, int totalSize); 70 void setProportion(int visibleSize, int totalSize);
72 void setPressedPos(int p) { m_pressedPos = p; } 71 void setPressedPos(int p) { m_pressedPos = p; }
73 72
74 virtual void paint(GraphicsContext*, const IntRect& damageRect) override; 73 virtual void paint(GraphicsContext*, const IntRect& damageRect) override;
75 74
76 bool isOverlayScrollbar() const; 75 bool isOverlayScrollbar() const;
77 bool shouldParticipateInHitTesting(); 76 bool shouldParticipateInHitTesting();
78 77
79 bool gestureEvent(const PlatformGestureEvent&);
80
81 void mouseEntered(); 78 void mouseEntered();
82 void mouseExited(); 79 void mouseExited();
83 80
84 virtual IntRect convertToContainingView(const IntRect&) const override; 81 virtual IntRect convertToContainingView(const IntRect&) const override;
85 virtual IntRect convertFromContainingView(const IntRect&) const override; 82 virtual IntRect convertFromContainingView(const IntRect&) const override;
86 83
87 virtual IntPoint convertToContainingView(const IntPoint&) const override; 84 virtual IntPoint convertToContainingView(const IntPoint&) const override;
88 virtual IntPoint convertFromContainingView(const IntPoint&) const override; 85 virtual IntPoint convertFromContainingView(const IntPoint&) const override;
89 86
90 void moveThumb(int pos); 87 void moveThumb(int pos);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 virtual bool isScrollbar() const override { return true; } 143 virtual bool isScrollbar() const override { return true; }
147 144
148 float scrollableAreaCurrentPos() const; 145 float scrollableAreaCurrentPos() const;
149 }; 146 };
150 147
151 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr ollbar()); 148 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr ollbar());
152 149
153 } // namespace blink 150 } // namespace blink
154 151
155 #endif // SKY_ENGINE_PLATFORM_SCROLL_SCROLLBAR_H_ 152 #endif // SKY_ENGINE_PLATFORM_SCROLL_SCROLLBAR_H_
OLDNEW
« no previous file with comments | « sky/engine/platform/PlatformGestureEvent.h ('k') | sky/engine/platform/scroll/Scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698