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_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
6 #define UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ | 6 #define UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 int row_height() const { return row_height_; } | 165 int row_height() const { return row_height_; } |
166 | 166 |
167 // View overrides: | 167 // View overrides: |
168 virtual void Layout() OVERRIDE; | 168 virtual void Layout() OVERRIDE; |
169 virtual gfx::Size GetPreferredSize() OVERRIDE; | 169 virtual gfx::Size GetPreferredSize() OVERRIDE; |
170 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 170 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
171 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 171 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
172 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 172 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
173 virtual bool GetTooltipText(const gfx::Point& p, | 173 virtual bool GetTooltipText(const gfx::Point& p, |
174 string16* tooltip) const OVERRIDE; | 174 base::string16* tooltip) const OVERRIDE; |
175 virtual bool GetTooltipTextOrigin(const gfx::Point& p, | 175 virtual bool GetTooltipTextOrigin(const gfx::Point& p, |
176 gfx::Point* loc) const OVERRIDE; | 176 gfx::Point* loc) const OVERRIDE; |
177 | 177 |
178 // ui::TableModelObserver overrides: | 178 // ui::TableModelObserver overrides: |
179 virtual void OnModelChanged() OVERRIDE; | 179 virtual void OnModelChanged() OVERRIDE; |
180 virtual void OnItemsChanged(int start, int length) OVERRIDE; | 180 virtual void OnItemsChanged(int start, int length) OVERRIDE; |
181 virtual void OnItemsAdded(int start, int length) OVERRIDE; | 181 virtual void OnItemsAdded(int start, int length) OVERRIDE; |
182 virtual void OnItemsRemoved(int start, int length) OVERRIDE; | 182 virtual void OnItemsRemoved(int start, int length) OVERRIDE; |
183 | 183 |
184 protected: | 184 protected: |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 // Returns the range of the specified model index. If a TableGrouper has not | 285 // Returns the range of the specified model index. If a TableGrouper has not |
286 // been set this returns a group with a start of |model_index| and length of | 286 // been set this returns a group with a start of |model_index| and length of |
287 // 1. | 287 // 1. |
288 GroupRange GetGroupRange(int model_index) const; | 288 GroupRange GetGroupRange(int model_index) const; |
289 | 289 |
290 // Used by both GetTooltipText methods. Returns true if there is a tooltip and | 290 // Used by both GetTooltipText methods. Returns true if there is a tooltip and |
291 // sets |tooltip| and/or |tooltip_origin| as appropriate, each of which may be | 291 // sets |tooltip| and/or |tooltip_origin| as appropriate, each of which may be |
292 // NULL. | 292 // NULL. |
293 bool GetTooltipImpl(const gfx::Point& location, | 293 bool GetTooltipImpl(const gfx::Point& location, |
294 string16* tooltip, | 294 base::string16* tooltip, |
295 gfx::Point* tooltip_origin) const; | 295 gfx::Point* tooltip_origin) const; |
296 | 296 |
297 ui::TableModel* model_; | 297 ui::TableModel* model_; |
298 | 298 |
299 std::vector<ui::TableColumn> columns_; | 299 std::vector<ui::TableColumn> columns_; |
300 | 300 |
301 // The set of visible columns. The values of these point to |columns_|. This | 301 // The set of visible columns. The values of these point to |columns_|. This |
302 // may contain a subset of |columns_|. | 302 // may contain a subset of |columns_|. |
303 std::vector<VisibleColumn> visible_columns_; | 303 std::vector<VisibleColumn> visible_columns_; |
304 | 304 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 340 |
341 // True if in SetVisibleColumnWidth(). | 341 // True if in SetVisibleColumnWidth(). |
342 bool in_set_visible_column_width_; | 342 bool in_set_visible_column_width_; |
343 | 343 |
344 DISALLOW_COPY_AND_ASSIGN(TableView); | 344 DISALLOW_COPY_AND_ASSIGN(TableView); |
345 }; | 345 }; |
346 | 346 |
347 } // namespace views | 347 } // namespace views |
348 | 348 |
349 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ | 349 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
OLD | NEW |