NSToolbar.inc 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. { Parsed from AppKit.framework NSToolbar.h }
  2. {$ifdef TYPES}
  3. type
  4. NSToolbarPtr = ^NSToolbar;
  5. NSToolbarDelegateProtocolPtr = ^NSToolbarDelegateProtocol;
  6. {$endif}
  7. {$ifdef TYPES}
  8. type
  9. NSToolbarDisplayMode = NSUInteger;
  10. NSToolbarDisplayModePtr = ^NSToolbarDisplayMode;
  11. const
  12. NSToolbarDisplayModeDefault = 0;
  13. NSToolbarDisplayModeIconAndLabel = 1;
  14. NSToolbarDisplayModeIconOnly = 2;
  15. NSToolbarDisplayModeLabelOnly = 3;
  16. type
  17. NSToolbarSizeMode = NSUInteger;
  18. NSToolbarSizeModePtr = ^NSToolbarSizeMode;
  19. const
  20. NSToolbarSizeModeDefault = 0;
  21. NSToolbarSizeModeRegular = 1;
  22. NSToolbarSizeModeSmall = 2;
  23. {$endif}
  24. {$ifdef CLASSES}
  25. type
  26. NSToolbar = objcclass external (NSObject)
  27. private
  28. _toolbarIdentifier: NSString;
  29. _currentItems: NSMutableArray;
  30. _currentItemIdentifiers: NSMutableArray;
  31. _fullScreenAccessoryView: NSView;
  32. _res2: id;
  33. _selectedItemIdentifier: NSString;
  34. _metrics: pointer;
  35. _delegate: id;
  36. _logicalWindow: NSWindow;
  37. _configPalette: id;
  38. _toolbarView: id;
  39. _syncPostEnabledCount: NSInteger;
  40. _tbFlags: bitpacked record
  41. case byte of
  42. 0: (_anonBitField__tbFlags0: cuint);
  43. 1: (
  44. allowsUserCustomization: 0..1;
  45. autosavesUsingIdentifier: 0..1;
  46. initialConfigurationDone: 0..1;
  47. doesNotAttachToMenuBar: 0..1;
  48. delegateDefaultItemIdentifiers: 0..1;
  49. delegateAllowedItemIdentifiers: 0..1;
  50. delegateItemWithItemIdentifier: 0..1;
  51. delegateNotificationsEnabled: 0..1;
  52. prefersToBeShown: 0..1;
  53. loadItemsImmediately: 0..1;
  54. currentItemsContainsPlaceholder: 0..1;
  55. customizationPanelIsRunning: 0..1;
  56. usesCustomSheetWidth: 0..1;
  57. clickAndDragPerformsCustomization: 0..1;
  58. showsNoContextMenu: 0..1;
  59. currentlyLoadingPlaceholders: 0..1;
  60. delegateItemWithItemIdentifier2: 0..1;
  61. inGlobalWindow: 0..1;
  62. hasOwnedFullscreenViewController: 0..1;
  63. usesServicesItems: 0..1;
  64. usingFSMetrics: 0..1;
  65. keyboardLoopNeedsUpdating: 0..1;
  66. showHideDuringConfigurationChangeDisabled: 0..1;
  67. displayMode: 0..((1 shl 2)-1);
  68. sizeMode: 0..((1 shl 2)-1);
  69. doNotShowBaselineSeparator: 0..1;
  70. hideWithoutResizingWindowHint: 0..1;
  71. autovalidatesItemsDisabled: 0..1;
  72. inAutovalidation: 0..1;
  73. loadedMetrics: 0..1;
  74. );
  75. end;
  76. _customizationSheetWidth: NSInteger;
  77. _tbReserved: id;
  78. public
  79. function initWithIdentifier (identifier: NSString): instancetype; message 'initWithIdentifier:'; { NS_DESIGNATED_INITIALIZER }
  80. procedure insertItemWithItemIdentifier_atIndex (itemIdentifier: NSString; index: NSInteger); message 'insertItemWithItemIdentifier:atIndex:';
  81. procedure removeItemAtIndex (index: NSInteger); message 'removeItemAtIndex:';
  82. procedure setDelegate(newValue: NSToolbarDelegateProtocol); message 'setDelegate:';
  83. function delegate: NSToolbarDelegateProtocol; message 'delegate';
  84. procedure setVisible(newValue: ObjCBOOL); message 'setVisible:';
  85. function isVisible: ObjCBOOL; message 'isVisible';
  86. procedure runCustomizationPalette (sender: id); message 'runCustomizationPalette:';
  87. function customizationPaletteIsRunning: ObjCBOOL; message 'customizationPaletteIsRunning';
  88. procedure setDisplayMode(newValue: NSToolbarDisplayMode); message 'setDisplayMode:';
  89. function displayMode: NSToolbarDisplayMode; message 'displayMode';
  90. procedure setSelectedItemIdentifier(newValue: NSString); message 'setSelectedItemIdentifier:';
  91. function selectedItemIdentifier: NSString; message 'selectedItemIdentifier';
  92. procedure setSizeMode(newValue: NSToolbarSizeMode); message 'setSizeMode:';
  93. function sizeMode: NSToolbarSizeMode; message 'sizeMode';
  94. procedure setShowsBaselineSeparator(newValue: ObjCBOOL); message 'setShowsBaselineSeparator:';
  95. function showsBaselineSeparator: ObjCBOOL; message 'showsBaselineSeparator';
  96. procedure setAllowsUserCustomization(newValue: ObjCBOOL); message 'setAllowsUserCustomization:';
  97. function allowsUserCustomization: ObjCBOOL; message 'allowsUserCustomization';
  98. function identifier: NSString; message 'identifier';
  99. function items: NSArray; message 'items';
  100. function visibleItems: NSArray; message 'visibleItems';
  101. procedure setAutosavesConfiguration(newValue: ObjCBOOL); message 'setAutosavesConfiguration:';
  102. function autosavesConfiguration: ObjCBOOL; message 'autosavesConfiguration';
  103. procedure setConfigurationFromDictionary (configDict: NSDictionary); message 'setConfigurationFromDictionary:';
  104. function configurationDictionary: NSDictionary; message 'configurationDictionary';
  105. procedure validateVisibleItems; message 'validateVisibleItems';
  106. procedure setAllowsExtensionItems(newValue: ObjCBOOL); message 'setAllowsExtensionItems:';
  107. function allowsExtensionItems: ObjCBOOL; message 'allowsExtensionItems';
  108. end;
  109. {$endif}
  110. {$ifdef PROTOCOLS}
  111. type
  112. NSToolbarDelegateProtocol = objcprotocol external name 'NSToolbarDelegate' (NSObjectProtocol)
  113. optional
  114. function toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar (toolbar: NSToolbar; itemIdentifier: NSString; flag: ObjCBOOL): NSToolbarItem; message 'toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:';
  115. function toolbarDefaultItemIdentifiers (toolbar: NSToolbar): NSArray; message 'toolbarDefaultItemIdentifiers:';
  116. function toolbarAllowedItemIdentifiers (toolbar: NSToolbar): NSArray; message 'toolbarAllowedItemIdentifiers:';
  117. optional
  118. function toolbarSelectableItemIdentifiers (toolbar: NSToolbar): NSArray; message 'toolbarSelectableItemIdentifiers:';
  119. procedure toolbarWillAddItem (notification: NSNotification); message 'toolbarWillAddItem:';
  120. procedure toolbarDidRemoveItem (notification: NSNotification); message 'toolbarDidRemoveItem:';
  121. end;
  122. {$endif}
  123. {$ifdef EXTERNAL_SYMBOLS}
  124. var
  125. NSToolbarWillAddItemNotification: NSString; cvar; external;
  126. NSToolbarDidRemoveItemNotification: NSString; cvar; external;
  127. {$endif}
  128. {$ifdef CLASSES}
  129. type
  130. NSToolbar_NSDeprecated = objccategory external name 'NSDeprecated' (NSToolbar)
  131. procedure setFullScreenAccessoryView(newValue: NSView); message 'setFullScreenAccessoryView:';
  132. function fullScreenAccessoryView: NSView; message 'fullScreenAccessoryView';
  133. procedure setFullScreenAccessoryViewMinHeight(newValue: CGFloat); message 'setFullScreenAccessoryViewMinHeight:';
  134. function fullScreenAccessoryViewMinHeight: CGFloat; message 'fullScreenAccessoryViewMinHeight';
  135. procedure setFullScreenAccessoryViewMaxHeight(newValue: CGFloat); message 'setFullScreenAccessoryViewMaxHeight:';
  136. function fullScreenAccessoryViewMaxHeight: CGFloat; message 'fullScreenAccessoryViewMaxHeight';
  137. end;
  138. {$endif}