Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 86 lines (71 sloc) 2.75 kB
99e3e37 @Cocoanetics WARNING: Massive Refactoring. New Class DTHTMLElement replaces dictio…
authored
1 //
2 // DTHTMLElement.h
3 // CoreTextExtensions
4 //
5 // Created by Oliver Drobnik on 4/14/11.
6 // Copyright 2011 Drobnik.com. All rights reserved.
7 //
8
9 @class DTCoreTextParagraphStyle;
10 @class DTCoreTextFontDescriptor;
11 @class DTTextAttachment;
8473641 @Cocoanetics Moved list style into it's own class DTCSSListStyle, supporting list-…
authored
12 @class DTCSSListStyle;
8004a34 @Cocoanetics Implemented simple text box support. block-level elements can have a …
authored
13 @class DTColor;
afd603b @Cocoanetics Mac Compatibility Mode: for Mac based UnitTest to compare generated o…
authored
14
5b049ef @Cocoanetics Workaround for float on images to insert a newline.
authored
15 typedef enum
16 {
377b6e0 @Cocoanetics corrected h styles
authored
17 DTHTMLElementDisplayStyleInline = 0, // default
18 DTHTMLElementDisplayStyleNone,
19 DTHTMLElementDisplayStyleBlock,
7769e4e @Cocoanetics Fixed: background-color should only be inherited from inline parent tag.
authored
20 DTHTMLElementDisplayStyleListItem,
21 DTHTMLElementDisplayStyleTable,
377b6e0 @Cocoanetics corrected h styles
authored
22 } DTHTMLElementDisplayStyle;
23
24 typedef enum
25 {
5b049ef @Cocoanetics Workaround for float on images to insert a newline.
authored
26 DTHTMLElementFloatStyleNone = 0,
27 DTHTMLElementFloatStyleLeft,
28 DTHTMLElementFloatStyleRight
29 } DTHTMLElementFloatStyle;
30
5eb34f3 @Cocoanetics [Sponsored by Antiloop.com] Implemented small-caps font-variant. Smal…
authored
31 typedef enum
32 {
33 DTHTMLElementFontVariantInherit = 0,
2e5b6fc @Cocoanetics Modified small-caps support to use native small caps font feature if …
authored
34 DTHTMLElementFontVariantNormal,
5eb34f3 @Cocoanetics [Sponsored by Antiloop.com] Implemented small-caps font-variant. Smal…
authored
35 DTHTMLElementFontVariantSmallCaps
36 } DTHTMLElementFontVariant;
37
99e3e37 @Cocoanetics WARNING: Massive Refactoring. New Class DTHTMLElement replaces dictio…
authored
38 @interface DTHTMLElement : NSObject <NSCopying>
39
78783d2 @Cocoanetics Made parent property of DTHTMLElement strong because this is not a de…
authored
40 @property (nonatomic, strong) DTHTMLElement *parent;
99e3e37 @Cocoanetics WARNING: Massive Refactoring. New Class DTHTMLElement replaces dictio…
authored
41 @property (nonatomic, copy) DTCoreTextFontDescriptor *fontDescriptor;
42 @property (nonatomic, copy) DTCoreTextParagraphStyle *paragraphStyle;
05aa188 @dhoerl Looking real good now - no leaks
dhoerl authored
43 @property (nonatomic, strong) DTTextAttachment *textAttachment;
99e3e37 @Cocoanetics WARNING: Massive Refactoring. New Class DTHTMLElement replaces dictio…
authored
44 @property (nonatomic, copy) NSURL *link;
bcac407 @Cocoanetics Implemented A anchor support.
authored
45 @property (nonatomic, copy) NSString *anchorName;
afd603b @Cocoanetics Mac Compatibility Mode: for Mac based UnitTest to compare generated o…
authored
46 @property (nonatomic, strong) DTColor *textColor;
47 @property (nonatomic, strong) DTColor *backgroundColor;
99e3e37 @Cocoanetics WARNING: Massive Refactoring. New Class DTHTMLElement replaces dictio…
authored
48 @property (nonatomic, copy) NSString *tagName;
06e4533 @Cocoanetics added basic support for :before
authored
49 @property (nonatomic, copy) NSString *beforeContent;
99e3e37 @Cocoanetics WARNING: Massive Refactoring. New Class DTHTMLElement replaces dictio…
authored
50 @property (nonatomic, copy) NSString *text;
7ddd659 @Cocoanetics Fixed problem with getting correct color for links. Now it is no long…
authored
51 @property (nonatomic, copy) NSArray *shadows;
99e3e37 @Cocoanetics WARNING: Massive Refactoring. New Class DTHTMLElement replaces dictio…
authored
52 @property (nonatomic, assign) CTUnderlineStyle underlineStyle;
53 @property (nonatomic, assign) BOOL tagContentInvisible;
54 @property (nonatomic, assign) BOOL strikeOut;
55 @property (nonatomic, assign) NSInteger superscriptStyle;
56 @property (nonatomic, assign) NSInteger headerLevel;
1dabb8c @Cocoanetics Fixed up iOS UnitTest to be all green.
authored
57 @property (nonatomic, assign) DTHTMLElementDisplayStyle displayStyle;
5b049ef @Cocoanetics Workaround for float on images to insert a newline.
authored
58 @property (nonatomic, readonly) DTHTMLElementFloatStyle floatStyle;
7ddd659 @Cocoanetics Fixed problem with getting correct color for links. Now it is no long…
authored
59 @property (nonatomic, assign) BOOL isColorInherited;
1294723 @Cocoanetics Better support for PRE: preserve whitespace and newlines, set font to…
authored
60 @property (nonatomic, assign) BOOL preserveNewlines;
5eb34f3 @Cocoanetics [Sponsored by Antiloop.com] Implemented small-caps font-variant. Smal…
authored
61 @property (nonatomic, assign) DTHTMLElementFontVariant fontVariant;
6b95ec9 @Cocoanetics Implemented verbal font-size value support. e.g. font-size:smaller or…
authored
62 @property (nonatomic, assign) CGFloat textScale;
704be09 @Cocoanetics added method to also parse img/video element size from width/height i…
authored
63 @property (nonatomic, assign) CGSize size;
05aa188 @dhoerl Looking real good now - no leaks
dhoerl authored
64 @property (nonatomic, strong) NSDictionary *attributes;
99e3e37 @Cocoanetics WARNING: Massive Refactoring. New Class DTHTMLElement replaces dictio…
authored
65
66 - (NSAttributedString *)attributedString;
67 - (NSDictionary *)attributesDictionary;
68
69 - (void)parseStyleString:(NSString *)styleString;
8cd0941 @Cocoanetics Implemented simple rule-based Stylesheet support. Thanks to Dawson To…
authored
70 - (void)applyStyleDictionary:(NSDictionary *)styles;
d65442a @Cocoanetics rewrite list support
authored
71 - (NSDictionary *)styles;
8cd0941 @Cocoanetics Implemented simple rule-based Stylesheet support. Thanks to Dawson To…
authored
72
a190f48 @Cocoanetics implemented simplified HR and background-color style.
authored
73 - (void)addAdditionalAttribute:(id)attribute forKey:(id)key;
74
f43373a @Cocoanetics Fixed problem where a paragraph spacing would be added even when it w…
authored
75 - (NSString *)path;
979b2c8 @kzaragoza Maintain list of children in DTHTMLElement. Moved list counter tracki…
kzaragoza authored
76
170bbfb @Cocoanetics Restructured and unified attachment handling for img, video, iframe, …
authored
77 - (NSString *)attributeForKey:(NSString *)key;
78
979b2c8 @kzaragoza Maintain list of children in DTHTMLElement. Moved list counter tracki…
kzaragoza authored
79 - (void)addChild:(DTHTMLElement *)child;
6fc56fc @Cocoanetics removed tag stack -> replaced with hierarchy formed by DTHTMLElements
authored
80 - (void)removeChild:(DTHTMLElement *)child;
f43373a @Cocoanetics Fixed problem where a paragraph spacing would be added even when it w…
authored
81
22c226f @Cocoanetics Fixed nested list counters for LI
authored
82 - (DTHTMLElement *)parentWithTagName:(NSString *)name;
c68ffe4 @Cocoanetics Preparation for re-layout after loading remote image
authored
83 - (BOOL)isContainedInBlockElement;
22c226f @Cocoanetics Fixed nested list counters for LI
authored
84
99e3e37 @Cocoanetics WARNING: Massive Refactoring. New Class DTHTMLElement replaces dictio…
authored
85 @end
Something went wrong with that request. Please try again.