![]() |
![]() |
![]() |
Osso Addressbook Reference Manual | ![]() |
---|---|---|---|---|
enum OssoABookButtonStyle; OssoABookButton; GtkWidget* osso_abook_button_new (HildonSizeType size); GtkWidget* osso_abook_button_new_with_text (HildonSizeType size, const char *title, const char *value); GtkWidget* osso_abook_button_new_with_presence (HildonSizeType size, const char *icon_name, const char *title, const char *value, OssoABookPresence *presence); void osso_abook_button_set_style (OssoABookButton *button, OssoABookButtonStyle style); OssoABookButtonStyle osso_abook_button_get_style (OssoABookButton *button); void osso_abook_button_set_title (OssoABookButton *button, const char *title); const char* osso_abook_button_get_title (OssoABookButton *button); void osso_abook_button_set_value (OssoABookButton *button, const char *value); const char* osso_abook_button_get_value (OssoABookButton *button); void osso_abook_button_set_icon_name (OssoABookButton *button, const char *icon_name); const char* osso_abook_button_get_icon_name (OssoABookButton *button); void osso_abook_button_set_icon_visible (OssoABookButton *button, gboolean visible); gboolean osso_abook_button_get_icon_visible (OssoABookButton *button); void osso_abook_button_set_presence (OssoABookButton *button, OssoABookPresence *presence); OssoABookPresence* osso_abook_button_get_presence (OssoABookButton *button); void osso_abook_button_set_presence_visible (OssoABookButton *button, gboolean visible); gboolean osso_abook_button_get_presence_visible (OssoABookButton *button);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkButton +----OssoABookButton
"icon-name" gchar* : Read / Write "icon-visible" gboolean : Read / Write "presence" OssoABookPresence* : Read / Write "presence-visible" gboolean : Read / Write "size" HildonSizeType : Write / Construct Only "style" OssoABookButtonStyle : Read / Write "title" gchar* : Read / Write "value" gchar* : Read / Write
This widget is optimized to performing well in widgets like OssoABookTouchContactStarter. Its layout is similar to HildonButton.
typedef enum { OSSO_ABOOK_BUTTON_STYLE_NORMAL, OSSO_ABOOK_BUTTON_STYLE_PICKER, OSSO_ABOOK_BUTTON_STYLE_LABEL, } OssoABookButtonStyle;
typedef struct _OssoABookButton OssoABookButton;
All the fields of this structure are private to the object's implementation and should never be accessed directly.
GtkWidget* osso_abook_button_new (HildonSizeType size);
Creates a new OssoABookButton at the specified size
.
size : |
a HildonSizeType |
GtkWidget* osso_abook_button_new_with_text (HildonSizeType size, const char *title, const char *value);
Creates a new OssoABookButton at the specified size
and with the specified
title
and value
.
size : |
a HildonSizeType |
title : |
text for the main button title (primary text) |
value : |
text for the button value (secondary text) |
GtkWidget* osso_abook_button_new_with_presence (HildonSizeType size, const char *icon_name, const char *title, const char *value, OssoABookPresence *presence);
Creates a new OssoABookButton at the specified size
and with the specified
title
and value
. If icon_name
is specified, the icon will be displayed
next to the text. if presence
is specified, it will be used to display a
status icon in the button. Whenever the status of presence
changes, the
button will be updated to reflect the current status.
size : |
a HildonSizeType |
icon_name : |
an optional name of a stock icon, or NULL
|
title : |
text for the main button title (primary text) |
value : |
text for the button value (secondary text) |
presence : |
an optional OssoABookPresence, or NULL
|
void osso_abook_button_set_style (OssoABookButton *button, OssoABookButtonStyle style);
Sets the style of button
to style
button : |
a OssoABookButton |
style : |
a OssoABookButtonStyle |
OssoABookButtonStyle osso_abook_button_get_style (OssoABookButton *button);
void osso_abook_button_set_title (OssoABookButton *button, const char *title);
Sets the title of button
to title
button : |
a OssoABookButton |
title : |
the new title for button
|
const char* osso_abook_button_get_title (OssoABookButton *button);
button : |
a OssoABookButton |
Returns : | the title of button
|
void osso_abook_button_set_value (OssoABookButton *button, const char *value);
Sets the value of button
to value
. The value is the secondary text that
is displayed on the second line of the button
button : |
a OssoABookButton |
value : |
the new value for button
|
const char* osso_abook_button_get_value (OssoABookButton *button);
Gets the value of button
. The value is the secondary text that is
displayed on the second line of the button
button : |
a OssoABookButton |
Returns : | the value of button
|
void osso_abook_button_set_icon_name (OssoABookButton *button, const char *icon_name);
Sets the name of the icon to be displayed in button
to icon_name
. To
remove the icon, pass NULL
for icon_name
.
button : |
a OssoABookButton |
icon_name : |
the new icon name for button
|
const char* osso_abook_button_get_icon_name (OssoABookButton *button);
Gets the name of the icon displayed in button
button : |
a OssoABookButton |
Returns : | the icon name |
void osso_abook_button_set_icon_visible (OssoABookButton *button, gboolean visible);
Sets a new value for "icon-visible"
button : |
a OssoABookButton |
visible : |
whether icon should be displayed |
gboolean osso_abook_button_get_icon_visible (OssoABookButton *button);
Gets the current value for "icon-visible"
button : |
a OssoABookButton |
Returns : | TRUE if the icon is visible, else FALSE .
|
void osso_abook_button_set_presence (OssoABookButton *button, OssoABookPresence *presence);
Sets the source to use for presence status information to presence
and
displays a status indicator in button
button : |
a OssoABookButton |
presence : |
a OssoABookPresence object to use as a presence source |
OssoABookPresence* osso_abook_button_get_presence (OssoABookButton *button);
Gets the presence source for button
button : |
a OssoABookButton |
Returns : | the object used as a presence source, if any. |
void osso_abook_button_set_presence_visible (OssoABookButton *button, gboolean visible);
Sets a new value for "presence-visible"
button : |
a OssoABookButton |
visible : |
whether to display presence status in button
|
gboolean osso_abook_button_get_presence_visible (OssoABookButton *button);
Gets the current value for "presence-visible".
button : |
a OssoABookButton |
Returns : | TRUE if presence status is being displayed, else FALSE .
|
"icon-name"
property"icon-name" gchar* : Read / Write
Name of the button's icon.
Default value: NULL
"icon-visible"
property"icon-visible" gboolean : Read / Write
Weither the icon is visible.
Default value: FALSE
"presence"
property"presence" OssoABookPresence* : Read / Write
Presence state for this button.
"presence-visible"
property"presence-visible" gboolean : Read / Write
Weither the presence icon is visible.
Default value: FALSE
"style"
property"style" OssoABookButtonStyle : Read / Write
Visual style of the button.
Default value: OSSO_ABOOK_BUTTON_STYLE_NORMAL
"title"
property"title" gchar* : Read / Write
Text of the button's title label.
Default value: NULL