GtkFC API Reference version 0.1.0

Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Examples  

GmenuItem Class Reference

#include <Gmenus.h>

Inheritance diagram for GmenuItem:

Gwidget Gobject List of all members.

Public Methods

 GmenuItem (Gstring label)
 GmenuItem (const char *label)
 GmenuItem (Gstring *references[])
 ~GmenuItem ()
void SetMenu (Gmenu *w)
bool Init ()
void OnEvent (GdkEvent *e, void *user_data)
virtual void OnAction (Gwidget *w, GdkEvent *e)
Gstring GetText ()

Detailed Description

A GmenuItem is a widget displayed in a Gmenu or a GmenuBar. It can send Event to its parent.
Author(s):
Thibaut Nicolas
Version:
0.1.0
 Gstring *menu_fichier[] = {new Gstring("Fichier"), new Gstring("Ouvrir"), new Gstring("Sauver"), new Gstring("Quitter"), NULL};
 barre = new GmenuBar();
 barre->Append(new GmenuItem(menu_fichier));


Constructor & Destructor Documentation

GmenuItem::GmenuItem ( Gstring * references[] )
 

Create a menu item with an associed Gmenu and GmenuItems inserted in the Gmenu. The label of the items is the Gstrings of the array references

Parameters:
references   An array of Gstring* to determine the labels of the menuitems


Member Function Documentation

Gstring GmenuItem::GetText ( )
 

Return the label of the menu item

bool GmenuItem::Init ( ) [virtual]
 

Init the widget

Reimplemented from Gwidget.

virtual void GmenuItem::OnAction ( Gwidget * w,
GdkEvent * e ) [virtual]
 

Action performed when a child widget sent an event

Reimplemented from Gwidget.

void GmenuItem::OnEvent ( GdkEvent * e,
void * user_data ) [virtual]
 

Action performed when an event occur

Reimplemented from Gwidget.

void GmenuItem::SetMenu ( Gmenu * w )
 

Assign a submenu to the menuitem


The documentation for this class was generated from the following file:

Copyright © 2002 Thibaut Nicolas
Last modified  lun sep 23 23:41:26 EDT 2002