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

Side by Side Diff: ui/gfx/rect.h

Issue 10837041: Initial iOS bring up of ui. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Stuart feedback. Created 8 years, 4 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
« no previous file with comments | « ui/gfx/point.h ('k') | ui/gfx/rect.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Defines a simple integer rectangle class. The containment semantics 5 // Defines a simple integer rectangle class. The containment semantics
6 // are array-like; that is, the coordinate (x, y) is considered to be 6 // are array-like; that is, the coordinate (x, y) is considered to be
7 // contained by the rectangle, but the coordinate (x + width, y) is not. 7 // contained by the rectangle, but the coordinate (x + width, y) is not.
8 // The class will happily let you create malformed rectangles (that is, 8 // The class will happily let you create malformed rectangles (that is,
9 // rectangles with negative width and/or height), but there will be assertions 9 // rectangles with negative width and/or height), but there will be assertions
10 // in the operations (such as Contains()) to complain in this case. 10 // in the operations (such as Contains()) to complain in this case.
11 11
12 #ifndef UI_GFX_RECT_H_ 12 #ifndef UI_GFX_RECT_H_
13 #define UI_GFX_RECT_H_ 13 #define UI_GFX_RECT_H_
14 14
15 #include <string> 15 #include <string>
16 16
17 #include "ui/gfx/point.h" 17 #include "ui/gfx/point.h"
18 #include "ui/gfx/rect_base.h" 18 #include "ui/gfx/rect_base.h"
19 #include "ui/gfx/size.h" 19 #include "ui/gfx/size.h"
20 20
21 #if defined(OS_WIN) 21 #if defined(OS_WIN)
22 typedef struct tagRECT RECT; 22 typedef struct tagRECT RECT;
23 #elif defined(TOOLKIT_GTK) 23 #elif defined(TOOLKIT_GTK)
24 typedef struct _GdkRectangle GdkRectangle; 24 typedef struct _GdkRectangle GdkRectangle;
25 #elif defined(OS_IOS)
26 #include <CoreGraphics/CoreGraphics.h>
27 #elif defined(OS_MACOSX)
28 #include <ApplicationServices/ApplicationServices.h>
25 #endif 29 #endif
26 30
27 namespace gfx { 31 namespace gfx {
28 32
29 class Insets; 33 class Insets;
30 34
31 class UI_EXPORT Rect : public RectBase<Rect, Point, Size, Insets, int> { 35 class UI_EXPORT Rect : public RectBase<Rect, Point, Size, Insets, int> {
32 public: 36 public:
33 Rect(); 37 Rect();
34 Rect(int width, int height); 38 Rect(int width, int height);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 std::string ToString() const; 70 std::string ToString() const;
67 }; 71 };
68 72
69 #if !defined(COMPILER_MSVC) 73 #if !defined(COMPILER_MSVC)
70 extern template class RectBase<Rect, Point, Size, Insets, int>; 74 extern template class RectBase<Rect, Point, Size, Insets, int>;
71 #endif 75 #endif
72 76
73 } // namespace gfx 77 } // namespace gfx
74 78
75 #endif // UI_GFX_RECT_H_ 79 #endif // UI_GFX_RECT_H_
OLDNEW
« no previous file with comments | « ui/gfx/point.h ('k') | ui/gfx/rect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698