X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fhildon-button.h;h=d3b703cfe07b8bce216bb4c9f1b66ea25e2fe024;hb=7d3f0468795e7298a98578fbb054b5cb9908d523;hp=36c8ea5e47554e4c571bf75b2df8fb87f2aa7e01;hpb=c6ac995078591d5d3f598830dea12e194d231ea3;p=hildon diff --git a/src/hildon-button.h b/src/hildon-button.h index 36c8ea5..d3b703c 100644 --- a/src/hildon-button.h +++ b/src/hildon-button.h @@ -3,7 +3,7 @@ * * Copyright (C) 2008 Nokia Corporation, all rights reserved. * - * Contact: Karl Lattimer + * Contact: Rodrigo Novo * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser Public License as published by @@ -19,8 +19,7 @@ #ifndef __HILDON_BUTTON_H__ #define __HILDON_BUTTON_H__ -#include -#include "hildon-helper.h" +#include "hildon-gtk.h" G_BEGIN_DECLS @@ -59,11 +58,32 @@ struct _HildonButton GtkButton parent; }; + +/** + * HildonButtonArrangement: + * @HILDON_BUTTON_ARRANGEMENT_HORIZONTAL: Labels are arranged from left to right + * @HILDON_BUTTON_ARRANGEMENT_VERTICAL: Labels are arranged from top to bottom + * + * Describes the arrangement of labels inside a #HildonButton + * + **/ typedef enum { HILDON_BUTTON_ARRANGEMENT_HORIZONTAL, HILDON_BUTTON_ARRANGEMENT_VERTICAL } HildonButtonArrangement; +/** + * HildonButtonStyle: + * @HILDON_BUTTON_STYLE_NORMAL: The button will look like a normal #HildonButton + * @HILDON_BUTTON_STYLE_PICKER: The button will look like a #HildonPickerButton + * + * Describes the visual style of a #HildonButton + **/ +typedef enum { + HILDON_BUTTON_STYLE_NORMAL, + HILDON_BUTTON_STYLE_PICKER +} HildonButtonStyle; + GType hildon_button_get_type (void) G_GNUC_CONST; @@ -77,14 +97,6 @@ hildon_button_new_with_text (HildonSizeType size, const gchar *title, const gchar *value); -GtkWidget * -hildon_button_new_full (HildonSizeType size, - HildonButtonArrangement arrangement, - const gchar *title, - const gchar *value, - GtkSizeGroup *title_size_group, - GtkSizeGroup *value_size_group); - void hildon_button_set_title (HildonButton *button, const gchar *title); @@ -105,9 +117,60 @@ hildon_button_set_text (HildonButton *button, const gchar *value); void -hildon_button_set_size_groups (HildonButton *button, +hildon_button_set_image (HildonButton *button, + GtkWidget *image); + +GtkWidget * +hildon_button_get_image (HildonButton *button); + +void +hildon_button_set_image_position (HildonButton *button, + GtkPositionType position); + +void +hildon_button_set_alignment (HildonButton *button, + gfloat xalign, + gfloat yalign, + gfloat xscale, + gfloat yscale); +void +hildon_button_set_title_alignment (HildonButton *button, + gfloat xalign, + gfloat yalign); + +void +hildon_button_set_value_alignment (HildonButton *button, + gfloat xalign, + gfloat yalign); + +void +hildon_button_set_image_alignment (HildonButton *button, + gfloat xalign, + gfloat yalign); + +void +hildon_button_add_title_size_group (HildonButton *button, + GtkSizeGroup *size_group); +void +hildon_button_add_value_size_group (HildonButton *button, + GtkSizeGroup *size_group); + +void +hildon_button_add_image_size_group (HildonButton *button, + GtkSizeGroup *size_group); + +void +hildon_button_add_size_groups (HildonButton *button, GtkSizeGroup *title_size_group, - GtkSizeGroup *value_size_group); + GtkSizeGroup *value_size_group, + GtkSizeGroup *image_size_group); + +void +hildon_button_set_style (HildonButton *button, + HildonButtonStyle style); + +HildonButtonStyle +hildon_button_get_style (HildonButton *button); G_END_DECLS