GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::Gtk::ImageMenuItem Class Reference

A GtkImageMenuItem C++ wrapper class. More...

#include <gfc/gtk/imagemenuitem.hh>

Inheritance diagram for GFC::Gtk::ImageMenuItem:

GFC::Gtk::MenuItem GFC::Gtk::Item GFC::Gtk::Bin GFC::Gtk::Container GFC::Gtk::Widget GFC::Gtk::Object GFC::Atk::Implementor GFC::G::Object GFC::G::TypeInterface GFC::G::TypeInstance GFC::G::TypeInstance GFC::Trackable GFC::Trackable List of all members.

Public Member Functions

Constructors
Accessors
Methods

Protected Member Functions

Constructors

Detailed Description

A GtkImageMenuItem C++ wrapper class.

ImageMenuItem is a MenuItem widget that displays an image at the left side of the menu item text.


Constructor & Destructor Documentation

GFC::Gtk::ImageMenuItem::ImageMenuItem GtkImageMenuItem *  menu_item,
bool  owns_reference = false
[explicit, protected]
 

Construct a new ImageMenuItem from an existing GtkImageMenuItem.

Parameters:
menu_item A pointer to a GtkImageMenuItem.
owns_reference Set false if the initial reference count is floating, set true if it's not.

The menu_item can be a newly created GtkImageMenuItem or an existing GtkImageMenuItem (see G::Object::Object).

GFC::Gtk::ImageMenuItem::ImageMenuItem const String label,
bool  use_underline = false
[explicit]
 

Constructs a new ImageMenuItem containing a label.

Parameters:
label The text of the menu item.
use_underline Set true if label contains a mnemonic character.

If characters in label are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use '__' (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic. Pressing Alt and that key activates the menu item.

GFC::Gtk::ImageMenuItem::ImageMenuItem Widget image,
const String label,
bool  use_underline = false
 

Constructs a new ImageMenuItem containing an image and a label.

Parameters:
image A widget to set as the image for the menu item.
label The text of the menu item.
use_underline Set true if label contains a mnemonic character.

If characters in label are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use '__' (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic. Pressing Alt and that key activates the menu item.

GFC::Gtk::ImageMenuItem::ImageMenuItem Widget image,
const String label,
Menu submenu,
bool  use_underline = false
 

Constructs a new ImageMenuItem that displays a submenu.

Parameters:
image A widget to set as the image for the menu item.
label The text of the menu item.
submenu The submenu under this menu item.
use_underline Set true if label contains a mnemonic character.

If characters in label are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use '__' (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic. Pressing Alt and that key activates the menu item.

GFC::Gtk::ImageMenuItem::ImageMenuItem const StockId stock_id,
AccelGroup accel_group = 0
 

Create a new ImageMenuItem containing the image and text from a stock item.

Parameters:
stock_id The ID of the stock item.
accel_group The AccelGroup to add the menu items accelerator to, or null.

Some stock ids have preprocessor macros like Gtk::StockId::OK and Gtk::StockId::APPLY. If you want this menu item to have changeable accelerators, then pass in null for accel_group and call Gtk::MenuItem::set_accel_path() with an appropriate path for the menu item, then use Gtk::Stock::lookup() too look up the standard accelerator for the stock item and if one is found, call Gtk::AccelMap::add_entry() to register it.


Member Function Documentation

void GFC::Gtk::ImageMenuItem::set_image const StockId stock_id  ) 
 

Sets the image of ImageMenuItem to the given stock icon.

Parameters:
stock_id The ID of the stock icon to set as the image for the menu item.

void GFC::Gtk::ImageMenuItem::set_image Widget image  ) 
 

Sets the image of ImageMenuItem to the given widget.

Parameters:
image A widget to set as the image for the menu item.


The documentation for this class was generated from the following file:
Generated on Tue Aug 24 00:34:40 2004 for GFC-UI by doxygen 1.3.8