Implements

Methods

  • Add a panel to the category.

    Parameters

    • name: string

      The name of the panel, used to identify a specific panel.

    • title: string

      The title of the panel, used to display the panel.

    • btnBitmap: DIBitmapType

      The bitmap of the panel, used to display the panel.

    Returns Promise<null | RibbonPanelType>

    const parentWnd = await LPVOID.create();
    const ribbonBar = await app.getRibbonBar(parentWnd);
    const ribbonCategory = await ribbonBar.addCategory('categoryName', 'categoryTitle');
    const ribbonPanel = await ribbonCategory.addPanel('panelName', 'panelTitle', btnBitmap);
  • Get the name of the category.

    Returns Promise<string>

    The name of the category.

  • Get the panel object by index.

    Parameters

    • index: number

      The index of the panel. This value can be iterated through from getPanelCount.

    Returns Promise<null | RibbonPanelType>

    Get the specified panel object.

  • Get the panel object by name.

    Parameters

    • panelName: string

      The name of the panel.

    Returns Promise<null | RibbonPanelType>

    Get the specified panel object.

    const parentWnd = await LPVOID.create();
    const ribbonBar = await app.getRibbonBar(parentWnd);
    const ribbonCategory = await ribbonBar.getCategoryByName('categoryName');
    const ribbonPanel = await ribbonCategory.getPanelByName('panelName');
  • Get the number of panels in the category.

    Returns Promise<number>

    The number of panels in the category.

  • Recalculate the layout of the category.

    Parameters

    • reCalcPanels: boolean = true

      Whether to recalculate the layout of the panel.

    Returns Promise<void>

    Promise