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_BOOKMARKS_CELLS_BOOKMARK_TEXT_FIELD_ITEM_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_BOOKMARKS_CELLS_BOOKMARK_TEXT_FIELD_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 @class BookmarkTextFieldItem; |
| 14 @protocol TextFieldStyling; |
| 15 |
| 16 // Delegates the cell's text field's events. |
| 17 @protocol BookmarkTextFieldItemDelegate<UITextFieldDelegate> |
| 18 |
| 19 // Called when the |text| of the item was changed via the textfield. The item's |
| 20 // |text| is up-to-date when this is called. |
| 21 - (void)textDidChangeForItem:(BookmarkTextFieldItem*)item; |
| 22 |
| 23 @end |
| 24 |
| 25 @interface BookmarkTextFieldItem : CollectionViewItem |
| 26 |
| 27 // The text field content. |
| 28 @property(nonatomic, copy) NSString* text; |
| 29 |
| 30 // The text field placeholder. |
| 31 @property(nonatomic, copy) NSString* placeholder; |
| 32 |
| 33 // Receives the text field events. |
| 34 @property(nonatomic, weak) id<BookmarkTextFieldItemDelegate> delegate; |
| 35 |
| 36 @end |
| 37 |
| 38 @interface BookmarkTextFieldCell : MDCCollectionViewCell |
| 39 |
| 40 // Text field to display the title or the URL of the bookmark node. |
| 41 @property(nonatomic, readonly, strong) UITextField<TextFieldStyling>* textField; |
| 42 |
| 43 @end |
| 44 |
| 45 #endif // IOS_CHROME_BROWSER_UI_BOOKMARKS_CELLS_BOOKMARK_TEXT_FIELD_ITEM_H_ |
OLD | NEW |