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_FIND_BAR_FIND_BAR_VIEW_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_VIEW_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 // The a11y ID of the text input field in the find-in-page bar. |
| 11 extern NSString* const kFindInPageInputFieldId; |
| 12 |
| 13 // The a11y ID of the "next" button in the find-in-page bar. |
| 14 extern NSString* const kFindInPageNextButtonId; |
| 15 |
| 16 // The a11y ID of the "previous" button in the find-in-page bar. |
| 17 extern NSString* const kFindInPagePreviousButtonId; |
| 18 |
| 19 // The a11y ID of the "close" button in the find-in-page bar. |
| 20 extern NSString* const kFindInPageCloseButtonId; |
| 21 |
| 22 // Find bar view. |
| 23 // It shows a textfield that hosts the search term, a label with results count |
| 24 // in format of "1 of 13", and next/previous/close buttons. |
| 25 @interface FindBarView : UIView |
| 26 |
| 27 // Designated initializer. |
| 28 // |darkAppearance| makes the background to dark color and changes font colors |
| 29 // to lighter colors. |
| 30 - (instancetype)initWithDarkAppearance:(BOOL)darkAppearance |
| 31 NS_DESIGNATED_INITIALIZER; |
| 32 |
| 33 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; |
| 34 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; |
| 35 |
| 36 // Updates |resultsLabel| with |text|. Updates |inputField| layout so that input |
| 37 // text does not overlap with results count. |text| can be nil. |
| 38 - (void)updateResultsLabelWithText:(NSString*)text; |
| 39 |
| 40 // The textfield with search term. |
| 41 @property(nonatomic, assign) UITextField* inputField; |
| 42 // Button to go to previous search result. |
| 43 @property(nonatomic, assign) UIButton* previousButton; |
| 44 // Button to go to next search result. |
| 45 @property(nonatomic, assign) UIButton* nextButton; |
| 46 // Button to dismiss Find in Page. |
| 47 @property(nonatomic, assign) UIButton* closeButton; |
| 48 |
| 49 @end |
| 50 |
| 51 #endif // IOS_CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_VIEW_H_ |
OLD | NEW |