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

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

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 7 years, 3 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/gfx/range/OWNERS ('k') | ui/gfx/range/range.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 #ifndef UI_BASE_RANGE_RANGE_H_ 5 #ifndef UI_GFX_RANGE_RANGE_H_
6 #define UI_BASE_RANGE_RANGE_H_ 6 #define UI_GFX_RANGE_RANGE_H_
7 7
8 #include <ostream> 8 #include <ostream>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "ui/base/ui_export.h" 12 #include "ui/gfx/gfx_export.h"
13 13
14 #if defined(OS_MACOSX) 14 #if defined(OS_MACOSX)
15 #if __OBJC__ 15 #if __OBJC__
16 #import <Foundation/Foundation.h> 16 #import <Foundation/Foundation.h>
17 #else 17 #else
18 typedef struct _NSRange NSRange; 18 typedef struct _NSRange NSRange;
19 #endif 19 #endif
20 #endif // defined(OS_MACOSX) 20 #endif // defined(OS_MACOSX)
21 21
22 #if defined(OS_WIN) 22 #if defined(OS_WIN)
23 #include <windows.h> 23 #include <windows.h>
24 #include <richedit.h> 24 #include <richedit.h>
25 #endif 25 #endif
26 26
27 namespace ui { 27 namespace gfx {
28 28
29 // A Range contains two integer values that represent a numeric range, like the 29 // A Range contains two integer values that represent a numeric range, like the
30 // range of characters in a text selection. A range is made of a start and end 30 // range of characters in a text selection. A range is made of a start and end
31 // position; when they are the same, the Range is akin to a caret. Note that 31 // position; when they are the same, the Range is akin to a caret. Note that
32 // |start_| can be greater than |end_| to respect the directionality of the 32 // |start_| can be greater than |end_| to respect the directionality of the
33 // range. 33 // range.
34 class UI_EXPORT Range { 34 class UI_EXPORT Range {
35 public: 35 public:
36 // Creates an empty range {0,0}. 36 // Creates an empty range {0,0}.
37 Range(); 37 Range();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 std::string ToString() const; 106 std::string ToString() const;
107 107
108 private: 108 private:
109 size_t start_; 109 size_t start_;
110 size_t end_; 110 size_t end_;
111 }; 111 };
112 112
113 UI_EXPORT std::ostream& operator<<(std::ostream& os, const Range& range); 113 UI_EXPORT std::ostream& operator<<(std::ostream& os, const Range& range);
114 114
115 } // namespace ui 115 } // namespace gfx
116 116
117 #endif // UI_BASE_RANGE_RANGE_H_ 117 #endif // UI_GFX_RANGE_RANGE_H_
OLDNEW
« no previous file with comments | « ui/gfx/range/OWNERS ('k') | ui/gfx/range/range.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698