hildon-libs 0.14.11 Reference Manual |
---|
HildonGridItemHildonGridItem — Creating grid items used by HildonGrid |
enum HildonGridPositionType; enum HildonGridItemIconSizeType; GtkWidget* hildon_grid_item_new (const gchar *icon_basename); GtkWidget* hildon_grid_item_new_with_label (const gchar *icon_basename, const gchar *label); void hildon_grid_item_set_emblem_type (HildonGridItem *item, const gchar *emblem_basename); const gchar* hildon_grid_item_get_emblem_type (HildonGridItem *item); void hildon_grid_item_set_label (HildonGridItem *item, const gchar *label);
HildonGridItem is used to create grid items used by HildonGrid. The grid item consists of an icon and a label. Based on the displaying mode employed by HildonGrid, the label is justified to the right or the bottom.
#include <hildon-widgets/hildon-grid-item.h>
...
static void
create_basic_icons (HildonGrid *grid)
{
w_add_one = hildon_grid_item_new_with_label (
"Calendar", _("Add one"));
w_add_eight = hildon_grid_item_new_with_label (
"Clock", _("Add eight"));
w_disable_next = hildon_grid_item_new_with_label (
"Calculator", _("Disable next"));
w_emblem_next = hildon_grid_item_new_with_label (
"Paint", _("Set emblem"));
emblem_this (w_emblem_next);
gtk_container_add (GTK_CONTAINER (grid), w_add_one);
gtk_container_add (GTK_CONTAINER (grid), w_add_eight);
gtk_container_add (GTK_CONTAINER (grid), w_disable_next);
gtk_container_add (GTK_CONTAINER (grid), w_emblem_next);
}
...
typedef enum { HILDON_GRID_ITEM_LABEL_POS_BOTTOM = 1, HILDON_GRID_ITEM_LABEL_POS_RIGHT } HildonGridPositionType;
typedef enum { HILDON_GRID_ITEM_ICON_27x27 = 1, HILDON_GRID_ITEM_ICON_128x128 } HildonGridItemIconSizeType;
GtkWidget* hildon_grid_item_new (const gchar *icon_basename);
Creates a new HildonGridItem.
icon_basename : |
icon base name |
Returns : | a new HildonGridItem |
GtkWidget* hildon_grid_item_new_with_label (const gchar *icon_basename, const gchar *label);
Creates a new HildonGridItem with a specified label for the icon.
icon_basename : |
icon base name |
label : |
text label for icon |
Returns : | a new HildonGridItem |
void hildon_grid_item_set_emblem_type (HildonGridItem *item, const gchar *emblem_basename);
Sets item emblem type.
item : |
HildonGridItem |
emblem_basename : |
emblem's basename |
const gchar* hildon_grid_item_get_emblem_type (HildonGridItem *item);
item : |
HildonGridItem |
Returns : | emblem's basename. Must not be changed or freed. |
<< HildonGrid | Editors >> |