summaryrefslogtreecommitdiff
path: root/packages/cocoaint/src/appkit/NSMenuItemCell.inc
blob: ce2cf56d9aab1e5d0a6bf67674b358baf320b895 (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
{ Parsed from AppKit.framework NSMenuItemCell.h }


{ Types from NSMenuItemCell }
{$ifdef TYPES}

{$endif}


{$ifdef TYPES}
type
  NSMenuItemCellPtr = ^NSMenuItemCell;
{$endif}

{$ifdef CLASSES}

type
  NSMenuItemCell = objcclass external (NSButtonCell)
  private
    _extraData: id;
    _stateImageSize: NSSize;
    _imageSize: NSSize;
    _titleSize: NSSize;
    {$if  not defined(__LP64__)}
    _keyEquivalentSize: NSSize;
    {$endif}
    _size: NSSize;
    _micFlags: bitpacked record
      case byte of
        0: (_anonBitField__micFlags0: cuint);
        1: (
          needsSizing: 0..1;
          reserved: 0..1;
          needsDisplay: 0..1;
          keyEquivGlyphWidth: 0..((1 shl 16)-1);
          uniqueAgainstMain: 0..1;
          RESERVED_: 0..((1 shl 12)-1);
        );
      end;
  public
    procedure setMenuItem(newValue: NSMenuItem); message 'setMenuItem:';
    function menuItem: NSMenuItem; message 'menuItem';
    {$if  not defined(__LP64__)}
    procedure setMenuView (menuView: NSMenuView); message 'setMenuView:';
    function menuView: NSMenuView; message 'menuView';
    {$endif}
    procedure setNeedsSizing(newValue: ObjCBOOL); message 'setNeedsSizing:';
    function needsSizing: ObjCBOOL; message 'needsSizing';
    procedure calcSize; message 'calcSize';
    procedure setNeedsDisplay(newValue: ObjCBOOL); message 'setNeedsDisplay:';
    function needsDisplay: ObjCBOOL; message 'needsDisplay';
    function stateImageWidth: CGFloat; message 'stateImageWidth';
    function imageWidth: CGFloat; message 'imageWidth';
    function titleWidth: CGFloat; message 'titleWidth';
    function keyEquivalentWidth: CGFloat; message 'keyEquivalentWidth';
    function stateImageRectForBounds (cellFrame: NSRect): NSRect; message 'stateImageRectForBounds:';
    function titleRectForBounds (cellFrame: NSRect): NSRect; message 'titleRectForBounds:';
    function keyEquivalentRectForBounds (cellFrame: NSRect): NSRect; message 'keyEquivalentRectForBounds:';
    procedure drawSeparatorItemWithFrame_inView (cellFrame: NSRect; controlView_: NSView); message 'drawSeparatorItemWithFrame:inView:';
    procedure drawStateImageWithFrame_inView (cellFrame: NSRect; controlView_: NSView); message 'drawStateImageWithFrame:inView:';
    procedure drawImageWithFrame_inView (cellFrame: NSRect; controlView_: NSView); message 'drawImageWithFrame:inView:';
    procedure drawTitleWithFrame_inView (cellFrame: NSRect; controlView_: NSView); message 'drawTitleWithFrame:inView:';
    procedure drawKeyEquivalentWithFrame_inView (cellFrame: NSRect; controlView_: NSView); message 'drawKeyEquivalentWithFrame:inView:';
    procedure drawBorderAndBackgroundWithFrame_inView (cellFrame: NSRect; controlView_: NSView); message 'drawBorderAndBackgroundWithFrame:inView:';
    function tag: NSInteger; message 'tag';
  end;
{$endif}