StTooltip

StTooltip — A tooltip widget

Synopsis

struct              StTooltip;
struct              StTooltipClass;
void                (*StTooltipConstrainFunc)           (StTooltip *tooltip,
                                                         const ClutterGeometry *geometry,
                                                         ClutterGeometry *adjusted_geometry,
                                                         gpointer data);
const gchar *       st_tooltip_get_label                (StTooltip *tooltip);
const ClutterGeometry * st_tooltip_get_tip_area         (StTooltip *tooltip);
void                st_tooltip_set_constrain_func       (ClutterStage *stage,
                                                         StTooltipConstrainFunc func,
                                                         gpointer data,
                                                         GDestroyNotify notify);
void                st_tooltip_set_label                (StTooltip *tooltip,
                                                         const gchar *text);
void                st_tooltip_set_tip_area             (StTooltip *tooltip,
                                                         const ClutterGeometry *area);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----StWidget
                     +----StTooltip

Implemented Interfaces

StTooltip implements ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

Properties

  "label"                    gchar*                : Read / Write
  "tip-area"                 ClutterGeometry*      : Read / Write

Description

StTooltip implements a single tooltip. It should not normally be created by the application but by the widget implementing tooltip capabilities, for example, #st_button_set_tooltip().

Details

struct StTooltip

struct StTooltip;

The contents of this structure is private and should only be accessed using the provided API.


struct StTooltipClass

struct StTooltipClass {
  StWidgetClass parent_class;
};

StTooltipConstrainFunc ()

void                (*StTooltipConstrainFunc)           (StTooltip *tooltip,
                                                         const ClutterGeometry *geometry,
                                                         ClutterGeometry *adjusted_geometry,
                                                         gpointer data);

tooltip :

the StTooltip that is being positioned

geometry :

size and position of the tooltip without any constraints

adjusted_geometry :

new position of the tooltip. The width and height fields will be ignored. [out]

data :

user data passed to st_tooltip_set_constrain_func(). [closure]

st_tooltip_get_label ()

const gchar *       st_tooltip_get_label                (StTooltip *tooltip);

Get the text displayed on the tooltip

tooltip :

a StTooltip

Returns :

the text for the tooltip. This must not be freed by the application

st_tooltip_get_tip_area ()

const ClutterGeometry * st_tooltip_get_tip_area         (StTooltip *tooltip);

Retrieve the area on the stage that the tooltip currently applies to

tooltip :

A StTooltip

Returns :

the ClutterGeometry, owned by the tooltip which must not be freed by the application.

st_tooltip_set_constrain_func ()

void                st_tooltip_set_constrain_func       (ClutterStage *stage,
                                                         StTooltipConstrainFunc func,
                                                         gpointer data,
                                                         GDestroyNotify notify);

Sets a callback function that will be used to constrain the position of tooltips within stage. This can be used, for example, if the stage spans multiple monitors and tooltips should be positioned not to cross monitors.

stage :

a ClutterStage

func :

function to be called to constrain tooltip position. [allow-none]

data :

user data to pass to func. [allow-none]

notify :

function to be called when data is no longer needed. [allow-none]

st_tooltip_set_label ()

void                st_tooltip_set_label                (StTooltip *tooltip,
                                                         const gchar *text);

Sets the text displayed on the tooltip

tooltip :

a StTooltip

text :

text to set the label to

st_tooltip_set_tip_area ()

void                st_tooltip_set_tip_area             (StTooltip *tooltip,
                                                         const ClutterGeometry *area);

Set the area on the stage that the tooltip applies to.

tooltip :

A StTooltip

area :

A ClutterGeometry

Property Details

The "label" property

  "label"                    gchar*                : Read / Write

Label of the tooltip.

Default value: NULL


The "tip-area" property

  "tip-area"                 ClutterGeometry*      : Read / Write

Area on the stage the tooltip applies to.