![]() |
![]() |
![]() |
hildon 2.0.6 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Child Properties | Signals |
HildonCaptionHildonCaption — A single-child container widget that precedes the contained widget with a field label and an optional icon. |
![]() |
enum HildonCaptionStatus; enum HildonCaptionIconPosition; HildonCaption; GtkWidget * hildon_caption_new (GtkSizeGroup *group, const gchar *value, GtkWidget *control, GtkWidget *icon, HildonCaptionStatus flag); GtkSizeGroup * hildon_caption_get_size_group (const HildonCaption *caption); void hildon_caption_set_size_group (const HildonCaption *caption, GtkSizeGroup *new_group); gboolean hildon_caption_is_mandatory (const HildonCaption *caption); void hildon_caption_set_status (HildonCaption *caption, HildonCaptionStatus flag); HildonCaptionStatus hildon_caption_get_status (const HildonCaption *caption); void hildon_caption_set_icon_position (HildonCaption *caption, HildonCaptionIconPosition pos); HildonCaptionIconPosition hildon_caption_get_icon_position (const HildonCaption *caption); void hildon_caption_set_icon_image (HildonCaption *caption, GtkWidget *icon); GtkWidget * hildon_caption_get_icon_image (const HildonCaption *caption); void hildon_caption_set_label (HildonCaption *caption, const gchar *label); gchar * hildon_caption_get_label (const HildonCaption *caption); void hildon_caption_set_separator (HildonCaption *caption, const gchar *separator); gchar * hildon_caption_get_separator (const HildonCaption *caption); void hildon_caption_set_label_alignment (HildonCaption *caption, gfloat alignment); gfloat hildon_caption_get_label_alignment (HildonCaption *caption); void hildon_caption_set_child_expand (HildonCaption *caption, gboolean expand); gboolean hildon_caption_get_child_expand (const HildonCaption *caption); void hildon_caption_set_label_markup (HildonCaption *caption, const gchar *markup);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkEventBox +----HildonCaption
"icon" GtkWidget* : Read / Write "icon-position" HildonCaptionIconPosition : Read / Write "label" gchar* : Read / Write "markup" gchar* : Write "separator" gchar* : Read / Write "size-group" GtkSizeGroup* : Read / Write "status" HildonCaptionStatus : Read / Write
HildonCaption is a single-child container widget that precedes the contained widget with a field label and an optional icon. It allows grouping of several controls together. When a captioned widget has focus, both widget and caption label are displayed with active focus.
typedef enum { HILDON_CAPTION_OPTIONAL = 0, HILDON_CAPTION_MANDATORY } HildonCaptionStatus;
Keys to set the HildonCaption to be optional or mandatory.
typedef enum { HILDON_CAPTION_POSITION_LEFT = 0, HILDON_CAPTION_POSITION_RIGHT } HildonCaptionIconPosition;
Keys to set the icon placement in HildonCaption.
GtkWidget * hildon_caption_new (GtkSizeGroup *group, const gchar *value, GtkWidget *control, GtkWidget *icon, HildonCaptionStatus flag);
Creates a new instance of hildon_caption widget, with a specific control and image. Note: Clicking on a focused caption will trigger the activate signal. The default behaviour for the caption's activate signal is to call gtk_widget_activate on it's control.
Returns
: a GtkWidget pointer of Caption
|
a GtkSizeGroup for controlling the size of related captions, Can be NULL |
|
the caption text to accompany the text entry. The widget makes a copy of this text. |
|
the control that is to be captioned |
|
an icon to accompany the label - can be NULL in which case no icon is displayed |
|
indicates whether this captioned control is mandatory or optional |
Returns : |
GtkSizeGroup * hildon_caption_get_size_group (const HildonCaption *caption);
Query given captioned control for the GtkSizeGroup assigned to it.
Returns
: a GtkSizeGroup
|
a HildonCaption |
Returns : |
void hildon_caption_set_size_group (const HildonCaption *caption, GtkSizeGroup *new_group);
Sets a GtkSizeGroup of a given captioned control.
|
a HildonCaption |
|
a GtkSizeGroup |
gboolean hildon_caption_is_mandatory (const HildonCaption *caption);
Query HildonCaption whether this captioned control is a mandatory one.
Returns
: is this captioned control a mandatory one?
|
a HildonCaption |
Returns : |
void hildon_caption_set_status (HildonCaption *caption, HildonCaptionStatus flag);
Sets HildonCaption status.
|
a HildonCaption |
|
one of the values from HildonCaptionStatus |
HildonCaptionStatus hildon_caption_get_status (const HildonCaption *caption);
Gets HildonCaption status.
Returns
: one of the values from HildonCaptionStatus
|
a HildonCaption |
Returns : |
void hildon_caption_set_icon_position (HildonCaption *caption, HildonCaptionIconPosition pos);
Sets HildonCaption icon position.
|
a HildonCaption |
|
one of the values from HildonCaptionIconPosition |
HildonCaptionIconPosition hildon_caption_get_icon_position (const HildonCaption *caption);
Gets HildonCaption icon position.
Returns
: one of the values from HildonCaptionIconPosition.
|
a HildonCaption |
Returns : |
void hildon_caption_set_icon_image (HildonCaption *caption, GtkWidget *icon);
Sets the icon image widget to be used by this hildon_caption widget.
|
a HildonCaption |
|
the GtkImage to use as the icon. calls gtk_widget_show on the icon if !GTK_WIDGET_VISIBLE(icon) |
GtkWidget * hildon_caption_get_icon_image (const HildonCaption *caption);
Gets icon of HildonCaption
Returns
: the GtkImage widget that is being used as the icon by the
hildon_caption, or NULL if no icon image is in use.
|
a HildonCaption |
Returns : |
void hildon_caption_set_label (HildonCaption *caption, const gchar *label);
Sets the label text that appears before the control. Separator character is added to the end of the label string. By default the separator is ":".
|
a HildonCaption |
|
the text to use |
gchar * hildon_caption_get_label (const HildonCaption *caption);
Gets label of HildonCaption
Returns
: the text currently being used as the label of the caption
control. The string is owned by the label and the caller should never
free or modify this value.
|
a HildonCaption |
Returns : |
void hildon_caption_set_separator (HildonCaption *caption, const gchar *separator);
Sets the separator character that appears after the label. The default seaparator character is ":" separately.
|
a HildonCaption |
|
the separator to use |
gchar * hildon_caption_get_separator (const HildonCaption *caption);
Gets separator string of HildonCaption
Returns
: the text currently being used as the separator of the caption
control. The string is owned by the caption control and the caller should
never free or modify this value.
|
a HildonCaption |
Returns : |
void hildon_caption_set_label_alignment (HildonCaption *caption, gfloat alignment);
Sets the vertical alignment to be used for the text part of the caption. Applications need to align the child control themselves.
|
a HildonCaption widget |
|
new vertical alignment |
gfloat hildon_caption_get_label_alignment (HildonCaption *caption);
Gets current vertical alignment for the text part.
|
a HildonCaption widget |
Returns : |
vertical alignment |
void hildon_caption_set_child_expand (HildonCaption *caption, gboolean expand);
Sets child expandability.
|
a HildonCaption |
|
gboolean to determine if the child is expandable |
gboolean hildon_caption_get_child_expand (const HildonCaption *caption);
Gets childs expandability.
Returns
: wheter the child is expandable or not.
|
a HildonCaption |
Returns : |
void hildon_caption_set_label_markup (HildonCaption *caption, const gchar *markup);
Sets the label markup text that appears before the control. It acts like hildon_caption_set_label but is using the markup text that allows to specify text properties such as bold or italic.
|
a HildonCaption |
|
the markup text to use |
"icon-position"
property"icon-position" HildonCaptionIconPosition : Read / Write
If the icon is positioned on the left or right side.
Default value: HILDON_CAPTION_POSITION_RIGHT
"markup"
property"markup" gchar* : Write
Caption markup. Mutually exclusive with label.
Default value: NULL
"separator"
property"separator" gchar* : Read / Write
The current separator.
Default value: "ecdg_ti_caption_separator"
"size-group"
property "size-group" GtkSizeGroup* : Read / Write
Current size group the caption is in.
"status"
property"status" HildonCaptionStatus : Read / Write
Mandatory or optional status.
Default value: HILDON_CAPTION_OPTIONAL
"expand"
child property"expand" gboolean : Read / Write
Same as GtkBox expand. Wheter the child should be expanded or not.
Default value: FALSE
"activate"
signalvoid user_function (HildonCaption *hildoncaption, gpointer user_data) : Run First / Action
|
the object which received the signal. |
|
user data set when the signal handler was connected. |