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

Unified Diff: ui/views/examples/tree_view_example.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/examples/throbber_example.cc ('k') | ui/views/examples/tree_view_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/tree_view_example.h
diff --git a/ui/views/examples/tree_view_example.h b/ui/views/examples/tree_view_example.h
deleted file mode 100644
index 4678b2a775fd57d78b2dc269df8ce754b0ca25f0..0000000000000000000000000000000000000000
--- a/ui/views/examples/tree_view_example.h
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_VIEWS_EXAMPLES_TREE_VIEW_EXAMPLE_H_
-#define UI_VIEWS_EXAMPLES_TREE_VIEW_EXAMPLE_H_
-
-#include "base/macros.h"
-#include "ui/base/models/simple_menu_model.h"
-#include "ui/base/models/tree_node_model.h"
-#include "ui/views/context_menu_controller.h"
-#include "ui/views/controls/button/button.h"
-#include "ui/views/controls/tree/tree_view_controller.h"
-#include "ui/views/examples/example_base.h"
-
-namespace views {
-
-class MenuRunner;
-class TreeView;
-
-namespace examples {
-
-class VIEWS_EXAMPLES_EXPORT TreeViewExample
- : public ExampleBase,
- public ButtonListener,
- public TreeViewController,
- public ContextMenuController,
- public ui::SimpleMenuModel::Delegate {
- public:
- TreeViewExample();
- virtual ~TreeViewExample();
-
- // ExampleBase:
- virtual void CreateExampleView(View* container) override;
-
- private:
- // IDs used by the context menu.
- enum MenuIDs {
- ID_EDIT,
- ID_REMOVE,
- ID_ADD
- };
-
- // Adds a new node.
- void AddNewNode();
-
- // Non-const version of IsCommandIdEnabled.
- bool IsCommandIdEnabled(int command_id);
-
- // ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
-
- // TreeViewController:
- virtual void OnTreeViewSelectionChanged(TreeView* tree_view) override;
- virtual bool CanEdit(TreeView* tree_view, ui::TreeModelNode* node) override;
-
- // ContextMenuController:
- virtual void ShowContextMenuForView(View* source,
- const gfx::Point& point,
- ui::MenuSourceType source_type) override;
-
- // SimpleMenuModel::Delegate:
- virtual bool IsCommandIdChecked(int command_id) const override;
- virtual bool IsCommandIdEnabled(int command_id) const override;
- virtual bool GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) override;
- virtual void ExecuteCommand(int command_id, int event_flags) override;
-
- // The tree view to be tested.
- TreeView* tree_view_;
-
- // Control buttons to modify the model.
- Button* add_;
- Button* remove_;
- Button* change_title_;
-
- typedef ui::TreeNodeWithValue<int> NodeType;
-
- ui::TreeNodeModel<NodeType> model_;
-
- scoped_ptr<MenuRunner> context_menu_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(TreeViewExample);
-};
-
-} // namespace examples
-} // namespace views
-
-#endif // UI_VIEWS_EXAMPLES_TREE_VIEW_EXAMPLE_H_
« no previous file with comments | « ui/views/examples/throbber_example.cc ('k') | ui/views/examples/tree_view_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698