OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_COLUMNS_H_ |
| 6 #define CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_COLUMNS_H_ |
| 7 |
| 8 #include "ui/base/models/table_model.h" |
| 9 |
| 10 namespace task_management { |
| 11 |
| 12 // A collection of data to be used in the construction of a task manager table |
| 13 // column. |
| 14 struct TableColumnData { |
| 15 // The generated ID of the column. These can change from one build to another. |
| 16 // Their values are controlled by the generation from generated_resources.grd. |
| 17 int id; |
| 18 |
| 19 // The alignment of the text displayed in this column. |
| 20 ui::TableColumn::Alignment align; |
| 21 |
| 22 // |width| and |percent| used to define the size of the column. See |
| 23 // ui::TableColumn::width and ui::TableColumn::percent for details. |
| 24 int width; |
| 25 float percent; |
| 26 |
| 27 // min and max widths used for Mac's implementation and are ignored on Views. |
| 28 // If |max_width| is -1, a value of 1.5 * |min_width| will be used. |
| 29 int min_width; |
| 30 int max_width; |
| 31 |
| 32 // Is the column sortable. |
| 33 bool sortable; |
| 34 |
| 35 // Is the initial sort order ascending? |
| 36 bool initial_sort_is_ascending; |
| 37 |
| 38 // The default visibility of this column at startup of the table if no |
| 39 // visibility is stored for it in the prefs. |
| 40 bool default_visibility; |
| 41 }; |
| 42 |
| 43 // The task manager table columns and their properties. |
| 44 extern const TableColumnData kColumns[]; |
| 45 extern const size_t kColumnsSize; |
| 46 |
| 47 // Session Restore Keys. |
| 48 extern const char kSortColumnIdKey[]; |
| 49 extern const char kSortIsAscendingKey[]; |
| 50 |
| 51 // Returns the |column_id| as a string value to be used as keys in the user |
| 52 // preferences. |
| 53 std::string GetColumnIdAsString(int column_id); |
| 54 |
| 55 } // namespace task_management |
| 56 |
| 57 #endif // CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_COLUMNS_H_ |
OLD | NEW |