blob: 90cc9ff34f65f14c730db5bf9791bb4184f469ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
{ Parsed from Appkit.framework NSTextTable.h }
{$ifdef TYPES}
{$ifndef NSTEXTTABLE_PAS_T}
{$define NSTEXTTABLE_PAS_T}
{ Constants }
const
NSTextBlockAbsoluteValueType = 0;
NSTextBlockPercentageValueType = 1;
const
NSTextBlockWidth = 0;
NSTextBlockMinimumWidth = 1;
NSTextBlockMaximumWidth = 2;
NSTextBlockHeight = 4;
NSTextBlockMinimumHeight = 5;
NSTextBlockMaximumHeight = 6;
const
NSTextBlockPadding = -1;
NSTextBlockBorder = 0;
NSTextBlockMargin = 1;
const
NSTextBlockTopAlignment = 0;
NSTextBlockMiddleAlignment = 1;
NSTextBlockBottomAlignment = 2;
NSTextBlockBaselineAlignment = 3;
const
NSTextTableAutomaticLayoutAlgorithm = 0;
NSTextTableFixedLayoutAlgorithm = 1;
{ Types }
type
NSTextBlockValueType = NSUInteger;
NSTextBlockValueTypePtr = ^NSTextBlockValueType;
NSTextBlockDimension = NSUInteger;
NSTextBlockDimensionPtr = ^NSTextBlockDimension;
NSTextBlockLayer = NSInteger;
NSTextBlockLayerPtr = ^NSTextBlockLayer;
NSTextBlockVerticalAlignment = NSUInteger;
NSTextBlockVerticalAlignmentPtr = ^NSTextBlockVerticalAlignment;
NSTextTableLayoutAlgorithm = NSUInteger;
NSTextTableLayoutAlgorithmPtr = ^NSTextTableLayoutAlgorithm;
{$endif}
{$endif}
{$ifdef RECORDS}
{$ifndef NSTEXTTABLE_PAS_R}
{$define NSTEXTTABLE_PAS_R}
{$endif}
{$endif}
{$ifdef FUNCTIONS}
{$ifndef NSTEXTTABLE_PAS_F}
{$define NSTEXTTABLE_PAS_F}
{$endif}
{$endif}
{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSTEXTTABLE_PAS_S}
{$define NSTEXTTABLE_PAS_S}
{$endif}
{$endif}
{$ifdef FORWARD}
NSTextBlock = objcclass;
NSTextBlockPointer = ^NSTextBlock;
NSTextBlockPtr = NSTextBlockPointer;
NSTextTableBlock = objcclass;
NSTextTableBlockPointer = ^NSTextTableBlock;
NSTextTableBlockPtr = NSTextTableBlockPointer;
NSTextTable = objcclass;
NSTextTablePointer = ^NSTextTable;
NSTextTablePtr = NSTextTablePointer;
{$endif}
{$ifdef CLASSES}
{$ifndef NSTEXTTABLE_PAS_C}
{$define NSTEXTTABLE_PAS_C}
{ NSTextBlock }
NSTextBlock = objcclass external (NSObject, NSCodingProtocol, NSCopyingProtocol)
private
_propVals: Pointer;
_propMask: NSUInteger;
_typeMask: NSUInteger;
_primParamVal: id;
_otherParamVals: id;
_blockPrimary: Pointer;
_blockSecondary: Pointer;
public
function init: id; message 'init';
procedure setValue_type_forDimension(val: CGFloat; type_: NSTextBlockValueType; dimension: NSTextBlockDimension); message 'setValue:type:forDimension:';
function valueForDimension(dimension: NSTextBlockDimension): CGFloat; message 'valueForDimension:';
function valueTypeForDimension(dimension: NSTextBlockDimension): NSTextBlockValueType; message 'valueTypeForDimension:';
procedure setContentWidth_type(val: CGFloat; type_: NSTextBlockValueType); message 'setContentWidth:type:';
function contentWidth: CGFloat; message 'contentWidth';
function contentWidthValueType: NSTextBlockValueType; message 'contentWidthValueType';
procedure setWidth_type_forLayer_edge(val: CGFloat; type_: NSTextBlockValueType; layer: NSTextBlockLayer; edge: NSRectEdge); message 'setWidth:type:forLayer:edge:';
procedure setWidth_type_forLayer(val: CGFloat; type_: NSTextBlockValueType; layer: NSTextBlockLayer); message 'setWidth:type:forLayer:';
function widthForLayer_edge(layer: NSTextBlockLayer; edge: NSRectEdge): CGFloat; message 'widthForLayer:edge:';
function widthValueTypeForLayer_edge(layer: NSTextBlockLayer; edge: NSRectEdge): NSTextBlockValueType; message 'widthValueTypeForLayer:edge:';
procedure setVerticalAlignment(alignment: NSTextBlockVerticalAlignment); message 'setVerticalAlignment:';
function verticalAlignment: NSTextBlockVerticalAlignment; message 'verticalAlignment';
procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
function backgroundColor: NSColor; message 'backgroundColor';
procedure setBorderColor_forEdge(color: NSColor; edge: NSRectEdge); message 'setBorderColor:forEdge:';
procedure setBorderColor(color: NSColor); message 'setBorderColor:';
function borderColorForEdge(edge: NSRectEdge): NSColor; message 'borderColorForEdge:';
function rectForLayoutAtPoint_inRect_textContainer_characterRange(startingPoint: NSPoint; rect: NSRect; textContainer: NSTextContainer; charRange: NSRange): NSRect; message 'rectForLayoutAtPoint:inRect:textContainer:characterRange:';
function boundsRectForContentRect_inRect_textContainer_characterRange(contentRect: NSRect; rect: NSRect; textContainer: NSTextContainer; charRange: NSRange): NSRect; message 'boundsRectForContentRect:inRect:textContainer:characterRange:';
procedure drawBackgroundWithFrame_inView_characterRange_layoutManager(frameRect: NSRect; controlView: NSView; charRange: NSRange; layoutManager: NSLayoutManager); message 'drawBackgroundWithFrame:inView:characterRange:layoutManager:';
{ Adopted Protocols }
procedure encodeWithCoder(aCoder: NSCoder);
function initWithCoder(aDecoder: NSCoder): id;
function copyWithZone(zone_: NSZonePtr): id;
end;
{ NSTextTableBlock }
NSTextTableBlock = objcclass external (NSTextBlock)
private
_table: NSTextTable;
_rowNum: NSInteger;
_colNum: NSInteger;
_rowSpan: NSInteger;
_colSpan: NSInteger;
_tableBlockPrimary: Pointer;
_tableBlockSecondary: Pointer;
public
function initWithTable_startingRow_rowSpan_startingColumn_columnSpan(table_: NSTextTable; row: NSInteger; rowSpan_: NSInteger; col: NSInteger; colSpan: NSInteger): id; message 'initWithTable:startingRow:rowSpan:startingColumn:columnSpan:';
function table: NSTextTable; message 'table';
function startingRow: NSInteger; message 'startingRow';
function rowSpan: NSInteger; message 'rowSpan';
function startingColumn: NSInteger; message 'startingColumn';
function columnSpan: NSInteger; message 'columnSpan';
end;
{ NSTextTable }
NSTextTable = objcclass external (NSTextBlock)
private
_numCols: NSUInteger;
_tableFlags: NSUInteger;
_lcache: id;
_tablePrimary: Pointer;
_tableSecondary: Pointer;
public
function numberOfColumns: NSUInteger; message 'numberOfColumns';
procedure setNumberOfColumns(numCols: NSUInteger); message 'setNumberOfColumns:';
function layoutAlgorithm: NSTextTableLayoutAlgorithm; message 'layoutAlgorithm';
procedure setLayoutAlgorithm(algorithm: NSTextTableLayoutAlgorithm); message 'setLayoutAlgorithm:';
function collapsesBorders: Boolean; message 'collapsesBorders';
procedure setCollapsesBorders(flag: Boolean); message 'setCollapsesBorders:';
function hidesEmptyCells: Boolean; message 'hidesEmptyCells';
procedure setHidesEmptyCells(flag: Boolean); message 'setHidesEmptyCells:';
function rectForBlock_layoutAtPoint_inRect_textContainer_characterRange(block: NSTextTableBlock; startingPoint: NSPoint; rect: NSRect; textContainer: NSTextContainer; charRange: NSRange): NSRect; message 'rectForBlock:layoutAtPoint:inRect:textContainer:characterRange:';
function boundsRectForBlock_contentRect_inRect_textContainer_characterRange(block: NSTextTableBlock; contentRect: NSRect; rect: NSRect; textContainer: NSTextContainer; charRange: NSRange): NSRect; message 'boundsRectForBlock:contentRect:inRect:textContainer:characterRange:';
procedure drawBackgroundForBlock_withFrame_inView_characterRange_layoutManager(block: NSTextTableBlock; frameRect: NSRect; controlView: NSView; charRange: NSRange; layoutManager: NSLayoutManager); message 'drawBackgroundForBlock:withFrame:inView:characterRange:layoutManager:';
end;
{$endif}
{$endif}
|