Building a submenu in a GtkMenubar.

A short tutorial showing how to build a submenu in GtkMenubar. You can refer to the complete GtkMenubar tutorial for full explanations.

Building a GtkMenubar

Here is a quick overview of how to build a menu bar using php-gtk2 widgets. Think of it as a cheat sheet on menubar and friends.

GtkMenubar example overview The goal of this page is to list the most important objects and methods needed to build a basic menubar. You can use this document to write your own function or menubar class builder. We try to keep this document as simple as possible, not to show all advanced mechanisms.

Extending GtkMenu class for Popup menu dialog

GtkWidget popup menu example Here is a quick way to build a popup menu supporting event registration from a GtkWidget. Menu items are passed to the class constructor as a list of labels. This class emits activate signals with full context (x,y coordinates, button ...).

Add icons to GtkMenu

The goal: icons in menus

When creating a soft, you'll often want to have a menu like in the majority of graphical softs. It's often clear in your mind but require more code than you want to do simple things using a plain GtkMenu. So here's a class to help you to quickly design such menus and will also allow you to display nice icon in your menus.

Activate menu bar with ALT key

This enables a user to activate the menu without using the mouse or combining keys, just by pressing ALT. This can be important for accessibility.

Syndicate content