Package traylib :: Module icon :: Class Icon
[frames] | no frames]

Class Icon

source code

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

Instance Methods
 
__init__(self, config)
Creates a new Icon.
source code
 
set_blinking(self, blinking, time=500)
Makes the Icon blink or stops it from blinking.
source code
 
update_emblem(self)
Updates the emblem by calling make_emblem()
source code
 
update_icon(self)
Updates the icon by calling make_icon()
source code
 
update_is_drop_target(self)
Updates whether URIs can be dropped on the Icon.
source code
 
update_has_arrow(self)
Updates the arrow by calling make_has_arrow()
source code
 
update_tooltip(self)
Updates the tooltip by calling make_tooltip()
source code
 
update_visibility(self)
Updates the visibility by calling make_visibility()
source code
 
update_zoom_factor(self)
Updates the zoom factor by calling make_zoom_factor().
source code
 
destroy(self)
Zooms out the Icon before destroying it.
source code
 
hide(self)
Zooms out the Icon before hiding it.
source code
 
show(self)
Zooms in the Icon after showing it.
source code
 
update_option_edge(self)
Updates the edge the Icon is at.
source code
 
update_option_effects(self)
Updates the effects of the Icon.
source code
 
update_option_size(self)
Updates the Icon's size.
source code
 
update_option_hidden(self) source code
 
get_menu_right(self)
Override this to determine the menu that pops up when right-clicking the Icon.
source code
 
get_menu_left(self)
Override this to determine the menu that pops up when left-clicking the Icon.
source code
 
click(self, time=0L)
Override this to determine the action when left-clicking the Icon.
source code
 
mouse_wheel_up(self, time=0L)
Override this to determine the action when the mouse wheel is scrolled up.
source code
 
mouse_wheel_down(self, time=0L)
Override this to determine the action when the mouse wheel is scrolled down.
source code
 
uris_dropped(self, uris, action=gtk.gdk.ACTION_COPY)
Override this to react to URIs being dropped on the Icon.
source code
 
spring_open(self, time=0L)
Override this to determine the action when the mouse pointer stays on an icon some time while dragging.
source code
 
make_emblem(self)
Override this to determine the emblem to be shown in the upper left corner.
source code
 
make_has_arrow(self)
Override this to determine whether the Icon has an arrow or not.
source code
 
make_icon(self)
Override this to determine the gtk.gdk.Pixbuf the Icon should have.
source code
 
make_is_drop_target(self)
Override this to determine whether URIs can be dropped on the Icon or not.
source code
 
make_tooltip(self)
Override this to determine the tooltip.
source code
 
make_visibility(self)
Override this to determine the visibility.
source code
 
make_zoom_factor(self)
Extend this to determine the zoom factor.
source code

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

Class Variables
  icon_config = property(lambda self: self.__config)
The Icon's configuration.
  icon = property(lambda self: self.__pixbuf)
The pixbuf of the Icon.
  size = property(lambda self: self.__config.size)
The size of the Icon.
  tooltip = property(lambda self: self.__tooltip)
The tooltip of the Icon.
  has_arrow = property(lambda self: self.__has_arrow)
True if the Icon has an arrow.
  is_drop_target = property(lambda self: self.__is_drop_target)
True if uris can be dropped on the Icon.
Properties

Inherited from object: __class__

Method Details

__init__(self, config)
(Constructor)

source code 

Creates a new Icon.

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

set_blinking(self, blinking, time=500)

source code 

Makes the Icon blink or stops it from blinking.

Parameters:
  • blinking - If True, makes the Icon blink, if False stops it from blinking.
  • time - The time between two blink states (in ms).

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.

get_menu_left(self)

source code 

Override this to determine the menu that pops up when left-clicking the Icon. (In case the click() method returned False.)

Returns:
The menu that pops up when left-clicking the Icon.

click(self, time=0L)

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.

mouse_wheel_up(self, time=0L)

source code 

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

Parameters:
  • time - The time of the scroll event.

mouse_wheel_down(self, time=0L)

source code 

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

Parameters:
  • time - The time of the scroll event.

uris_dropped(self, uris, action=gtk.gdk.ACTION_COPY)

source code 

Override this to react to URIs being dropped on the Icon.

Parameters:
  • uris - A list of URIs.
  • action - One of gtk.gdk.ACTION_COPY, gtk.gdk.ACTION_MOVE or gtk.gdk.ACTION_LINK.

spring_open(self, time=0L)

source code 

Override this to determine the action when the mouse pointer stays on an icon some time while dragging.

Returns:
True if spring_open() should be called again in a second.

make_emblem(self)

source code 

Override this to determine the emblem to be shown in the upper left corner.

Returns:
The new emblem.

make_has_arrow(self)

source code 

Override this to determine whether the Icon has an arrow or not.

Returns:
True if the Icon should have an arrow.

make_icon(self)

source code 

Override this to determine the gtk.gdk.Pixbuf the Icon should have.

Returns:
The new pixbuf.

make_is_drop_target(self)

source code 

Override this to determine whether URIs can be dropped on the Icon or not.

Returns:
True if URIs may be dropped on the Icon.

make_tooltip(self)

source code 

Override this to determine the tooltip.

Returns:
The new tooltip.

make_visibility(self)

source code 

Override this to determine the visibility.

Returns:
True if the Icon should be visible.

make_zoom_factor(self)

source code 

Extend this to determine the zoom factor.

Returns:
The new zoom factor.