/packages/cocoaint/src/appkit/NSFontPanel.inc

https://github.com/slibre/freepascal · Pascal · 158 lines · 107 code · 18 blank · 33 comment · 0 complexity · dde16c328af1b4dba9fa1281ddd92321 MD5 · raw file

  1. { Parsed from Appkit.framework NSFontPanel.h }
  2. {$ifdef TYPES}
  3. {$ifndef NSFONTPANEL_PAS_T}
  4. {$define NSFONTPANEL_PAS_T}
  5. { Constants }
  6. const
  7. NSFPPreviewButton = 131;
  8. NSFPRevertButton = 130;
  9. NSFPSetButton = 132;
  10. NSFPPreviewField = 128;
  11. NSFPSizeField = 129;
  12. NSFPSizeTitle = 133;
  13. NSFPCurrentField = 134;
  14. const
  15. NSFontPanelFaceModeMask = 1 shl 0;
  16. NSFontPanelSizeModeMask = 1 shl 1;
  17. NSFontPanelCollectionModeMask = 1 shl 2;
  18. NSFontPanelUnderlineEffectModeMask = 1 shl 8;
  19. NSFontPanelStrikethroughEffectModeMask = 1 shl 9;
  20. NSFontPanelTextColorEffectModeMask = 1 shl 10;
  21. NSFontPanelDocumentColorEffectModeMask = 1 shl 11;
  22. NSFontPanelShadowEffectModeMask = 1 shl 12;
  23. NSFontPanelAllEffectsModeMask = $FFF00;
  24. NSFontPanelStandardModesMask = $FFFF;
  25. NSFontPanelAllModesMask = $FFFFFFFF;
  26. {$endif}
  27. {$endif}
  28. {$ifdef RECORDS}
  29. {$ifndef NSFONTPANEL_PAS_R}
  30. {$define NSFONTPANEL_PAS_R}
  31. {$endif}
  32. {$endif}
  33. {$ifdef FUNCTIONS}
  34. {$ifndef NSFONTPANEL_PAS_F}
  35. {$define NSFONTPANEL_PAS_F}
  36. {$endif}
  37. {$endif}
  38. {$ifdef EXTERNAL_SYMBOLS}
  39. {$ifndef NSFONTPANEL_PAS_S}
  40. {$define NSFONTPANEL_PAS_S}
  41. {$endif}
  42. {$endif}
  43. {$ifdef FORWARD}
  44. NSFontPanel = objcclass;
  45. NSFontPanelPointer = ^NSFontPanel;
  46. NSFontPanelPtr = NSFontPanelPointer;
  47. {$endif}
  48. {$ifdef CLASSES}
  49. {$ifndef NSFONTPANEL_PAS_C}
  50. {$define NSFONTPANEL_PAS_C}
  51. { NSFontPanel }
  52. NSFontPanel = objcclass external (NSPanel)
  53. private
  54. _manager: NSFontManager;
  55. _collectionNames: NSArray;
  56. _selection: id;
  57. _carbonNotification: Pointer;
  58. _targetObject: id;
  59. _familyList: id;
  60. _faceList: id;
  61. _sizeList: id;
  62. _mainCollectionList: id;
  63. _sizeField: id;
  64. _sizeSlider: id;
  65. _sizeSliderBox: id;
  66. _preview: id;
  67. _previewCaption: id;
  68. _mainSplitView: id;
  69. _mmCollectionList: id;
  70. _mmFamilyList: id;
  71. _mmFaceList: id;
  72. _mmSizeList: id;
  73. _extrasPopup: id;
  74. _searchField: id;
  75. _fixedListButton: id;
  76. _sliderButton: id;
  77. _accessoryView: id;
  78. __fpFlags: record
  79. case byte of
  80. 0: (_anonbitfield_NSFontPanel0: cuint);
  81. 1: (data: bitpacked record
  82. setFontChange: 0..1;
  83. setFontAttributeChange: 0..1;
  84. _delRespFamily: 0..1;
  85. _delRespFace: 0..1;
  86. _delRespSize: 0..1;
  87. _delRespColl: 0..1;
  88. _collectionDisabled: 0..1;
  89. _sizeDisabled: 0..1;
  90. _faceDisabled: 0..1;
  91. showEffects: 0..1;
  92. _uiMode: 0..((1 shl 8)-1);
  93. _reserved: 0..((1 shl 14)-1);
  94. end;
  95. );
  96. end;
  97. _regularModeBox: id;
  98. _miniModeBox: id;
  99. _modeBoxSuperview: id;
  100. _collectionLabel: id;
  101. _sizeLabel: id;
  102. _faceLabel: id;
  103. _familyLabel: id;
  104. _sizeStyleButton: id;
  105. _newSizeField: id;
  106. _editSizeList: id;
  107. _editSizeListBox: id;
  108. _editSizeSliderBox: id;
  109. _editSizeSliderMaxField: id;
  110. _editSizeSliderMinField: id;
  111. _sizeEditWindow: id;
  112. _availableSizes: id;
  113. _addCollectionButton: id;
  114. _removeCollectionButton: id;
  115. _fontPanelPreviewHeight: CGFloat;
  116. _typographyPanel: id;
  117. _actionButton: id;
  118. _fontEffectsBox: id;
  119. _sizeStyle: cint;
  120. {$ifndef cpu64}
  121. _fpUnused: array[0..(72)-1] of id;
  122. {$endif}
  123. public
  124. class function sharedFontPanel: NSFontPanel; message 'sharedFontPanel';
  125. class function sharedFontPanelExists: Boolean; message 'sharedFontPanelExists';
  126. function accessoryView: NSView; message 'accessoryView';
  127. procedure setAccessoryView(aView: NSView); message 'setAccessoryView:';
  128. procedure setPanelFont_isMultiple(fontObj: NSFont; flag: Boolean); message 'setPanelFont:isMultiple:';
  129. function panelConvertFont(fontObj: NSFont): NSFont; message 'panelConvertFont:';
  130. function worksWhenModal: Boolean; message 'worksWhenModal';
  131. function isEnabled: Boolean; message 'isEnabled';
  132. procedure setEnabled(flag: Boolean); message 'setEnabled:';
  133. procedure reloadDefaultFontFamilies; message 'reloadDefaultFontFamilies';
  134. end;
  135. { NSFontPanelValidationAdditionsCategory }
  136. NSFontPanelValidationAdditionsCategory = objccategory external (NSObject)
  137. function validModesForFontPanel(fontPanel: NSFontPanel): NSUInteger; message 'validModesForFontPanel:';
  138. end;
  139. {$endif}
  140. {$endif}