OLD | NEW |
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_EXAMPLES_TEXTFIELD_EXAMPLE_H_ | 5 #ifndef UI_VIEWS_EXAMPLES_TEXTFIELD_EXAMPLE_H_ |
6 #define UI_VIEWS_EXAMPLES_TEXTFIELD_EXAMPLE_H_ | 6 #define UI_VIEWS_EXAMPLES_TEXTFIELD_EXAMPLE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 virtual ~TextfieldExample(); | 26 virtual ~TextfieldExample(); |
27 | 27 |
28 // ExampleBase: | 28 // ExampleBase: |
29 virtual void CreateExampleView(View* container) OVERRIDE; | 29 virtual void CreateExampleView(View* container) OVERRIDE; |
30 | 30 |
31 private: | 31 private: |
32 // TextfieldController: | 32 // TextfieldController: |
33 virtual void ContentsChanged(Textfield* sender, | 33 virtual void ContentsChanged(Textfield* sender, |
34 const string16& new_contents) OVERRIDE; | 34 const string16& new_contents) OVERRIDE; |
35 virtual bool HandleKeyEvent(Textfield* sender, | 35 virtual bool HandleKeyEvent(Textfield* sender, |
36 const KeyEvent& key_event) OVERRIDE; | 36 const ui::KeyEvent& key_event) OVERRIDE; |
37 | 37 |
38 // ButtonListener: | 38 // ButtonListener: |
39 virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE; | 39 virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE; |
40 | 40 |
41 // Textfields for name and password. | 41 // Textfields for name and password. |
42 Textfield* name_; | 42 Textfield* name_; |
43 Textfield* password_; | 43 Textfield* password_; |
44 | 44 |
45 // Various buttons to control textfield. | 45 // Various buttons to control textfield. |
46 TextButton* show_password_; | 46 TextButton* show_password_; |
47 TextButton* clear_all_; | 47 TextButton* clear_all_; |
48 TextButton* append_; | 48 TextButton* append_; |
49 TextButton* set_; | 49 TextButton* set_; |
50 TextButton* set_style_; | 50 TextButton* set_style_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(TextfieldExample); | 52 DISALLOW_COPY_AND_ASSIGN(TextfieldExample); |
53 }; | 53 }; |
54 | 54 |
55 } // namespace examples | 55 } // namespace examples |
56 } // namespace views | 56 } // namespace views |
57 | 57 |
58 #endif // UI_VIEWS_EXAMPLES_TEXTFIELD_EXAMPLE_H_ | 58 #endif // UI_VIEWS_EXAMPLES_TEXTFIELD_EXAMPLE_H_ |
OLD | NEW |