1{ Parsed from AppKit.framework NSTabViewItem.h } 2 3 4{$ifdef TYPES} 5type 6 NSTabViewItemPtr = ^NSTabViewItem; 7{$endif} 8 9{$ifdef TYPES} 10type 11 NSTabState = NSUInteger; 12 NSTabStatePtr = ^NSTabState; 13 14const 15 NSSelectedTab = 0; 16 NSBackgroundTab = 1; 17 NSPressedTab = 2; 18{$endif} 19 20{$ifdef CLASSES} 21 22type 23 NSTabViewItem = objcclass external (NSObject, NSCodingProtocol) 24 private 25 _identifier: id; 26 __label: NSString; 27 _view: NSView; 28 __initialFirstResponder: NSView; 29 __color: NSColor; 30 _tabView: NSTabView; 31 _tabState: NSTabState; 32 _lastKeyView: NSView; 33 _tviFlags: bitpacked record 34 case byte of 35 0: (_anonBitField__tviFlags0: cuint); 36 1: ( 37 hasCustomColor: 0..1; 38 labelSizeIsValid: 0..1; 39 autoGeneratedIFR: 0..1; 40 isTabDisabled: 0..1; 41 isActive: 0..1; 42 RESERVED: 0..((1 shl 27)-1); 43 ); 44 end; 45 _labelSize: NSSize; 46 _tabRect: NSRect; 47 _tabToolTipTag: NSToolTipTag; 48 _auxiliaryStorage: id; 49 public 50 class function tabViewItemWithViewController (viewController: NSViewController): instancetype; message 'tabViewItemWithViewController:'; { available in 10_10 } 51 function initWithIdentifier (identifier: id): instancetype; message 'initWithIdentifier:'; 52 procedure setIdentifier(newValue: id); message 'setIdentifier:'; 53 function identifier: id; message 'identifier'; 54 procedure setColor(newValue: NSColor); message 'setColor:'; 55 function color: NSColor; message 'color'; 56 procedure setLabel(newValue: NSString); message 'setLabel:'; 57 function label_: NSString; message 'label'; 58 procedure setImage(newValue: NSImage); message 'setImage:'; 59 function image: NSImage; message 'image'; 60 procedure setView(newValue: NSView); message 'setView:'; 61 function view: NSView; message 'view'; 62 procedure setViewController(newValue: NSViewController); message 'setViewController:'; 63 function viewController: NSViewController; message 'viewController'; 64 function tabState: NSTabState; message 'tabState'; 65 function tabView: NSTabView; message 'tabView'; 66 procedure setInitialFirstResponder(newValue: NSView); message 'setInitialFirstResponder:'; 67 function initialFirstResponder: NSView; message 'initialFirstResponder'; 68 procedure setToolTip(newValue: NSString); message 'setToolTip:'; 69 function toolTip: NSString; message 'toolTip'; 70 procedure drawLabel_inRect (shouldTruncateLabel: ObjCBOOL; labelRect: NSRect); message 'drawLabel:inRect:'; 71 function sizeOfLabel (computeMin: ObjCBOOL): NSSize; message 'sizeOfLabel:'; 72 73 { Adopted protocols } 74 procedure encodeWithCoder (aCoder: NSCoder); message 'encodeWithCoder:'; 75 function initWithCoder (aDecoder: NSCoder): id; message 'initWithCoder:'; 76 end; 77{$endif} 78 79