Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter EighteenDataView Integration (continued)

on_file_export_popup

Overview

The on_file_export_popup event is called when the user selected File | Export ribbon or menu function.

Syntax/Parameters

Syntax

int on_file_export ( int m_x, int m_y ) { ... }

Parameters

m_x

The mouse x position as an int in screen coordinates.

m_y

The mouse y position as an int in screen coordinates.

Return Value

The function is expected to complete the process. An error code can be returned but is presently ignored.

Remarks

This hook allows the export popup menu to be captured and presented by the script. The script is expected to process any selection made by the user.

The top level popup button on the ribbon is always enabled.

Example code:

int on_file_export_popup(int m_x, int m_y) {

    string              list[10];
    string              s1;
    int                 rc;

    list[0] = "Export iXBRL/HTML...";
    list[1] = "Export Plain HTML...";
    list[2] = "Export JSON...";
    rc = MenuTrackAdHocPopup(list, m_x, m_y);
    if (rc < 0) { return ERROR_NONE; }

                    // insert processing

    return ERROR_NONE;
    }

An ad hoc menu as simple items or as defined functions could be used. A fixed list is used to avoid unnecessary memory trashing.

Related Events and Functions

Page revised 2024-04-22