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

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

Issue 23498059: Remove last dependencies on ui/base from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last rebase Created 7 years, 2 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/scrollbar_size.h ('k') | ui/gfx/sequential_id_generator.h » ('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_GFX_SELECTION_MODEL_H_ 5 #ifndef UI_GFX_SELECTION_MODEL_H_
6 #define UI_GFX_SELECTION_MODEL_H_ 6 #define UI_GFX_SELECTION_MODEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ui/gfx/gfx_export.h" 10 #include "ui/gfx/gfx_export.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // different places: 49 // different places:
50 // Pointing to the right half of 'c' displays the cursor right of 'c' as 50 // Pointing to the right half of 'c' displays the cursor right of 'c' as
51 // "abc|FED". 51 // "abc|FED".
52 // Pointing to the right half of 'D' displays the cursor right of 'D' as 52 // Pointing to the right half of 'D' displays the cursor right of 'D' as
53 // "abcFED|". 53 // "abcFED|".
54 // So, besides the logical selection start point and end point, we need extra 54 // So, besides the logical selection start point and end point, we need extra
55 // information to specify to which character the visual cursor is bound. This 55 // information to specify to which character the visual cursor is bound. This
56 // is given by a "caret affinity" which is either CURSOR_BACKWARD (indicating 56 // is given by a "caret affinity" which is either CURSOR_BACKWARD (indicating
57 // the trailing half of the 'c' in this case) or CURSOR_FORWARD (indicating 57 // the trailing half of the 'c' in this case) or CURSOR_FORWARD (indicating
58 // the leading half of the 'D'). 58 // the leading half of the 'D').
59 class UI_EXPORT SelectionModel { 59 class GFX_EXPORT SelectionModel {
60 public: 60 public:
61 // Create a default SelectionModel to be overwritten later. 61 // Create a default SelectionModel to be overwritten later.
62 SelectionModel(); 62 SelectionModel();
63 // Create a SelectionModel representing a caret |position| without a 63 // Create a SelectionModel representing a caret |position| without a
64 // selection. The |affinity| is meaningful only when the caret is positioned 64 // selection. The |affinity| is meaningful only when the caret is positioned
65 // between bidi runs that are not visually contiguous: in that case, it 65 // between bidi runs that are not visually contiguous: in that case, it
66 // indicates the run to which the caret is attached for display purposes. 66 // indicates the run to which the caret is attached for display purposes.
67 SelectionModel(size_t position, LogicalCursorDirection affinity); 67 SelectionModel(size_t position, LogicalCursorDirection affinity);
68 // Create a SelectionModel representing a selection (which may be empty). 68 // Create a SelectionModel representing a selection (which may be empty).
69 // The caret position is the end of the range. 69 // The caret position is the end of the range.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // 3 abc|FED abcFED| 104 // 3 abc|FED abcFED|
105 // 4 abcFE|D abcFE|D 105 // 4 abcFE|D abcFE|D
106 // 5 abcF|ED abcF|ED 106 // 5 abcF|ED abcF|ED
107 // 6 abc|FED abcFED| 107 // 6 abc|FED abcFED|
108 LogicalCursorDirection caret_affinity_; 108 LogicalCursorDirection caret_affinity_;
109 }; 109 };
110 110
111 } // namespace gfx 111 } // namespace gfx
112 112
113 #endif // UI_GFX_SELECTION_MODEL_H_ 113 #endif // UI_GFX_SELECTION_MODEL_H_
OLDNEW
« no previous file with comments | « ui/gfx/scrollbar_size.h ('k') | ui/gfx/sequential_id_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698