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

{$ifdef TYPES}
{$ifndef NSIMAGECELL_PAS_T}
{$define NSIMAGECELL_PAS_T}

{ Constants }

const
  NSImageAlignCenter = 0;
  NSImageAlignTop = 1;
  NSImageAlignTopLeft = 2;
  NSImageAlignTopRight = 3;
  NSImageAlignLeft = 4;
  NSImageAlignBottom = 5;
  NSImageAlignBottomLeft = 6;
  NSImageAlignBottomRight = 7;
  NSImageAlignRight = 8;

const
  NSImageFrameNone = 0;
  NSImageFramePhoto = 1;
  NSImageFrameGrayBezel = 2;
  NSImageFrameGroove = 3;
  NSImageFrameButton = 4;

{ Types }
type
  NSImageAlignment = NSUInteger;
  NSImageAlignmentPtr = ^NSImageAlignment;
  NSImageFrameStyle = NSUInteger;
  NSImageFrameStylePtr = ^NSImageFrameStyle;

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSIMAGECELL_PAS_R}
{$define NSIMAGECELL_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSIMAGECELL_PAS_F}
{$define NSIMAGECELL_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSIMAGECELL_PAS_S}
{$define NSIMAGECELL_PAS_S}

{$endif}
{$endif}

{$ifdef FORWARD}
  NSImageCell = objcclass;
  NSImageCellPointer = ^NSImageCell;
  NSImageCellPtr = NSImageCellPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSIMAGECELL_PAS_C}
{$define NSIMAGECELL_PAS_C}

{ NSImageCell }
  NSImageCell = objcclass external (NSCell, NSCopyingProtocol, NSCodingProtocol)
  private
    _controlView: id;
    __icFlags: record
      case byte of
       0: (_anonbitfield_NSImageCell0: cuint);
       1: (data: bitpacked record
        _unused: 0..((1 shl 22)-1);
        _animates: 0..1;
        _align: 0..((1 shl 4)-1);
        _scale: 0..((1 shl 2)-1);
        _style: 0..((1 shl 3)-1);
       end;
      );
      end;
    __animationState: Pointer;
    _scaledImage: NSImage;
    
  public
    function imageAlignment: NSImageAlignment; message 'imageAlignment';
    procedure setImageAlignment(newAlign: NSImageAlignment); message 'setImageAlignment:';
    function imageScaling: NSImageScaling; message 'imageScaling';
    procedure setImageScaling(newScaling: NSImageScaling); message 'setImageScaling:';
    function imageFrameStyle: NSImageFrameStyle; message 'imageFrameStyle';
    procedure setImageFrameStyle(newStyle: NSImageFrameStyle); message 'setImageFrameStyle:';

    { Adopted Protocols }
    function copyWithZone(zone_: NSZonePtr): id;
    procedure encodeWithCoder(aCoder: NSCoder);
    function initWithCoder(aDecoder: NSCoder): id;
  end;

{$endif}
{$endif}