Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::StockItem Class Reference

A GtkStockItem C++ wrapper class. More...

`#include <inti/gtk/stock.h>`

List of all members.

## Public Member Functions

Constructors

- StockItem ()
    Construct a new stock item.

Accessors

- GtkStockItem * gtk_stock_item () const
    Get a pointer to the GtkStockItem structure.
- const char * stock_id () const
    Returns the stock_id for the stock item.
- const char * label () const
    Returns the user-visible label for the stock item.
- Gdk::ModifierTypeField modifier () const
    Gets the modifier combination of the keyboard accelerator for the stock item.
- unsigned int keyval () const
    Gets the key value of the keyboard accelerator for the stock item.
- const char * translation_domain () const
    Returns the translation domain for the stock item.
- AccelKey accel_key () const
    Returns an AccelKey object for the keyboard accelerator.

## Detailed Description

A GtkStockItem C++ wrapper class.

Stock items represent commonly-used menu or toolbar items such as "Open" or "Exit". Each stock item is identified by a stock ID; stock IDs are just strings, but macros such as GTK_STOCK_OPEN are provided to avoid typing mistakes in the strings. Applications can register their own stock items in addition to those built-in to GTK+.

Each stock ID can be associated with a StockItem, which contains the user-visible label, keyboard accelerator, and translation domain of the menu or toolbar item; and/or with an icon stored in an IconFactory. See IconFactory for more information on stock icons. The connection between a StockItem and stock icons is purely conventional (by virtue of using the same stock ID); it's possible to register a stock item but no icon, and vice versa.

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

- stock.h

Main Page - Footer