Package traylib :: Module menu_icon :: Class MenuIcon
[frames] | no frames]

Class MenuIcon

source code

gtk.EventBox --+    
               |    
      object --+    
               |    
       icon.Icon --+
                   |
                  MenuIcon

Instance Methods
 
__init__(self, tray, icon_config, tray_config)
Creates a new Icon.
source code
 
forget_menu(self)
Makes the MenuIcon forget its menu.
source code
 
get_menu_right(self)
Override this to determine the menu that pops up when right-clicking the Icon.
source code
 
click(self, time)
Override this to determine the action when left-clicking the Icon.
source code
 
mouse_wheel_up(self, time)
Override this to determine the action when the mouse wheel is scrolled up.
source code
 
mouse_wheel_down(self, time)
Override this to determine the action when the mouse wheel is scrolled down.
source code
 
update_visibility(self)
Always shows the menu icon.
source code

Inherited from icon.Icon: destroy, get_menu_left, hide, make_emblem, make_has_arrow, make_icon, make_is_drop_target, make_tooltip, make_visibility, make_zoom_factor, set_blinking, show, spring_open, update_emblem, update_has_arrow, update_icon, update_is_drop_target, update_option_edge, update_option_effects, update_option_hidden, update_option_size, update_tooltip, update_zoom_factor, uris_dropped

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  tray = property(lambda self: self.__tray)
  tray_config = property(lambda self: self.__tray_config)

Inherited from icon.Icon: has_arrow, icon, icon_config, is_drop_target, size, tooltip

Properties

Inherited from object: __class__

Method Details

__init__(self, tray, icon_config, tray_config)
(Constructor)

source code 

Creates a new Icon.

Parameters:
  • config - The IconConfig controlling the configuration of this Icon.
Overrides: object.__init__
(inherited documentation)

forget_menu(self)

source code 

Makes the MenuIcon forget its menu. Call this when something affecting the menu has changed.

get_menu_right(self)

source code 

Override this to determine the menu that pops up when right-clicking the Icon.

Returns:
The menu that pops up when right-clicking the Icon.
Overrides: icon.Icon.get_menu_right
(inherited documentation)

click(self, time)

source code 

Override this to determine the action when left-clicking the Icon. If an action was performed, return True, else return False.

Parameters:
  • time - The time of the click event.
Overrides: icon.Icon.click
(inherited documentation)

mouse_wheel_up(self, time)

source code 

Override this to determine the action when the mouse wheel is scrolled up.

Parameters:
  • time - The time of the scroll event.
Overrides: icon.Icon.mouse_wheel_up
(inherited documentation)

mouse_wheel_down(self, time)

source code 

Override this to determine the action when the mouse wheel is scrolled down.

Parameters:
  • time - The time of the scroll event.
Overrides: icon.Icon.mouse_wheel_down
(inherited documentation)

update_visibility(self)

source code 

Always shows the menu icon.

Overrides: icon.Icon.update_visibility