summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/appkit/NSStringDrawing.inc
blob: 04e8d23f2159846731958489bbc88102e17bac9d (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
{ Parsed from Appkit.framework NSStringDrawing.h }

{$ifdef TYPES}
{$ifndef NSSTRINGDRAWING_PAS_T}
{$define NSSTRINGDRAWING_PAS_T}

{ Constants }

const
  NSStringDrawingTruncatesLastVisibleLine = 1 shl 5;
  NSStringDrawingUsesLineFragmentOrigin = 1 shl 0;
  NSStringDrawingUsesFontLeading = 1 shl 1;
  NSStringDrawingDisableScreenFontSubstitution = 1 shl 2;
  NSStringDrawingUsesDeviceMetrics = 1 shl 3;
  NSStringDrawingOneShot = 1 shl 4;

{ Types }
type
  NSStringDrawingOptions = NSInteger;
  NSStringDrawingOptionsPtr = ^NSStringDrawingOptions;

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSSTRINGDRAWING_PAS_R}
{$define NSSTRINGDRAWING_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSSTRINGDRAWING_PAS_F}
{$define NSSTRINGDRAWING_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSSTRINGDRAWING_PAS_S}
{$define NSSTRINGDRAWING_PAS_S}

{$endif}
{$endif}

{$ifdef FORWARD}

{$endif}

{$ifdef CLASSES}
{$ifndef NSSTRINGDRAWING_PAS_C}
{$define NSSTRINGDRAWING_PAS_C}

{ NSStringDrawingCategory }
  NSStringDrawingCategory = objccategory external (NSString)
    function sizeWithAttributes(attrs: NSDictionary): NSSize; message 'sizeWithAttributes:';
    procedure drawAtPoint_withAttributes(point: NSPoint; attrs: NSDictionary); message 'drawAtPoint:withAttributes:';
    procedure drawInRect_withAttributes(rect: NSRect; attrs: NSDictionary); message 'drawInRect:withAttributes:';
  end;

{ NSStringDrawing_NSAttributedStringCategory }
  NSStringDrawing_NSAttributedStringCategory = objccategory external name 'NSStringDrawing' (NSAttributedString)
    function size: NSSize; message 'size';
    procedure drawAtPoint(point: NSPoint); message 'drawAtPoint:';
    procedure drawInRect(rect: NSRect); message 'drawInRect:';
  end;

{ NSExtendedStringDrawingCategory }
  NSExtendedStringDrawingCategory = objccategory external (NSString)
    procedure drawWithRect_options_attributes(rect: NSRect; options: NSStringDrawingOptions; attributes: NSDictionary); message 'drawWithRect:options:attributes:';
    function boundingRectWithSize_options_attributes(size: NSSize; options: NSStringDrawingOptions; attributes: NSDictionary): NSRect; message 'boundingRectWithSize:options:attributes:';
  end;

{ NSExtendedStringDrawing_NSAttributedStringCategory }
  NSExtendedStringDrawing_NSAttributedStringCategory = objccategory external name 'NSExtendedStringDrawing' (NSAttributedString)
    procedure drawWithRect_options(rect: NSRect; options: NSStringDrawingOptions); message 'drawWithRect:options:';
    function boundingRectWithSize_options(size: NSSize; options: NSStringDrawingOptions): NSRect; message 'boundingRectWithSize:options:';
  end;

{$endif}
{$endif}