grandMA3 User Manual Publication
DefaultDisplayPositions()

grandMA3 User Manual » Plugins » Lua Functions - Object-Free API » DefaultDisplayPositions()
Version 2.1

Description

The DefaultDisplayPositions Lua function returns the handle of the conventional default display positions, which contains the first seven screens as children.

For example, whether the command line, view bar, and encoder/playback bar are displayed.

Argument

This function does not have any arguments.

Return

  • Handle:
    The function returns a handle to the command line object.

Examples

This example prints all the information about display 1 (child 1 of the default displays) using the Dump() function:

Dump()

The Dump() function returns a string with information about the object, for instance, the name, class, path of the object, its properties, and children.

Learn more in the Dump() topic.

Lua
return function()
-- Store a handle to display 1 (child 1 of the default displays).
local display1 = DefaultDisplayPositions():Children()[1]
-- Dumps information about the display.
Printf("=============== START OF DUMP ===============")
display1:Dump()
Printf("================ END OF DUMP ================")
end

 This example toggles the Control Bar for display 1 with the help of the DefaultDisplayPositions object:

Lua
return function()
-- Store a handle to display 1 (child 1 of the default displays).
local display1 = DefaultDisplayPositions():Children()[1]
-- Toggles the 'ShowMainMenu' setting.
display1.ShowMainMenu = not display1.ShowMainMenu
end