PageRenderTime 31ms CodeModel.GetById 22ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

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