| 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 #include "ui/views/examples/table_example.h" | 5 #include "ui/views/examples/table_example.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "third_party/skia/include/core/SkCanvas.h" | 11 #include "third_party/skia/include/core/SkCanvas.h" |
| 12 #include "ui/views/controls/button/checkbox.h" | 12 #include "ui/views/controls/button/checkbox.h" |
| 13 #include "ui/views/layout/grid_layout.h" | 13 #include "ui/views/layout/grid_layout.h" |
| 14 | 14 |
| 15 namespace views { | 15 namespace views { |
| 16 namespace examples { | 16 namespace examples { |
| 17 | 17 |
| 18 TableExample::TableExample() : ExampleBase("Table") { | 18 TableExample::TableExample() : ExampleBase("Table") , table_(NULL) { |
| 19 } | 19 } |
| 20 | 20 |
| 21 TableExample::~TableExample() { | 21 TableExample::~TableExample() { |
| 22 // Delete the view before the model. | 22 // Delete the view before the model. |
| 23 delete table_; | 23 delete table_; |
| 24 table_ = NULL; | 24 table_ = NULL; |
| 25 } | 25 } |
| 26 | 26 |
| 27 void TableExample::CreateExampleView(View* container) { | 27 void TableExample::CreateExampleView(View* container) { |
| 28 #if defined(OS_WIN) && !defined(USE_AURA) | 28 #if defined(OS_WIN) && !defined(USE_AURA) |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } else if (sender == column4_visible_checkbox_) { | 151 } else if (sender == column4_visible_checkbox_) { |
| 152 index = 3; | 152 index = 3; |
| 153 show = column4_visible_checkbox_->checked(); | 153 show = column4_visible_checkbox_->checked(); |
| 154 } | 154 } |
| 155 table_->SetColumnVisibility(index, show); | 155 table_->SetColumnVisibility(index, show); |
| 156 #endif | 156 #endif |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace examples | 159 } // namespace examples |
| 160 } // namespace views | 160 } // namespace views |
| OLD | NEW |