OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_SYNC_SWITCH_ITEM_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_SYNC_SWITCH_ITEM_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 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" |
| 12 |
| 13 @interface SyncSwitchItem : CollectionViewItem |
| 14 |
| 15 // The title text to display. |
| 16 @property(nonatomic, copy) NSString* text; |
| 17 |
| 18 // The detail text to display. |
| 19 @property(nonatomic, copy) NSString* detailText; |
| 20 |
| 21 // The current state of the switch. |
| 22 @property(nonatomic, assign, getter=isOn) BOOL on; |
| 23 |
| 24 // Whether or not the switch is enabled. Disabled switches are automatically |
| 25 // drawn as in the "off" state, with dimmed text. |
| 26 @property(nonatomic, assign, getter=isEnabled) BOOL enabled; |
| 27 |
| 28 // SyncSetupService::SyncableDatatype value for the item. |
| 29 @property(nonatomic, assign) NSInteger dataType; |
| 30 |
| 31 @end |
| 32 |
| 33 // Cell representation for AccountSignInItem. |
| 34 @interface SyncSwitchCell : MDCCollectionViewCell |
| 35 |
| 36 // Cell title. |
| 37 @property(nonatomic, readonly, strong) UILabel* textLabel; |
| 38 |
| 39 // Cell subtitle. |
| 40 @property(nonatomic, readonly, strong) UILabel* detailTextLabel; |
| 41 |
| 42 // The switch view. |
| 43 @property(nonatomic, readonly, strong) UISwitch* switchView; |
| 44 |
| 45 // Returns the default text color used for the given |state|. |
| 46 + (UIColor*)defaultTextColorForState:(UIControlState)state; |
| 47 |
| 48 @end |
| 49 |
| 50 #endif // IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_SYNC_SWITCH_ITEM_H_ |
OLD | NEW |