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

Side by Side Diff: views/controls/table/table_view.h

Issue 2812026: Auto-size the views version of the options dialog. (Closed)
Patch Set: Fix autosizing issue with gtk pref pages in chromeos options dialog. Created 10 years, 5 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 unified diff | Download patch
« no previous file with comments | « views/controls/tabbed_pane/tabbed_pane_unittest.cc ('k') | views/controls/table/table_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 VIEWS_CONTROLS_TABLE_TABLE_VIEW_H_ 5 #ifndef VIEWS_CONTROLS_TABLE_TABLE_VIEW_H_
6 #define VIEWS_CONTROLS_TABLE_TABLE_VIEW_H_ 6 #define VIEWS_CONTROLS_TABLE_TABLE_VIEW_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 400
401 // Updates content_offset_ from the position of the header. 401 // Updates content_offset_ from the position of the header.
402 void UpdateContentOffset(); 402 void UpdateContentOffset();
403 403
404 // Returns the bounds of the alt text. 404 // Returns the bounds of the alt text.
405 gfx::Rect GetAltTextBounds(); 405 gfx::Rect GetAltTextBounds();
406 406
407 // Returns the font used for alt text. 407 // Returns the font used for alt text.
408 gfx::Font GetAltTextFont(); 408 gfx::Font GetAltTextFont();
409 409
410 // Overriden in order to update the column sizes, which can only be sized
411 // accurately when the native control is available.
412 virtual void VisibilityChanged(View* starting_from, bool is_visible);
413
410 TableModel* model_; 414 TableModel* model_;
411 TableTypes table_type_; 415 TableTypes table_type_;
412 TableViewObserver* table_view_observer_; 416 TableViewObserver* table_view_observer_;
413 417
414 // An ordered list of id's into all_columns_ representing current visible 418 // An ordered list of id's into all_columns_ representing current visible
415 // columns. 419 // columns.
416 std::vector<int> visible_columns_; 420 std::vector<int> visible_columns_;
417 421
418 // Mapping of an int id to a TableColumn representing all possible columns. 422 // Mapping of an int id to a TableColumn representing all possible columns.
419 std::map<int, TableColumn> all_columns_; 423 std::map<int, TableColumn> all_columns_;
420 424
421 // Cached value of columns_.size() 425 // Cached value of columns_.size()
422 int column_count_; 426 int column_count_;
423 427
424 // Selection mode. 428 // Selection mode.
425 bool single_selection_; 429 bool single_selection_;
426 430
427 // If true, any events that would normally be propagated to the observer 431 // If true, any events that would normally be propagated to the observer
428 // are ignored. For example, if this is true and the selection changes in 432 // are ignored. For example, if this is true and the selection changes in
429 // the listview, the observer is not notified. 433 // the listview, the observer is not notified.
430 bool ignore_listview_change_; 434 bool ignore_listview_change_;
431 435
432 // Reflects the value passed to SetCustomColorsEnabled. 436 // Reflects the value passed to SetCustomColorsEnabled.
433 bool custom_colors_enabled_; 437 bool custom_colors_enabled_;
434 438
435 // Whether or not the columns have been sized in the ListView. This is
436 // set to true the first time Layout() is invoked and we have a valid size.
437 bool sized_columns_;
438
439 // Whether or not columns should automatically be resized to fill the 439 // Whether or not columns should automatically be resized to fill the
440 // the available width when the list view is resized. 440 // the available width when the list view is resized.
441 bool autosize_columns_; 441 bool autosize_columns_;
442 442
443 // Whether or not the user can resize columns. 443 // Whether or not the user can resize columns.
444 bool resizable_columns_; 444 bool resizable_columns_;
445 445
446 // NOTE: While this has the name View in it, it's not a view. Rather it's 446 // NOTE: While this has the name View in it, it's not a view. Rather it's
447 // a wrapper around the List-View window. 447 // a wrapper around the List-View window.
448 HWND list_view_; 448 HWND list_view_;
(...skipping 25 matching lines...) Expand all
474 474
475 std::wstring alt_text_; 475 std::wstring alt_text_;
476 476
477 DISALLOW_COPY_AND_ASSIGN(TableView); 477 DISALLOW_COPY_AND_ASSIGN(TableView);
478 }; 478 };
479 #endif // defined(OS_WIN) 479 #endif // defined(OS_WIN)
480 480
481 } // namespace views 481 } // namespace views
482 482
483 #endif // VIEWS_CONTROLS_TABLE_TABLE_VIEW_H_ 483 #endif // VIEWS_CONTROLS_TABLE_TABLE_VIEW_H_
OLDNEW
« no previous file with comments | « views/controls/tabbed_pane/tabbed_pane_unittest.cc ('k') | views/controls/table/table_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698