Package traylib :: Module winmenu :: Class WindowMenu
[frames] | no frames]

Class WindowMenu

source code

gtk.Menu --+
           |
          WindowMenu

The menu for a list of windows.

Instance Methods
 
__init__(self, windows, type, icon, group_name, root=None, root_icon=None, has_kill=False)
Creates a new WindowMenu.
source code
 
get_windows(self)
Returns: The windows belonging to the WindowMenu.
source code
Method Details

__init__(self, windows, type, icon, group_name, root=None, root_icon=None, has_kill=False)
(Constructor)

source code 

Creates a new WindowMenu.

Parameters:
  • windows - A list of wnck.Windows.
  • type - The type of the menu.

    TYPE_SELECT: A menu from which a window can be selected to be activated.

    TYPE_OPTIONS: A menu which shows a submenu for each window, "hide all" or "show all" and "close all" menu items. If has_kill is True, it also contains a "force quit" menu entry.

  • root - If not None, indicates that the windows are filemanager windows and the path prefix "root" should not be omitted.
  • root_icon - The icon to show for the root menu entry. This is the menu entry showing root.
  • has_kill - If True and type==TYPE_OPTIONS, the menu contains a "kill" menu entry which kills the process the windows belong to. If the windows belong to different processes, each submenu has its own "kill" menu entry.

get_windows(self)

source code 
Returns:
The windows belonging to the WindowMenu.