GtkMenuToolButton Constructor

GtkMenuToolButton (GtkWidget icon_widget, string label);

Creates a new GtkMenuToolButton with the specified icon widget and label text. Since there is no new_from_stock static method, you should create the GtkImage widget with the new_from_stock constructor method.

Example 102. Open toolbar button with dropdown file menu

//GtkMenuToolButton example

//Create a new toolbar widget
$tb = new GtkToolbar();

//Add an "open" button
$open   = new GtkMenuToolButton(
$tb->insert($open, -1);

//create a menu that will be added to the toolbutton later
$menu = new GtkMenu();
$menu->add(new GtkMenuItem('File 1'));
$menu->add(new GtkMenuItem('File 2'));
$menu->add(new GtkMenuItem('File 3'));
//set the menu and all menuitem visible
//attach the menu to the menu tool button

//Standard window that has the toolbar as only child
$window = new GtkWindow();
$window->connect_simple('destroy', array('Gtk', 'main_quit'));