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

Side by Side Diff: ui/views/rendering/border.h

Issue 6286013: V2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
« no previous file with comments | « ui/views/native_types.h ('k') | ui/views/rendering/border.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
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 UI_VIEWS_BORDER_H_
6 #define UI_VIEWS_BORDER_H_
7
8 #include "base/logging.h"
9 #include "gfx/insets.h"
10 #include "third_party/skia/include/core/SkColor.h"
11
12 namespace gfx {
13 class Canvas;
14 }
15
16 namespace ui {
17
18 class View;
19
20 ////////////////////////////////////////////////////////////////////////////////
21 // Border class
22 //
23 // A class that provides padding for a View. Subclass to provide custom
24 // rendering of the Border. Insets determine the size of border.
25 //
26 class Border {
27 public:
28 virtual ~Border();
29
30 // Create various common border types.
31 static Border* CreateSolidBorder(int thickness, SkColor color);
32 static Border* CreateTransparentBorder(const gfx::Insets& insets);
33
34 gfx::Insets insets() const { return insets_; }
35 void set_insets(const gfx::Insets& insets) { insets_ = insets; }
36
37 virtual void Paint(const View* view, gfx::Canvas* canvas) const;
38
39 protected:
40 Border();
41
42 private:
43 gfx::Insets insets_;
44
45 DISALLOW_COPY_AND_ASSIGN(Border);
46 };
47
48 } // namespace ui
49
50 #endif // UI_VIEWS_BORDER_H_
OLDNEW
« no previous file with comments | « ui/views/native_types.h ('k') | ui/views/rendering/border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698