| OLD | NEW |
| 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 ChromeViews | 5 // These classes define a text field widget that can be used in the ChromeViews |
| 6 // UI toolkit. | 6 // UI 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 use_default_background_color_(true), | 65 use_default_background_color_(true), |
| 66 num_lines_(1) { | 66 num_lines_(1) { |
| 67 SetFocusable(true); | 67 SetFocusable(true); |
| 68 } | 68 } |
| 69 virtual ~TextField(); | 69 virtual ~TextField(); |
| 70 | 70 |
| 71 void ViewHierarchyChanged(bool is_add, View* parent, View* child); | 71 void ViewHierarchyChanged(bool is_add, View* parent, View* child); |
| 72 | 72 |
| 73 // Overridden for layout purposes | 73 // Overridden for layout purposes |
| 74 virtual void Layout(); | 74 virtual void Layout(); |
| 75 virtual void GetPreferredSize(CSize* sz); | 75 virtual gfx::Size GetPreferredSize(); |
| 76 virtual void DidChangeBounds(const CRect& previous, const CRect& current); | 76 virtual void DidChangeBounds(const CRect& previous, const CRect& current); |
| 77 | 77 |
| 78 // Controller accessors | 78 // Controller accessors |
| 79 void SetController(Controller* controller); | 79 void SetController(Controller* controller); |
| 80 Controller* GetController() const; | 80 Controller* GetController() const; |
| 81 | 81 |
| 82 void SetReadOnly(bool read_only); | 82 void SetReadOnly(bool read_only); |
| 83 bool IsReadOnly() const; | 83 bool IsReadOnly() const; |
| 84 | 84 |
| 85 // Whether the text field is multi-line or not, must be set when the text | 85 // Whether the text field is multi-line or not, must be set when the text |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // Calculates the insets for the text field. | 189 // Calculates the insets for the text field. |
| 190 void CalculateInsets(gfx::Insets* insets); | 190 void CalculateInsets(gfx::Insets* insets); |
| 191 | 191 |
| 192 DISALLOW_EVIL_CONSTRUCTORS(TextField); | 192 DISALLOW_EVIL_CONSTRUCTORS(TextField); |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 } // namespace ChromeViews | 195 } // namespace ChromeViews |
| 196 | 196 |
| 197 #endif // CHROME_VIEWS_TEXT_FIELD_H__ | 197 #endif // CHROME_VIEWS_TEXT_FIELD_H__ |
| 198 | 198 |
| OLD | NEW |