| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GFX_GEOMETRY_INSETS_H_ | 5 #ifndef UI_GFX_GEOMETRY_INSETS_H_ |
| 6 #define UI_GFX_GEOMETRY_INSETS_H_ | 6 #define UI_GFX_GEOMETRY_INSETS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ui/gfx/geometry/insets_f.h" | 10 #include "ui/gfx/geometry/insets_f.h" |
| 11 #include "ui/gfx/gfx_export.h" | 11 #include "ui/gfx/gfx_export.h" |
| 12 | 12 |
| 13 namespace gfx { | 13 namespace gfx { |
| 14 | 14 |
| 15 // An integer version of gfx::Insets. | |
| 16 class GFX_EXPORT Insets { | 15 class GFX_EXPORT Insets { |
| 17 public: | 16 public: |
| 18 Insets(); | 17 Insets(); |
| 18 explicit Insets(int all); |
| 19 Insets(int vertical, int horizontal); |
| 19 Insets(int top, int left, int bottom, int right); | 20 Insets(int top, int left, int bottom, int right); |
| 20 | 21 |
| 21 ~Insets(); | 22 ~Insets(); |
| 22 | 23 |
| 23 int top() const { return top_; } | 24 int top() const { return top_; } |
| 24 int left() const { return left_; } | 25 int left() const { return left_; } |
| 25 int bottom() const { return bottom_; } | 26 int bottom() const { return bottom_; } |
| 26 int right() const { return right_; } | 27 int right() const { return right_; } |
| 27 | 28 |
| 28 // Returns the total width taken up by the insets, which is the sum of the | 29 // Returns the total width taken up by the insets, which is the sum of the |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 private: | 86 private: |
| 86 int top_; | 87 int top_; |
| 87 int left_; | 88 int left_; |
| 88 int bottom_; | 89 int bottom_; |
| 89 int right_; | 90 int right_; |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 } // namespace gfx | 93 } // namespace gfx |
| 93 | 94 |
| 94 #endif // UI_GFX_GEOMETRY_INSETS_H_ | 95 #endif // UI_GFX_GEOMETRY_INSETS_H_ |
| OLD | NEW |