GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Eighteen — DataView Integration (continued)
Overview
The on_menu_init event is called at the start of a ribbon update or during a popup menu display. The event allows the script to indicate which menu items are available by setting and returning certain context bits.
Syntax/Parameters
Syntax
qword on_menu_init ( int row, int column, int count, int clue ) { ... }
Parameters
row
An int as the current row position of the caret.
column
An int as the current column position of the caret.
count
An int expressing the number of selected items (cells).
clue
An int expressing the type of selection.
Return Value
A 64-bit qword expressing bitwise the current available contexts for the ribbon or menu. The qword specifying the available functions should be created by using bitwise logic. The script should OR in the available functions. If 0xFFFFFFFFFFFFFFFF (or -1) is returned, all functions will be made available. See DV_ and FV_ context codes.
Remarks
This function is called by Data View or Forms View any time the ribbon or menu requires updating. If processed, the script can make a determination as to what menu functions are available or disabled (grayed). This function should be very fast and avoid running time consuming in depth testing since it will be called every time the caret is mouse, the mouse is dragged or clicked or a popup menu is displayed.
At all costs, avoid displaying message boxes or dialogs within this event. It will result in an endless loop since each time the message box is closed the ribbon will be reinitialized and the event called again and again and again...
The return bits are as follows (set enables function):
Definition | Semaphore Bit | Description | |||||
General | |||||||
Edit | |||||||
FV_EDIT_COPY | 0x0000000000000001 | Copy Data | |||||
FV_EDIT_PASTE | 0x0000000000000002 | Paste Data | |||||
File Items | |||||||
FV_FILE_EXPORT_POPUP | 0x0000000000000010 | File Export Popup | |||||
FV_FILE_EXPORT | 0x0000000000000020 | File Export | |||||
FV_FILE_IMPORT_POPUP | 0x0000000000000040 | File Import Popup | |||||
FV_FILE_IMPORT | 0x0000000000000080 | File Import | |||||
FV_FILE_LAUNCH | 0x0000000000000100 | File Launch to Browser | |||||
FV_FILE_PRINT | 0x0000000000000200 | File Print/PDF | |||||
FV_FILE_SAVE | 0x0000000000000400 | File Save | |||||
Data View Menu Items | |||||||
FV_DATA_EDIT_CELL | 0x0000000000001000 | Edit Cell in Custom View | |||||
FV_DATA_EDIT_CELL_TEXT | 0x0000000000002000 | Edit Cell as Text | |||||
Forms View Items | |||||||
FV_FORM_ADD_ENTRY | 0x0000000000010000 | Form Add Entry Function | |||||
FV_FORM_CLONE_ENTRY | 0x0000000000020000 | Form Clone Entry Function | |||||
FV_FORM_COPY_POPUP | 0x0000000000040000 | Form Copy Popup Menu Function | |||||
FV_FORM_COPY_CELL | 0x0000000000080000 | Form Copy Cell | |||||
FV_FORM_COPY_ROW | 0x0000000000100000 | Form Copy Table Row | |||||
FV_FORM_COPY_TABLE | 0x0000000000200000 | Form Copy Table | |||||
FV_FORM_DELETE_POPUP | 0x0000000000400000 | Form Delete Popup | |||||
FV_FORM_DELETE_ALL | 0x0000000000800000 | Form Delete All | |||||
FV_FORM_DELETE_ENTRY | 0x0000000001000000 | Form Delete Entry | |||||
FV_FORM_EDIT_ENTRY | 0x0000000002000000 | Form Edit Entry | |||||
FV_FORM_EDIT_ROW | 0x0000000004000000 | Form Edit Row as Entry | |||||
FV_FORM_EXPORT_TABLE_CSV | 0x0000000008000000 | Form Export Table as CSV | |||||
FV_FORM_EXPORT_TABLE_XML | 0x0000000010000000 | Form Export Table as XML | |||||
FV_FORM_MOVE_DOWN | 0x0000000020000000 | Form Move Entry Down | |||||
FV_FORM_MOVE_UP | 0x0000000040000000 | Form Move Entry Up | |||||
FV_FORM_VALIDATE | 0x0000000800000000 | Form Validate |
Note that if a function is disabled on the menu it does not mean that the function cannot be executed. It is up to the script to test the context of each function.
Certain functions such as FILE_LAUNCH or FILE_PRINT are enabled automatically if a hook is present for the function.
Page revised 2024-12-13
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.