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

Side by Side Diff: views/controls/textfield/textfield.h

Issue 6314012: Make uneditable when readonly (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 18 matching lines...) Expand all
29 #include "views/controls/textfield/native_textfield_wrapper.h" 29 #include "views/controls/textfield/native_textfield_wrapper.h"
30 #endif 30 #endif
31 31
32 namespace views { 32 namespace views {
33 33
34 class KeyEvent; 34 class KeyEvent;
35 class NativeTextfieldWrapper; 35 class NativeTextfieldWrapper;
36 36
37 // TextRange specifies the range of text in the Textfield. This is 37 // TextRange specifies the range of text in the Textfield. This is
38 // used to specify selected text and will be used to change the 38 // used to specify selected text and will be used to change the
39 // attributes of characters in the textfield. The range preserves the 39 // attributes of characters in the textfield. When this is used for
40 // direction, and selecting from the end to the begining is considered 40 // selection, the end is caret position, and the start is where
41 // "reverse" order. 41 // selection started. The range preserves the direction, and
42 // selecting from the end to the begining is considered "reverse"
43 // order. (that is, start > end is reverse)
42 class TextRange { 44 class TextRange {
43 public: 45 public:
44 TextRange() : start_(0), end_(0) {} 46 TextRange() : start_(0), end_(0) {}
45 TextRange(size_t start, size_t end); 47 TextRange(size_t start, size_t end);
46 48
47 // Allow copy so that the omnibox can save the view state 49 // Allow copy so that the omnibox can save the view state
48 // for each tabs. 50 // for each tabs.
49 explicit TextRange(const TextRange& range) 51 explicit TextRange(const TextRange& range)
50 : start_(range.start_), end_(range.end_) {} 52 : start_(range.start_), end_(range.end_) {}
51 53
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 340
339 // Text to display when empty. 341 // Text to display when empty.
340 string16 text_to_display_when_empty_; 342 string16 text_to_display_when_empty_;
341 343
342 DISALLOW_COPY_AND_ASSIGN(Textfield); 344 DISALLOW_COPY_AND_ASSIGN(Textfield);
343 }; 345 };
344 346
345 } // namespace views 347 } // namespace views
346 348
347 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 349 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW
« no previous file with comments | « views/controls/textfield/native_textfield_views_unittest.cc ('k') | views/controls/textfield/textfield_views_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698