sidebar.toggleDrawerVisibility

Toggles the visibility of the sidebar drawer.

Syntax

ui.Interface.frontCall("sidebar", "toggleDrawerVisibility",
   [], [result])
  1. result - The resulting visibility of the drawer: 1 if visible, 0 if hidden.

Usage

The "toggleDrawerVisibility" front call switches the SideBarDrawer, the panel holding the application list and the start menu, between visible and hidden.

This call reports the drawer's actual visibility after it runs, rather than nothing. That way, the program can tell when the call refuses a request. The call refuses a request in any of the following cases:

  • The drawer is empty.
  • The drawer is docked. The call always refuses to hide a docked drawer, and never changes the docking state itself.
  • There is no drawer at all, for instance in direct mode, where the host provides its own launcher.

The sidebar.isDrawerVisible front call retrieves the current visibility, and the sidebar.setDrawerVisible front call sets it explicitly.

Example

DEFINE visible INTEGER
CALL ui.Interface.frontCall("sidebar", "toggleDrawerVisibility", [], [visible])
IF visible == 0 THEN
   -- request was refused, or the drawer is now hidden
END IF