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

Unified Diff: views/controls/table/native_table_gtk.h

Issue 8655001: views: Move table and tree directories to ui/views/controls/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: exclude native_widget_win_unittest too 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/table/group_table_view.cc ('k') | views/controls/table/native_table_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/table/native_table_gtk.h
diff --git a/views/controls/table/native_table_gtk.h b/views/controls/table/native_table_gtk.h
deleted file mode 100644
index 49c5a763553a69b216241068a4d2ea4664a1c6f7..0000000000000000000000000000000000000000
--- a/views/controls/table/native_table_gtk.h
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2011 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 VIEWS_CONTROLS_TABLE_NATIVE_TABLE_GTK_H_
-#define VIEWS_CONTROLS_TABLE_NATIVE_TABLE_GTK_H_
-#pragma once
-
-#include "ui/base/gtk/gtk_signal.h"
-#include "ui/base/models/table_model.h"
-#include "views/controls/native_control_gtk.h"
-#include "views/controls/table/native_table_wrapper.h"
-
-namespace views {
-
-class TableView2;
-
-// A View that hosts a native GTK table.
-// TODO: Note that the implementation is still incomplete. What remains to be
-// done:
-// - support resizable columns
-// - support autosize columns
-// - implement focus row methods.
-class NativeTableGtk : public NativeControlGtk, public NativeTableWrapper {
- public:
- explicit NativeTableGtk(TableView2* table);
- virtual ~NativeTableGtk();
-
- // NativeTableWrapper implementation:
- virtual int GetRowCount() const;
- virtual View* GetView();
- virtual void SetFocus();
- virtual gfx::NativeView GetTestingHandle() const;
- virtual void InsertColumn(const ui::TableColumn& column, int index);
- virtual void RemoveColumn(int index);
- virtual int GetColumnWidth(int column_index) const;
- virtual void SetColumnWidth(int column_index, int width);
- virtual int GetSelectedRowCount() const;
- virtual int GetFirstSelectedRow() const;
- virtual int GetFirstFocusedRow() const;
- virtual void ClearSelection();
- virtual void ClearRowFocus();
- virtual void SetSelectedState(int model_row, bool state);
- virtual void SetFocusState(int model_row, bool state);
- virtual bool IsRowSelected(int model_row) const;
- virtual bool IsRowFocused(int model_row) const;
- virtual void OnRowsChanged(int start, int length);
- virtual void OnRowsAdded(int start, int length);
- virtual void OnRowsRemoved(int start, int length);
- virtual gfx::Rect GetBounds() const;
-
- protected:
- // NativeControlGtk implementation:
- virtual void CreateNativeControl();
-
- private:
- void InsertTextColumn(const ui::TableColumn& column, int index);
- void InsertIconAndTextColumn(const ui::TableColumn& column, int index);
-
- // Sets the content of the row pointed to by |iter| in the tree_view_, using
- // the data in the model at row |index|.
- void SetRowData(int index, GtkTreeIter* iter);
-
- // Handles the "cursor-changed" event.
- CHROMEGTK_CALLBACK_0(NativeTableGtk, void, OnCursorChanged);
-
- // Returns the icon that should be displayed for the row at |row|.
- GdkPixbuf* GetModelIcon(int row);
-
- // The Table we are bound to.
- TableView2* table_;
-
- // The GtkTree model.
- GtkListStore* gtk_model_;
-
- // The actual tree view.
- GtkTreeView* tree_view_;
-
- // The selection for tree_view_.
- GtkTreeSelection* tree_selection_;
-
- // Size (width and height) of images.
- static const int kImageSize;
-
- DISALLOW_COPY_AND_ASSIGN(NativeTableGtk);
-};
-
-} // namespace views
-
-#endif // VIEWS_CONTROLS_TABLE_NATIVE_TABLE_GTK_H_
« no previous file with comments | « views/controls/table/group_table_view.cc ('k') | views/controls/table/native_table_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698