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_TABLE_EXAMPLE_H_ | 5 #ifndef UI_VIEWS_EXAMPLES_TABLE_EXAMPLE_H_ |
6 #define UI_VIEWS_EXAMPLES_TABLE_EXAMPLE_H_ | 6 #define UI_VIEWS_EXAMPLES_TABLE_EXAMPLE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 class VIEWS_EXAMPLES_EXPORT TableExample : public ExampleBase, | 29 class VIEWS_EXAMPLES_EXPORT TableExample : public ExampleBase, |
30 public ui::TableModel, | 30 public ui::TableModel, |
31 public TableGrouper, | 31 public TableGrouper, |
32 public TableViewObserver, | 32 public TableViewObserver, |
33 public ButtonListener { | 33 public ButtonListener { |
34 public: | 34 public: |
35 TableExample(); | 35 TableExample(); |
36 virtual ~TableExample(); | 36 virtual ~TableExample(); |
37 | 37 |
38 // ExampleBase: | 38 // ExampleBase: |
39 virtual void CreateExampleView(View* container) OVERRIDE; | 39 virtual void CreateExampleView(View* container) override; |
40 | 40 |
41 // ui::TableModel: | 41 // ui::TableModel: |
42 virtual int RowCount() OVERRIDE; | 42 virtual int RowCount() override; |
43 virtual base::string16 GetText(int row, int column_id) OVERRIDE; | 43 virtual base::string16 GetText(int row, int column_id) override; |
44 virtual gfx::ImageSkia GetIcon(int row) OVERRIDE; | 44 virtual gfx::ImageSkia GetIcon(int row) override; |
45 virtual void SetObserver(ui::TableModelObserver* observer) OVERRIDE; | 45 virtual void SetObserver(ui::TableModelObserver* observer) override; |
46 | 46 |
47 // TableGrouper: | 47 // TableGrouper: |
48 virtual void GetGroupRange(int model_index, GroupRange* range) OVERRIDE; | 48 virtual void GetGroupRange(int model_index, GroupRange* range) override; |
49 | 49 |
50 // TableViewObserver: | 50 // TableViewObserver: |
51 virtual void OnSelectionChanged() OVERRIDE; | 51 virtual void OnSelectionChanged() override; |
52 virtual void OnDoubleClick() OVERRIDE; | 52 virtual void OnDoubleClick() override; |
53 virtual void OnMiddleClick() OVERRIDE; | 53 virtual void OnMiddleClick() override; |
54 virtual void OnKeyDown(ui::KeyboardCode virtual_keycode) OVERRIDE; | 54 virtual void OnKeyDown(ui::KeyboardCode virtual_keycode) override; |
55 | 55 |
56 // ButtonListener: | 56 // ButtonListener: |
57 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; | 57 virtual void ButtonPressed(Button* sender, const ui::Event& event) override; |
58 | 58 |
59 private: | 59 private: |
60 // The table to be tested. | 60 // The table to be tested. |
61 TableView* table_; | 61 TableView* table_; |
62 | 62 |
63 Checkbox* column1_visible_checkbox_; | 63 Checkbox* column1_visible_checkbox_; |
64 Checkbox* column2_visible_checkbox_; | 64 Checkbox* column2_visible_checkbox_; |
65 Checkbox* column3_visible_checkbox_; | 65 Checkbox* column3_visible_checkbox_; |
66 Checkbox* column4_visible_checkbox_; | 66 Checkbox* column4_visible_checkbox_; |
67 | 67 |
68 SkBitmap icon1_; | 68 SkBitmap icon1_; |
69 SkBitmap icon2_; | 69 SkBitmap icon2_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(TableExample); | 71 DISALLOW_COPY_AND_ASSIGN(TableExample); |
72 }; | 72 }; |
73 | 73 |
74 } // namespace examples | 74 } // namespace examples |
75 } // namespace views | 75 } // namespace views |
76 | 76 |
77 #endif // UI_VIEWS_EXAMPLES_TABLE_EXAMPLE_H_ | 77 #endif // UI_VIEWS_EXAMPLES_TABLE_EXAMPLE_H_ |
OLD | NEW |