summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/appkit/NSHelpManager.inc
blob: 1603f092f7095aa82208718d1d4b9ffe28b05687 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{ Parsed from Appkit.framework NSHelpManager.h }

{$ifdef TYPES}
{$ifndef NSHELPMANAGER_PAS_T}
{$define NSHELPMANAGER_PAS_T}

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSHELPMANAGER_PAS_R}
{$define NSHELPMANAGER_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSHELPMANAGER_PAS_F}
{$define NSHELPMANAGER_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSHELPMANAGER_PAS_S}
{$define NSHELPMANAGER_PAS_S}

{ External string constants }
var
  NSContextHelpModeDidActivateNotification: NSString; cvar; external;
  NSContextHelpModeDidDeactivateNotification: NSString; cvar; external;

{$endif}
{$endif}

{$ifdef FORWARD}
  NSHelpManager = objcclass;
  NSHelpManagerPointer = ^NSHelpManager;
  NSHelpManagerPtr = NSHelpManagerPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSHELPMANAGER_PAS_C}
{$define NSHELPMANAGER_PAS_C}

{ NSHelpManager }
  NSHelpManager = objcclass external (NSObject)
  private
    _helpMapTable: NSMapTable;
    _keyMapTable: NSMapTable;
    _bundleMapTable: NSMapTable;
    _helpWindow: NSWindow;
    _shadowWindow: NSWindow;
    _evtWindow: NSWindow;
    _helpBundle: NSBundle;
    
  public
    class function sharedHelpManager: NSHelpManager; message 'sharedHelpManager';
    class procedure setContextHelpModeActive(active: Boolean); message 'setContextHelpModeActive:';
    class function isContextHelpModeActive: Boolean; message 'isContextHelpModeActive';
    procedure setContextHelp_forObject(attrString: NSAttributedString; object_: id); message 'setContextHelp:forObject:';
    procedure removeContextHelpForObject(object_: id); message 'removeContextHelpForObject:';
    function contextHelpForObject(object_: id): NSAttributedString; message 'contextHelpForObject:';
    function showContextHelpForObject_locationHint(object_: id; pt: NSPoint): Boolean; message 'showContextHelpForObject:locationHint:';
    procedure openHelpAnchor_inBook(anchor: NSString; book: NSString); message 'openHelpAnchor:inBook:';
    procedure findString_inBook(query: NSString; book: NSString); message 'findString:inBook:';
    function registerBooksInBundle(bundle: NSBundle): Boolean; message 'registerBooksInBundle:';
  end;

{ NSBundleHelpExtensionCategory }
  NSBundleHelpExtensionCategory = objccategory external (NSBundle)
    function contextHelpForKey(key: NSString): NSAttributedString; message 'contextHelpForKey:';
  end;

{ NSApplicationHelpExtensionCategory }
  NSApplicationHelpExtensionCategory = objccategory external (NSApplication)
    procedure activateContextHelpMode(sender: id); message 'activateContextHelpMode:';
    procedure showHelp(sender: id); message 'showHelp:';
  end;

{$endif}
{$endif}