/packages/cocoaint/src/appkit/NSDatePickerCell.inc

https://github.com/slibre/freepascal · Pascal · 149 lines · 92 code · 20 blank · 37 comment · 0 complexity · acd60fae6357ac609f543953701e6d73 MD5 · raw file

  1. { Parsed from Appkit.framework NSDatePickerCell.h }
  2. {$ifdef TYPES}
  3. {$ifndef NSDATEPICKERCELL_PAS_T}
  4. {$define NSDATEPICKERCELL_PAS_T}
  5. { Constants }
  6. const
  7. NSTextFieldAndStepperDatePickerStyle = 0;
  8. NSClockAndCalendarDatePickerStyle = 1;
  9. NSTextFieldDatePickerStyle = 2;
  10. const
  11. NSSingleDateMode = 0;
  12. NSRangeDateMode = 1;
  13. const
  14. NSHourMinuteDatePickerElementFlag = $000c;
  15. NSHourMinuteSecondDatePickerElementFlag = $000e;
  16. NSTimeZoneDatePickerElementFlag = $0010;
  17. NSYearMonthDatePickerElementFlag = $00c0;
  18. NSYearMonthDayDatePickerElementFlag = $00e0;
  19. NSEraDatePickerElementFlag = $0100;
  20. { Types }
  21. type
  22. NSDatePickerStyle = NSUInteger;
  23. NSDatePickerStylePtr = ^NSDatePickerStyle;
  24. NSDatePickerMode = NSUInteger;
  25. NSDatePickerModePtr = ^NSDatePickerMode;
  26. NSDatePickerElementFlags = NSUInteger;
  27. NSDatePickerElementFlagsPtr = ^NSDatePickerElementFlags;
  28. {$endif}
  29. {$endif}
  30. {$ifdef RECORDS}
  31. {$ifndef NSDATEPICKERCELL_PAS_R}
  32. {$define NSDATEPICKERCELL_PAS_R}
  33. {$endif}
  34. {$endif}
  35. {$ifdef FUNCTIONS}
  36. {$ifndef NSDATEPICKERCELL_PAS_F}
  37. {$define NSDATEPICKERCELL_PAS_F}
  38. {$endif}
  39. {$endif}
  40. {$ifdef EXTERNAL_SYMBOLS}
  41. {$ifndef NSDATEPICKERCELL_PAS_S}
  42. {$define NSDATEPICKERCELL_PAS_S}
  43. {$endif}
  44. {$endif}
  45. {$ifdef FORWARD}
  46. NSDatePickerCellDelegateProtocol = objcprotocol;
  47. NSDatePickerCell = objcclass;
  48. NSDatePickerCellPointer = ^NSDatePickerCell;
  49. NSDatePickerCellPtr = NSDatePickerCellPointer;
  50. {$endif}
  51. {$ifdef CLASSES}
  52. {$ifndef NSDATEPICKERCELL_PAS_C}
  53. {$define NSDATEPICKERCELL_PAS_C}
  54. { NSDatePickerCell }
  55. NSDatePickerCell = objcclass external (NSActionCell)
  56. private
  57. _timeInterval: NSTimeInterval;
  58. _minDate: NSDate;
  59. _maxDate: NSDate;
  60. __dcFlags: record
  61. case byte of
  62. 0: (_anonbitfield_NSDatePickerCell0: cuint);
  63. 1: (data: bitpacked record
  64. elements: 0..((1 shl 16)-1);
  65. controlStyle: 0..((1 shl 3)-1);
  66. controlMode: 0..((1 shl 2)-1);
  67. trackingHand: 0..((1 shl 2)-1);
  68. reserved2: 0..((1 shl 4)-1);
  69. _drawsBackground: 0..1;
  70. digitsEntered: 0..((1 shl 2)-1);
  71. forcesLeadingZeroes: 0..1;
  72. wrapsDateComponentArithmetic: 0..1;
  73. end;
  74. );
  75. end;
  76. _delegate: id;
  77. _calendar: NSCalendar;
  78. _locale: NSLocale;
  79. _timeZone: NSTimeZone;
  80. _backgroundColor: NSColor;
  81. _textColor: NSColor;
  82. _indexOfSelectedSubfield: cint;
  83. _reserved0: cint;
  84. _reserved1: id;
  85. _reserved2: id;
  86. _reserved3: id;
  87. _reserved4: id;
  88. public
  89. function datePickerStyle: NSDatePickerStyle; message 'datePickerStyle';
  90. procedure setDatePickerStyle(newStyle: NSDatePickerStyle); message 'setDatePickerStyle:';
  91. function drawsBackground: Boolean; message 'drawsBackground';
  92. procedure setDrawsBackground(flag: Boolean); message 'setDrawsBackground:';
  93. function backgroundColor: NSColor; message 'backgroundColor';
  94. procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
  95. function textColor: NSColor; message 'textColor';
  96. procedure setTextColor(color: NSColor); message 'setTextColor:';
  97. function datePickerMode: NSDatePickerMode; message 'datePickerMode';
  98. procedure setDatePickerMode(newMode: NSDatePickerMode); message 'setDatePickerMode:';
  99. function datePickerElements: NSDatePickerElementFlags; message 'datePickerElements';
  100. procedure setDatePickerElements(elementFlags: NSDatePickerElementFlags); message 'setDatePickerElements:';
  101. function calendar: NSCalendar; message 'calendar';
  102. procedure setCalendar(newCalendar: NSCalendar); message 'setCalendar:';
  103. function locale: NSLocale; message 'locale';
  104. procedure setLocale(newLocale: NSLocale); message 'setLocale:';
  105. function timeZone: NSTimeZone; message 'timeZone';
  106. procedure setTimeZone(newTimeZone: NSTimeZone); message 'setTimeZone:';
  107. function dateValue: NSDate; message 'dateValue';
  108. procedure setDateValue(newStartDate: NSDate); message 'setDateValue:';
  109. function timeInterval: NSTimeInterval; message 'timeInterval';
  110. procedure setTimeInterval(newTimeInterval: NSTimeInterval); message 'setTimeInterval:';
  111. function minDate: NSDate; message 'minDate';
  112. procedure setMinDate(date: NSDate); message 'setMinDate:';
  113. function maxDate: NSDate; message 'maxDate';
  114. procedure setMaxDate(date: NSDate); message 'setMaxDate:';
  115. function delegate: NSDatePickerCellDelegateProtocol; message 'delegate';
  116. procedure setDelegate(anObject: NSDatePickerCellDelegateProtocol); message 'setDelegate:';
  117. end;
  118. {$endif}
  119. {$endif}
  120. {$ifdef PROTOCOLS}
  121. {$ifndef NSDATEPICKERCELL_PAS_P}
  122. {$define NSDATEPICKERCELL_PAS_P}
  123. { NSDatePickerCellDelegate Protocol }
  124. NSDatePickerCellDelegateProtocol = objcprotocol external name 'NSDatePickerCellDelegate'
  125. optional
  126. procedure datePickerCell_validateProposedDateValue_timeInterval(aDatePickerCell: NSDatePickerCell; proposedDateValue: NSDatePointer; proposedTimeInterval: NSTimeIntervalPtr); message 'datePickerCell:validateProposedDateValue:timeInterval:';
  127. end;
  128. {$endif}
  129. {$endif}