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

Side by Side Diff: views/controls/scrollbar/base_scroll_bar_button.h

Issue 7767002: Revert 98434 - Adding a Views scrollbar implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_BUTTON_H_
6 #define VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_BUTTON_H_
7 #pragma once
8
9 #include "views/controls/button/custom_button.h"
10
11 #include "views/repeat_controller.h"
12
13 #if defined(OS_LINUX)
14 #include "ui/gfx/screen.h"
15 #endif
16
17 namespace views {
18
19 ///////////////////////////////////////////////////////////////////////////////
20 //
21 // ScrollBarButton
22 //
23 // A button that activates on mouse pressed rather than released, and that
24 // continues to fire the clicked action as the mouse button remains pressed
25 // down on the button.
26 //
27 ///////////////////////////////////////////////////////////////////////////////
28 class VIEWS_EXPORT BaseScrollBarButton : public CustomButton {
29 public:
30 explicit BaseScrollBarButton(ButtonListener* listener);
31 virtual ~BaseScrollBarButton();
32
33 protected:
34 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE;
35 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE;
36 virtual void OnMouseCaptureLost() OVERRIDE;
37
38 private:
39 void RepeaterNotifyClick();
40
41 // The repeat controller that we use to repeatedly click the button when the
42 // mouse button is down.
43 RepeatController repeater_;
44
45 DISALLOW_COPY_AND_ASSIGN(BaseScrollBarButton);
46 };
47
48 } // namespace views
49
50 #endif // VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_BUTTON_H_
OLDNEW
« no previous file with comments | « views/controls/scrollbar/base_scroll_bar.cc ('k') | views/controls/scrollbar/base_scroll_bar_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698