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

Side by Side Diff: views/examples/table_example.h

Issue 8555013: views: Move examples/ directory to ui/views/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « views/examples/table2_example.cc ('k') | views/examples/table_example.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef VIEWS_EXAMPLES_TABLE_EXAMPLE_H_
6 #define VIEWS_EXAMPLES_TABLE_EXAMPLE_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "ui/base/models/table_model.h"
15 #include "views/controls/button/button.h"
16 #include "views/controls/table/table_view.h"
17 #include "views/controls/table/table_view_observer.h"
18 #include "views/examples/example_base.h"
19
20 namespace views {
21 class Checkbox;
22 class Event;
23 class TableView;
24 }
25
26 namespace examples {
27
28 class TableExample : public ExampleBase,
29 public ui::TableModel,
30 public views::TableViewObserver,
31 public views::ButtonListener {
32 public:
33 explicit TableExample(ExamplesMain* main);
34 virtual ~TableExample();
35
36 // ExampleBase:
37 virtual void CreateExampleView(views::View* container) OVERRIDE;
38
39 // ui::TableModel:
40 virtual int RowCount() OVERRIDE;
41 virtual string16 GetText(int row, int column_id) OVERRIDE;
42 virtual SkBitmap GetIcon(int row) OVERRIDE;
43 virtual void SetObserver(ui::TableModelObserver* observer) OVERRIDE;
44
45 // views::TableViewObserver:
46 virtual void OnSelectionChanged() OVERRIDE;
47 virtual void OnDoubleClick() OVERRIDE;
48 virtual void OnMiddleClick() OVERRIDE;
49 virtual void OnKeyDown(ui::KeyboardCode virtual_keycode) OVERRIDE;
50 virtual void OnTableViewDelete(views::TableView* table_view) OVERRIDE;
51 virtual void OnTableView2Delete(views::TableView2* table_view) OVERRIDE;
52
53 // views::ButtonListener:
54 virtual void ButtonPressed(views::Button* sender,
55 const views::Event& event) OVERRIDE;
56
57 private:
58 // The table to be tested.
59 views::TableView* table_;
60
61 views::Checkbox* column1_visible_checkbox_;
62 views::Checkbox* column2_visible_checkbox_;
63 views::Checkbox* column3_visible_checkbox_;
64 views::Checkbox* column4_visible_checkbox_;
65
66 SkBitmap icon1_;
67 SkBitmap icon2_;
68
69 DISALLOW_COPY_AND_ASSIGN(TableExample);
70 };
71
72 } // namespace examples
73
74 #endif // VIEWS_EXAMPLES_TABLE_EXAMPLE_H_
OLDNEW
« no previous file with comments | « views/examples/table2_example.cc ('k') | views/examples/table_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698