index.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // Copyright (c) Jupyter Development Team.
  2. // Distributed under the terms of the Modified BSD License.
  3. import {
  4. Kernel
  5. } from '@jupyterlab/services';
  6. import {
  7. Token
  8. } from '@phosphor/coreutils';
  9. import {
  10. Widget
  11. } from '@phosphor/widgets';
  12. import {
  13. CodeEditor
  14. } from '@jupyterlab/codeeditor';
  15. import {
  16. RenderMime
  17. } from '@jupyterlab/rendermime';
  18. import '../style/index.css';
  19. export * from './widget';
  20. /* tslint:disable */
  21. /**
  22. * The tooltip manager token.
  23. */
  24. export
  25. const ITooltipManager = new Token<ITooltipManager>('jupyter.services.tooltip');
  26. /* tslint:enable */
  27. /**
  28. * A manager to register tooltips with parent widgets.
  29. */
  30. export
  31. interface ITooltipManager {
  32. /**
  33. * Invoke a tooltip.
  34. */
  35. invoke(options: ITooltipManager.IOptions): void;
  36. }
  37. /**
  38. * A namespace for `ICompletionManager` interface specifications.
  39. */
  40. export
  41. namespace ITooltipManager {
  42. /**
  43. * An interface for tooltip-compatible objects.
  44. */
  45. export
  46. interface IOptions {
  47. /**
  48. * The referent anchor the tooltip follows.
  49. */
  50. readonly anchor: Widget;
  51. /**
  52. * The referent editor for the tooltip.
  53. */
  54. readonly editor: CodeEditor.IEditor;
  55. /**
  56. * The kernel the tooltip communicates with to populate itself.
  57. */
  58. readonly kernel: Kernel.IKernelConnection;
  59. /**
  60. * The renderer the tooltip uses to render API responses.
  61. */
  62. readonly rendermime: RenderMime;
  63. }
  64. }