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

{$ifdef TYPES}
{$ifndef NSTEXTFIELDCELL_PAS_T}
{$define NSTEXTFIELDCELL_PAS_T}

{ Constants }

const
  NSTextFieldSquareBezel = 0;
  NSTextFieldRoundedBezel = 1;

{ Types }
type
  NSTextFieldBezelStyle = NSUInteger;
  NSTextFieldBezelStylePtr = ^NSTextFieldBezelStyle;

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSTEXTFIELDCELL_PAS_R}
{$define NSTEXTFIELDCELL_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSTEXTFIELDCELL_PAS_F}
{$define NSTEXTFIELDCELL_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSTEXTFIELDCELL_PAS_S}
{$define NSTEXTFIELDCELL_PAS_S}

{$endif}
{$endif}

{$ifdef FORWARD}
  NSTextFieldCell = objcclass;
  NSTextFieldCellPointer = ^NSTextFieldCell;
  NSTextFieldCellPtr = NSTextFieldCellPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSTEXTFIELDCELL_PAS_C}
{$define NSTEXTFIELDCELL_PAS_C}

{ NSTextFieldCell }
  NSTextFieldCell = objcclass external (NSActionCell)
  private
    _backgroundColor: NSColor;
    _textColor: NSColor;
    __tfFlags: record
      case byte of
       0: (_anonbitfield_NSTextFieldCell0: cuint);
       1: (data: bitpacked record
        _drawsBackground: 0..1;
        _bezelStyle: 0..((1 shl 3)-1);
        thcSortDirection: 0..((1 shl 2)-1);
        thcSortPriority: 0..((1 shl 4)-1);
        mini: 0..1;
        textColorIgnoresNormalDisableFlag: 0..1;
        textColorDisableFlag: 0..1;
        thcForceHighlightForSort: 0..1;
        invalidTextColor: 0..1;
        notificationForMarkedText: 0..1;
        reservedTextFieldCell: 0..((1 shl 16)-1);
       end;
      );
      end;
    
  public
    procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
    function backgroundColor: NSColor; message 'backgroundColor';
    procedure setDrawsBackground(flag: Boolean); message 'setDrawsBackground:';
    function drawsBackground: Boolean; message 'drawsBackground';
    procedure setTextColor(color: NSColor); message 'setTextColor:';
    function textColor: NSColor; message 'textColor';
    function setUpFieldEditorAttributes(textObj: NSText): NSText; message 'setUpFieldEditorAttributes:';
    procedure setBezelStyle(style: NSTextFieldBezelStyle); message 'setBezelStyle:';
    function bezelStyle: NSTextFieldBezelStyle; message 'bezelStyle';
    procedure setPlaceholderString(string_: NSString); message 'setPlaceholderString:';
    function placeholderString: NSString; message 'placeholderString';
    procedure setPlaceholderAttributedString(string_: NSAttributedString); message 'setPlaceholderAttributedString:';
    function placeholderAttributedString: NSAttributedString; message 'placeholderAttributedString';
    procedure setWantsNotificationForMarkedText(flag: Boolean); message 'setWantsNotificationForMarkedText:';
    function allowedInputSourceLocales: NSArray; message 'allowedInputSourceLocales';
    procedure setAllowedInputSourceLocales(localeIdentifiers: NSArray); message 'setAllowedInputSourceLocales:';
  end;

{$endif}
{$endif}