Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: ios/chrome/browser/ui/util/manual_text_framer.h

Issue 2580333003: Upstream Chrome on iOS source code [10/11]. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/ui/util/manual_text_framer.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 IOS_CHROME_BROWSER_UI_UTIL_MANUAL_TEXT_FRAMER_H_
6 #define IOS_CHROME_BROWSER_UI_UTIL_MANUAL_TEXT_FRAMER_H_
7
8 #import <CoreText/CoreText.h>
9 #import <Foundation/Foundation.h>
10
11 @protocol TextFrame;
12
13 // Object encapsulating the manual framing of an attributed string within a
14 // bounding rect.
15 // Known limitations:
16 // - Justified-aligned text is not supported.
17 // - Hyphenation is never attempted, regardless of NSParagraphStyle's
18 // |hyphenationFactor|.
19 @interface ManualTextFramer : NSObject
20
21 // Creates an instance that frames |string| within |bounds|.
22 - (instancetype)initWithString:(NSAttributedString*)string
23 inBounds:(CGRect)bounds NS_DESIGNATED_INITIALIZER;
24 - (instancetype)init NS_UNAVAILABLE;
25
26 // Manually Frames the paragraph within the bounds provided upon initialization.
27 // Calling this method populates |textFrame|.
28 - (void)frameText;
29
30 // The TextFrame created by |-frameText|. Will be nil before |-frameText| is
31 // called.
32 @property(nonatomic, readonly) id<TextFrame> textFrame;
33
34 @end
35
36 #endif // IOS_CHROME_BROWSER_UI_UTIL_MANUAL_TEXT_FRAMER_H_
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/util/manual_text_framer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698