Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter EighteenDataView Integration (continued)

on_form_options_popup

Overview

The on_form_options_popup event is called when the user selected Data | Options & Tools | Options menu function.

Syntax/Parameters

Syntax

int on_form_options_popup ( 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] = "Style...";
    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-12-13