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

Side by Side Diff: views/controls/focusable_border.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 | « ui/views/widget/native_widget_win.cc ('k') | views/controls/focusable_border.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_FOCUSABLE_BORDER_H_
6 #define VIEWS_CONTROLS_FOCUSABLE_BORDER_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "views/border.h"
12 #include "views/view.h"
13
14 namespace gfx {
15 class Canvas;
16 class Insets;
17 }
18
19 namespace views {
20
21 // A Border class to draw a focused border around a field (e.g textfield).
22 class FocusableBorder : public Border {
23 public:
24 FocusableBorder();
25
26 // Sets the insets of the border.
27 void SetInsets(int top, int left, int bottom, int right);
28
29 // Sets the focus state.
30 void set_has_focus(bool has_focus) {
31 has_focus_ = has_focus;
32 }
33
34 // Overridden from Border:
35 virtual void Paint(const View& view, gfx::Canvas* canvas) const OVERRIDE;
36 virtual void GetInsets(gfx::Insets* insets) const OVERRIDE;
37
38 private:
39 bool has_focus_;
40 gfx::Insets insets_;
41
42 DISALLOW_COPY_AND_ASSIGN(FocusableBorder);
43 };
44
45 } // namespace views
46
47 #endif // VIEWS_CONTROLS_FOCUSABLE_BORDER_H_
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_win.cc ('k') | views/controls/focusable_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698