GtkTooltips Constructor

Creates a new tooltips object. After instantiating the object, you can begin to add tooltips for widgets with set_tip() .

Example 126. Adding a tooltip to a button

<?php
$tt = new GtkTooltips();

$btn = new GtkButton('Quit');
$btn->connect_simple('clicked', array('Gtk', 'main_quit'));

//set the tip
$tt->set_tip(
    //widget to set the tip of
    $btn,
    //normal tooltip
    'Quits the application',
    //longer description
    'If you press this button, then'
    . ' the application ends its life.'
);


//create the window, add the button
$wnd = new GtkWindow();
$wnd->connect_simple('destroy', array('Gtk', 'main_quit'));
$wnd->add($btn);
$wnd->show_all();
Gtk::main();
?>