Module tooltips :: Class BaseTooltip
[hide private]
[frames] | no frames]

Class BaseTooltip

source code


Base Tooltip class

        Usage:
                tooltip = BaseTooltip()
                ....
                tooltip.show_tooltip(data, widget_height, widget_y_position)
                ....
                if tooltip.timeout != 0:
                        tooltip.hide_tooltip()

        * data - the text to be displayed  (extenders override this argument and
                display more complex contents)
        * widget_height  - the height of the widget on which we want to show tooltip
        * widget_y_position - the vertical position of the widget on the screen

        Tooltip is displayed aligned centered to the mouse poiner and 4px below the widget.
        In case tooltip goes below the visible area it is shown above the widget.

Instance Methods [hide private]
 
__init__(self) source code
 
populate(self, data)
This method must be overriden by all extenders.
source code
 
create_window(self)
Create a popup window each time tooltip is requested
source code
 
_get_icon_name_for_tooltip(self, contact)
Helper function used for tooltip contacts/acounts
source code
 
motion_notify_event(self, widget, event) source code
 
on_size_request(self, widget, requisition) source code
 
expose(self, widget, event) source code
 
show_tooltip(self, data, widget_height, widget_y_position)
Show tooltip on widget
source code
 
hide_tooltip(self) source code
Static Methods [hide private]
 
colorize_status(status)
Colorize the status message inside the tooltip by it's semantics.
source code
 
colorize_affiliation(affiliation)
Color the affiliation of a MUC participant inside the tooltip by it's semantics.
source code
Method Details [hide private]

__init__(self)
(Constructor)

source code 

populate(self, data)

source code 
This method must be overriden by all extenders. This is the most simple implementation: show data as value of a label

create_window(self)

source code 
Create a popup window each time tooltip is requested

_get_icon_name_for_tooltip(self, contact)

source code 

Helper function used for tooltip contacts/acounts

Tooltip on account has fake contact with sub == '', in this case we show real status of the account

motion_notify_event(self, widget, event)

source code 

on_size_request(self, widget, requisition)

source code 

expose(self, widget, event)

source code 

show_tooltip(self, data, widget_height, widget_y_position)

source code 

Show tooltip on widget

Data contains needed data for tooltip contents. widget_height is the height of the widget on which we show the tooltip. widget_y_position is vertical position of the widget on the screen.

hide_tooltip(self)

source code 

colorize_status(status)
Static Method

source code 
Colorize the status message inside the tooltip by it's semantics. Color palette is the Tango.

colorize_affiliation(affiliation)
Static Method

source code 
Color the affiliation of a MUC participant inside the tooltip by it's semantics. Color palette is the Tango.