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

Side by Side Diff: chrome/views/text_field.h

Issue 18728: Create a dialog box for the about:network view and kill the tab type.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // These classes define a text field widget that can be used in the views UI 5 // These classes define a text field widget that can be used in the views UI
6 // toolkit. 6 // toolkit.
7 7
8 #ifndef CHROME_VIEWS_TEXT_FIELD_H_ 8 #ifndef CHROME_VIEWS_TEXT_FIELD_H_
9 #define CHROME_VIEWS_TEXT_FIELD_H_ 9 #define CHROME_VIEWS_TEXT_FIELD_H_
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual void AboutToRequestFocusFromTabTraversal(bool reverse); 90 virtual void AboutToRequestFocusFromTabTraversal(bool reverse);
91 91
92 // Overridden from Chrome::View. 92 // Overridden from Chrome::View.
93 virtual bool ShouldLookupAccelerators(const KeyEvent& e); 93 virtual bool ShouldLookupAccelerators(const KeyEvent& e);
94 94
95 virtual HWND GetNativeComponent(); 95 virtual HWND GetNativeComponent();
96 96
97 // Returns the text currently displayed in the text field. 97 // Returns the text currently displayed in the text field.
98 std::wstring GetText() const; 98 std::wstring GetText() const;
99 99
100 // Set the text currently displayed in the text field. 100 // Sets the text currently displayed in the text field.
101 void SetText(const std::wstring& text); 101 void SetText(const std::wstring& text);
102 102
103 // Appends the given string to the previously-existing text in the field.
104 void AppendText(const std::wstring& text);
105
103 virtual void Focus(); 106 virtual void Focus();
104 107
105 // Causes the edit field to be fully selected. 108 // Causes the edit field to be fully selected.
106 void SelectAll(); 109 void SelectAll();
107 110
108 // Clears the selection within the edit field and sets the caret to the end. 111 // Clears the selection within the edit field and sets the caret to the end.
109 void ClearSelection() const; 112 void ClearSelection() const;
110 113
111 StyleFlags GetStyle() const { return style_; } 114 StyleFlags GetStyle() const { return style_; }
112 115
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 protected: 195 protected:
193 // Calculates the insets for the text field. 196 // Calculates the insets for the text field.
194 void CalculateInsets(gfx::Insets* insets); 197 void CalculateInsets(gfx::Insets* insets);
195 198
196 DISALLOW_COPY_AND_ASSIGN(TextField); 199 DISALLOW_COPY_AND_ASSIGN(TextField);
197 }; 200 };
198 201
199 } // namespace views 202 } // namespace views
200 203
201 #endif // CHROME_VIEWS_TEXT_FIELD_H_ 204 #endif // CHROME_VIEWS_TEXT_FIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698