StockItem

Constructors

this
this(GtkStockItem* gtkStockItem, bool ownedRef)

Sets our main struct and passes it to the parent class.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

copy
StockItem copy()

Copies a stock item, mostly useful for language bindings and not in applications.

free
void free()

Frees a stock item allocated on the heap, such as one returned by gtk_stock_item_copy(). Also frees the fields inside the stock item, if they are not %NULL.

getStockItemStruct
GtkStockItem* getStockItemStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

Properties

keyval
uint keyval [@property getter]
uint keyval [@property setter]

Keyboard accelerator

label
string label [@property getter]
string label [@property setter]

User visible label.

modifier
GdkModifierType modifier [@property getter]
GdkModifierType modifier [@property setter]

Modifier type for keyboard accelerator

stockId
string stockId [@property getter]
string stockId [@property setter]

Identifier.

translationDomain
string translationDomain [@property getter]
string translationDomain [@property setter]

Translation domain of the menu or toolbar item

Static functions

stockAdd
void stockAdd(StockItem[] items)

Registers each of the stock items in @items. If an item already exists with the same stock ID as one of the @items, the old item gets replaced. The stock items are copied, so GTK+ does not hold any pointer into @items and @items can be freed. Use gtk_stock_add_static() if @items is persistent and GTK+ need not copy the array.

stockAddStatic
void stockAddStatic(StockItem[] items)

Same as gtk_stock_add(), but doesn’t copy @items, so @items must persist until application exit.

stockListIds
ListSG stockListIds()

Retrieves a list of all known stock IDs added to a #GtkIconFactory or registered with gtk_stock_add(). The list must be freed with g_slist_free(), and each string in the list must be freed with g_free().

stockLookup
bool stockLookup(string stockId, StockItem item)

Fills @item with the registered values for @stock_id, returning %TRUE if @stock_id was known.

stockSetTranslateFunc
void stockSetTranslateFunc(string domain, GtkTranslateFunc func, void* data, GDestroyNotify notify)

Sets a function to be used for translating the @label of a stock item.

Variables

gtkStockItem
GtkStockItem* gtkStockItem;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta