BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Defines | Functions | Variables
gxkstock.hh File Reference
#include <gxk/gxkutils.hh>

Go to the source code of this file.

Classes

struct  GxkStockIcon
struct  GxkStockItem

Defines

#define GXK_ICON_SIZE_BUTTON
#define GXK_ICON_SIZE_BIG_BUTTON
#define GXK_ICON_SIZE_CANVAS
#define GXK_ICON_SIZE_TOOLBAR
#define GXK_ICON_SIZE_MENU
#define GXK_ICON_SIZE_TABULATOR
#define GXK_ICON_SIZE_INFO_SIGN
#define GXK_ICON_SIZE_PALETTE

Functions

guint gxk_size_width (GtkIconSize icon_size)
guint gxk_size_height (GtkIconSize icon_size)
GtkWidget * gxk_stock_image (const gchar *stock_icon_id, GtkIconSize icon_size)
GtkWidget * gxk_stock_button (const gchar *stock_id, const gchar *label)
GtkWidget * gxk_stock_button_child (const gchar *stock_id, const gchar *label)
const gchar * gxk_stock_item (const gchar *stock_id)
GdkPixbuf * gxk_stock_fallback_pixbuf (const gchar *stock_id)
GtkWidget * gxk_stock_icon_window (const gchar *stock_id)
void gxk_stock_register_icon (const GxkStockIcon *icon)
void gxk_stock_register_icons (guint n_icons, const GxkStockIcon *icons)
void gxk_stock_register_item (const GxkStockItem *item)
void gxk_stock_register_items (guint n_items, const GxkStockItem *items)

Variables

GtkIconSize gxk_size_button
GtkIconSize gxk_size_big_button
GtkIconSize gxk_size_canvas
GtkIconSize gxk_size_toolbar
GtkIconSize gxk_size_menu
GtkIconSize gxk_size_tabulator
GtkIconSize gxk_size_info_sign
GtkIconSize gxk_size_palette

Detailed Description


Function Documentation

guint gxk_size_height ( GtkIconSize  icon_size)
Parameters:
icon_sizeimage size id
Returns:
image size height

Return the height of a specific image size.

guint gxk_size_width ( GtkIconSize  icon_size)
Parameters:
icon_sizeimage size id
Returns:
image size width

Return the width of a specific image size.

GtkWidget* gxk_stock_button ( const gchar *  stock_id,
const gchar *  label 
)
Parameters:
stock_idstock name
labelbutton text
Returns:
a visible GtkButton widget

Create a GtkButton widget with a stock image and custom label text.

GtkWidget* gxk_stock_button_child ( const gchar *  stock_id,
const gchar *  label 
)
Parameters:
stock_idstock name
labelbutton text
Returns:
a visible widget suitable as GtkButton child

This function does the same as gxk_stock_button() except for creating the actual button. The button's child is instead returned to the caller, this might e.g. be useful if a button is created containing multiple children which are shown only selectively during runtime.

GdkPixbuf* gxk_stock_fallback_pixbuf ( const gchar *  stock_id)
Parameters:
stock_idstock name
Returns:
this stock_id's pixbuf (or NULL for invalid stock ids)

Return the pixbuf associated with stock_id, the pixbuf is owned by the stock system and persists throughout runtime. To display stock icons in widgets use gxk_stock_image() and not this pixbuf.

GtkWidget* gxk_stock_icon_window ( const gchar *  stock_id)
Parameters:
stock_ida valid stock icon name
Returns:
a window showing the stock icon

Create a window displaying a stock icon which is transparent according to the icon's alpha mask. Such windows are mostly useful to implement drag-and-drop operations with stock icons.

GtkWidget* gxk_stock_image ( const gchar *  stock_icon_id,
GtkIconSize  icon_size 
)
Parameters:
stock_icon_idstock name
icon_sizeimage size
Returns:
a visible GtkImage widget or NULL

Create a GtkImage widget with a stock image of a certain size, or return NULL if the image doesn't exist. The returned image widget correctly displays the stock icon, honouring prelight and sensitivity state of the widget.

void gxk_stock_register_icon ( const GxkStockIcon icon)
Parameters:
icona validly filled out GxkStockIcon

Register a new stock icon from an inlined pixbuf. The inlined pixbuf pixels are not copied, so the caller must make sure for the data to remain valid.

void gxk_stock_register_icons ( guint  n_icons,
const GxkStockIcon icons 
)
Parameters:
n_iconsnumber of icons to register
iconsa validly filled out array of GxkStockIcon

For all n_icons contained in icons, call gxk_stock_register_icon().

void gxk_stock_register_item ( const GxkStockItem item)
Parameters:
itema validly filled out GxkStockItem

Register a new stock item. The new stock item item->stock_id is registered with an item label of item->label and the stock icon item->stock_fallback. If item->label is NULL, item->stock_fallback must not be NULL, and item->stock_id becomes merely an alias of item->stock_fallback.

void gxk_stock_register_items ( guint  n_items,
const GxkStockItem items 
)
Parameters:
n_itemsnumber of items to register
itemsa validly filled out array of GxkStockItem

For all n_items contained in items, call gxk_stock_register_item().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines