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

Unified Diff: ui/views/rendering/border.h

Issue 6286013: V2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/native_types.h ('k') | ui/views/rendering/border.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/rendering/border.h
===================================================================
--- ui/views/rendering/border.h (revision 0)
+++ ui/views/rendering/border.h (revision 0)
@@ -0,0 +1,50 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_BORDER_H_
+#define UI_VIEWS_BORDER_H_
+
+#include "base/logging.h"
+#include "gfx/insets.h"
+#include "third_party/skia/include/core/SkColor.h"
+
+namespace gfx {
+class Canvas;
+}
+
+namespace ui {
+
+class View;
+
+////////////////////////////////////////////////////////////////////////////////
+// Border class
+//
+// A class that provides padding for a View. Subclass to provide custom
+// rendering of the Border. Insets determine the size of border.
+//
+class Border {
+ public:
+ virtual ~Border();
+
+ // Create various common border types.
+ static Border* CreateSolidBorder(int thickness, SkColor color);
+ static Border* CreateTransparentBorder(const gfx::Insets& insets);
+
+ gfx::Insets insets() const { return insets_; }
+ void set_insets(const gfx::Insets& insets) { insets_ = insets; }
+
+ virtual void Paint(const View* view, gfx::Canvas* canvas) const;
+
+ protected:
+ Border();
+
+ private:
+ gfx::Insets insets_;
+
+ DISALLOW_COPY_AND_ASSIGN(Border);
+};
+
+} // namespace ui
+
+#endif // UI_VIEWS_BORDER_H_
Property changes on: ui\views\rendering\border.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« 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