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

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

Issue 2024003002: Add GetTextDirection to ui::TextInputClient API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/views/controls/prefix_selector.cc ('k') | ui/views/controls/textfield/textfield.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_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // new text's range, or moves the cursor to the end if the cursor is 81 // new text's range, or moves the cursor to the end if the cursor is
82 // out of the new text's range. 82 // out of the new text's range.
83 void SetText(const base::string16& new_text); 83 void SetText(const base::string16& new_text);
84 84
85 // Appends the given string to the previously-existing text in the field. 85 // Appends the given string to the previously-existing text in the field.
86 void AppendText(const base::string16& new_text); 86 void AppendText(const base::string16& new_text);
87 87
88 // Inserts |new_text| at the cursor position, replacing any selected text. 88 // Inserts |new_text| at the cursor position, replacing any selected text.
89 void InsertOrReplaceText(const base::string16& new_text); 89 void InsertOrReplaceText(const base::string16& new_text);
90 90
91 // Returns the text direction.
92 base::i18n::TextDirection GetTextDirection() const;
93
94 // Returns the text that is currently selected. 91 // Returns the text that is currently selected.
95 base::string16 GetSelectedText() const; 92 base::string16 GetSelectedText() const;
96 93
97 // Select the entire text range. If |reversed| is true, the range will end at 94 // Select the entire text range. If |reversed| is true, the range will end at
98 // the logical beginning of the text; this generally shows the leading portion 95 // the logical beginning of the text; this generally shows the leading portion
99 // of text that overflows its display area. 96 // of text that overflows its display area.
100 void SelectAll(bool reversed); 97 void SelectAll(bool reversed);
101 98
102 // A convenience method to select the word closest to |point|. 99 // A convenience method to select the word closest to |point|.
103 void SelectWordAt(const gfx::Point& point); 100 void SelectWordAt(const gfx::Point& point);
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 void ExecuteCommand(int command_id, int event_flags) override; 278 void ExecuteCommand(int command_id, int event_flags) override;
282 279
283 // ui::TextInputClient overrides: 280 // ui::TextInputClient overrides:
284 void SetCompositionText(const ui::CompositionText& composition) override; 281 void SetCompositionText(const ui::CompositionText& composition) override;
285 void ConfirmCompositionText() override; 282 void ConfirmCompositionText() override;
286 void ClearCompositionText() override; 283 void ClearCompositionText() override;
287 void InsertText(const base::string16& text) override; 284 void InsertText(const base::string16& text) override;
288 void InsertChar(const ui::KeyEvent& event) override; 285 void InsertChar(const ui::KeyEvent& event) override;
289 ui::TextInputType GetTextInputType() const override; 286 ui::TextInputType GetTextInputType() const override;
290 ui::TextInputMode GetTextInputMode() const override; 287 ui::TextInputMode GetTextInputMode() const override;
288 base::i18n::TextDirection GetTextDirection() const override;
291 int GetTextInputFlags() const override; 289 int GetTextInputFlags() const override;
292 bool CanComposeInline() const override; 290 bool CanComposeInline() const override;
293 gfx::Rect GetCaretBounds() const override; 291 gfx::Rect GetCaretBounds() const override;
294 bool GetCompositionCharacterBounds(uint32_t index, 292 bool GetCompositionCharacterBounds(uint32_t index,
295 gfx::Rect* rect) const override; 293 gfx::Rect* rect) const override;
296 bool HasCompositionText() const override; 294 bool HasCompositionText() const override;
297 bool GetTextRange(gfx::Range* range) const override; 295 bool GetTextRange(gfx::Range* range) const override;
298 bool GetCompositionTextRange(gfx::Range* range) const override; 296 bool GetCompositionTextRange(gfx::Range* range) const override;
299 bool GetSelectionRange(gfx::Range* range) const override; 297 bool GetSelectionRange(gfx::Range* range) const override;
300 bool SetSelectionRange(const gfx::Range& range) override; 298 bool SetSelectionRange(const gfx::Range& range) override;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 482
485 // Used to bind callback functions to this object. 483 // Used to bind callback functions to this object.
486 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 484 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
487 485
488 DISALLOW_COPY_AND_ASSIGN(Textfield); 486 DISALLOW_COPY_AND_ASSIGN(Textfield);
489 }; 487 };
490 488
491 } // namespace views 489 } // namespace views
492 490
493 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 491 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW
« no previous file with comments | « ui/views/controls/prefix_selector.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698