OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_CELLS_COLLECTION_VIEW_DETAIL_ITEM_
H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_CELLS_COLLECTION_VIEW_DETAIL_ITEM_
H_ |
6 #define IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_CELLS_COLLECTION_VIEW_DETAIL_ITEM_
H_ | 6 #define IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_CELLS_COLLECTION_VIEW_DETAIL_ITEM_
H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" | 10 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" |
11 #import "ios/third_party/material_components_ios/src/components/CollectionCells/
src/MaterialCollectionCells.h" | 11 #import "ios/third_party/material_components_ios/src/components/CollectionCells/
src/MaterialCollectionCells.h" |
12 | 12 |
13 // CollectionViewDetailItem is the model class corresponding to | 13 // CollectionViewDetailItem is the model class corresponding to |
14 // CollectionViewDetailCell. | 14 // CollectionViewDetailCell. |
15 @interface CollectionViewDetailItem : CollectionViewItem | 15 @interface CollectionViewDetailItem : CollectionViewItem |
16 | 16 |
17 // The accessory type to display on the trailing edge of the cell. | |
18 @property(nonatomic) MDCCollectionViewCellAccessoryType accessoryType; | |
19 | |
20 // The main text string. | 17 // The main text string. |
21 @property(nonatomic, copy) NSString* text; | 18 @property(nonatomic, copy) NSString* text; |
22 | 19 |
23 // The detail text string. | 20 // The detail text string. |
24 @property(nonatomic, copy) NSString* detailText; | 21 @property(nonatomic, copy) NSString* detailText; |
25 | 22 |
26 @end | 23 @end |
27 | 24 |
28 // CollectionViewDetailCell implements an MDCCollectionViewCell subclass | 25 // CollectionViewDetailCell implements an MDCCollectionViewCell subclass |
29 // containing two text labels: a "main" label and a "detail" label. The two | 26 // containing two text labels: a "main" label and a "detail" label. The two |
(...skipping 18 matching lines...) Expand all Loading... |
48 // - If both labels want more width than their guaranteed minimums (75% and | 45 // - If both labels want more width than their guaranteed minimums (75% and |
49 // 25%), use the guaranteed minimum amount for each. | 46 // 25%), use the guaranteed minimum amount for each. |
50 // | 47 // |
51 // Exposed for testing. | 48 // Exposed for testing. |
52 @property(nonatomic, readonly) CGFloat textLabelTargetWidth; | 49 @property(nonatomic, readonly) CGFloat textLabelTargetWidth; |
53 @property(nonatomic, readonly) CGFloat detailTextLabelTargetWidth; | 50 @property(nonatomic, readonly) CGFloat detailTextLabelTargetWidth; |
54 | 51 |
55 @end | 52 @end |
56 | 53 |
57 #endif // IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_CELLS_COLLECTION_VIEW_DETAIL_IT
EM_H_ | 54 #endif // IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_CELLS_COLLECTION_VIEW_DETAIL_IT
EM_H_ |
OLD | NEW |