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

Side by Side Diff: views/controls/resize_area.h

Issue 8687031: views: Move the remaining files to ui/views/controls/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « views/controls/progress_bar_unittest.cc ('k') | views/controls/resize_area.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_RESIZE_AREA_H_
6 #define VIEWS_CONTROLS_RESIZE_AREA_H_
7 #pragma once
8
9 #include <string>
10
11 #include "views/view.h"
12
13 namespace views {
14
15 class ResizeAreaDelegate;
16
17 ////////////////////////////////////////////////////////////////////////////////
18 //
19 // An invisible area that acts like a horizontal resizer.
20 //
21 ////////////////////////////////////////////////////////////////////////////////
22 class VIEWS_EXPORT ResizeArea : public View {
23 public:
24 static const char kViewClassName[];
25
26 explicit ResizeArea(ResizeAreaDelegate* delegate);
27 virtual ~ResizeArea();
28
29 // Overridden from views::View:
30 virtual std::string GetClassName() const OVERRIDE;
31 virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE;
32 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
33 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE;
34 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
35 virtual void OnMouseCaptureLost() OVERRIDE;
36 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
37
38 private:
39 // Report the amount the user resized by to the delegate, accounting for
40 // directionality.
41 void ReportResizeAmount(int resize_amount, bool last_update);
42
43 // The delegate to notify when we have updates.
44 ResizeAreaDelegate* delegate_;
45
46 // The mouse position at start (in screen coordinates).
47 int initial_position_;
48
49 DISALLOW_COPY_AND_ASSIGN(ResizeArea);
50 };
51
52 } // namespace views
53
54 #endif // VIEWS_CONTROLS_RESIZE_AREA_H_
OLDNEW
« no previous file with comments | « views/controls/progress_bar_unittest.cc ('k') | views/controls/resize_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698