NSAlert.inc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. { Parsed from AppKit.framework NSAlert.h }
  2. { Types from NSAlert }
  3. {$ifdef TYPES}
  4. const
  5. NSAlertFirstButtonReturn = 1000;
  6. NSAlertSecondButtonReturn = 1001;
  7. NSAlertThirdButtonReturn = 1002;
  8. {$endif}
  9. {$ifdef TYPES}
  10. type
  11. NSAlertPtr = ^NSAlert;
  12. NSAlertDelegateProtocolPtr = ^NSAlertDelegateProtocol;
  13. {$endif}
  14. {$ifdef TYPES}
  15. type
  16. NSAlertStyle = NSUInteger;
  17. NSAlertStylePtr = ^NSAlertStyle;
  18. const
  19. NSWarningAlertStyle = 0;
  20. NSInformationalAlertStyle = 1;
  21. NSCriticalAlertStyle = 2;
  22. {$endif}
  23. {$ifdef CLASSES}
  24. type
  25. NSAlert = objcclass external (NSObject)
  26. private
  27. _informationField: NSTextField;
  28. _first: id;
  29. _second: id;
  30. _third: id;
  31. _buttons: NSArray;
  32. _panel: NSPanel;
  33. _messageField: id;
  34. _imageView: id;
  35. _minButtonSize: NSSize;
  36. _buttonSpacing: CGFloat;
  37. _buttonPadding: CGFloat;
  38. _messagePadding: CGFloat;
  39. _buttonSpacingMaxX: CGFloat;
  40. _buttonSpacingY: CGFloat;
  41. _modalDelegate: id;
  42. _docWindow: NSWindow;
  43. _didEndSelector: SEL;
  44. _didDismissSelector: SEL;
  45. _unbadgedImage: NSImage;
  46. _defaultPanelSize: NSSize;
  47. _helpButton: id;
  48. _delegate: id;
  49. _alertStyle: NSAlertStyle;
  50. _helpAnchor: id;
  51. _layoutDone: ObjCBOOL;
  52. _showsHelp: ObjCBOOL;
  53. _showsSuppressionButton: ObjCBOOL;
  54. reserved: ObjCBOOL;
  55. _suppressionButton: id;
  56. _accessoryView: id;
  57. public
  58. class function alertWithError (error: NSError): NSAlert; message 'alertWithError:';
  59. class function alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat (message_: NSString; defaultButton: NSString; alternateButton: NSString; otherButton: NSString; format: NSString): NSAlert; varargs; message 'alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:'; deprecated 'in 10_3, 10_10, "Use -init instead"';
  60. procedure setMessageText(newValue: NSString); message 'setMessageText:';
  61. function messageText: NSString; message 'messageText';
  62. procedure setInformativeText(newValue: NSString); message 'setInformativeText:';
  63. function informativeText: NSString; message 'informativeText';
  64. procedure setIcon(newValue: NSImage); message 'setIcon:';
  65. function icon: NSImage; message 'icon';
  66. function addButtonWithTitle (title: NSString): NSButton; message 'addButtonWithTitle:';
  67. function buttons: NSArray; message 'buttons';
  68. procedure setShowsHelp(newValue: ObjCBOOL); message 'setShowsHelp:';
  69. function showsHelp: ObjCBOOL; message 'showsHelp';
  70. procedure setHelpAnchor(newValue: NSString); message 'setHelpAnchor:';
  71. function helpAnchor: NSString; message 'helpAnchor';
  72. procedure setAlertStyle(newValue: NSAlertStyle); message 'setAlertStyle:';
  73. function alertStyle: NSAlertStyle; message 'alertStyle';
  74. procedure setDelegate(newValue: NSAlertDelegateProtocol); message 'setDelegate:';
  75. function delegate: NSAlertDelegateProtocol; message 'delegate';
  76. procedure setShowsSuppressionButton(newValue: ObjCBOOL); message 'setShowsSuppressionButton:';
  77. function showsSuppressionButton: ObjCBOOL; message 'showsSuppressionButton';
  78. function suppressionButton: NSButton; message 'suppressionButton';
  79. procedure setAccessoryView(newValue: NSView); message 'setAccessoryView:';
  80. function accessoryView: NSView; message 'accessoryView';
  81. procedure layout; message 'layout'; { available in 10_5 }
  82. function runModal: NSModalResponse; message 'runModal';
  83. procedure beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo (window: NSWindow; delegate_: id; didEndSelector: SEL; contextInfo: pointer); message 'beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:'; deprecated 'in 10_3, 10_10, "Use -beginSheetModalForWindow:completionHandler: instead"';
  84. procedure beginSheetModalForWindow_completionHandler (sheetWindow: NSWindow; handler: OpaqueCBlock); message 'beginSheetModalForWindow:completionHandler:'; { available in 10_9 }
  85. function window: id; message 'window';
  86. end;
  87. {$endif}
  88. {$ifdef PROTOCOLS}
  89. type
  90. NSAlertDelegateProtocol = objcprotocol external name 'NSAlertDelegate' (NSObjectProtocol)
  91. optional
  92. function alertShowHelp (alert: NSAlert): ObjCBOOL; message 'alertShowHelp:';
  93. end;
  94. {$endif}