OssoABookButton

OssoABookButton — Rich button widget similar to HildonButton.

Synopsis

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);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkButton
                                       +----OssoABookButton

Implemented Interfaces

OssoABookButton implements AtkImplementorIface and GtkBuildable.

Properties

  "highlighted"              gboolean              : Read / Write
  "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

Description

This widget is optimized to performing well in widgets like OssoABookTouchContactStarter. Its layout is similar to HildonButton.

Details

enum OssoABookButtonStyle

typedef enum {
        OSSO_ABOOK_BUTTON_STYLE_NORMAL,
        OSSO_ABOOK_BUTTON_STYLE_PICKER,
        OSSO_ABOOK_BUTTON_STYLE_LABEL,
        OSSO_ABOOK_BUTTON_STYLE_NOTE,
} OssoABookButtonStyle;

OSSO_ABOOK_BUTTON_STYLE_NORMAL The button will look like a HildonButton
OSSO_ABOOK_BUTTON_STYLE_PICKER The button will look like a HildonPickerButton
OSSO_ABOOK_BUTTON_STYLE_LABEL The button will look and behave like a single line label rather than a button
OSSO_ABOOK_BUTTON_STYLE_NOTE The button will look and behave like a multiline label rather than a button

OssoABookButton

typedef struct _OssoABookButton OssoABookButton;

All the fields of this structure are private to the object's implementation and should never be accessed directly.


osso_abook_button_new ()

GtkWidget*          osso_abook_button_new               (HildonSizeType size);

Creates a new OssoABookButton at the specified size.

size : a HildonSizeType

osso_abook_button_new_with_text ()

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)

osso_abook_button_new_with_presence ()

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

osso_abook_button_set_style ()

void                osso_abook_button_set_style         (OssoABookButton *button,
                                                         OssoABookButtonStyle style);

Sets the style of button to style

button : a OssoABookButton
style : a OssoABookButtonStyle

osso_abook_button_get_style ()

OssoABookButtonStyle osso_abook_button_get_style        (OssoABookButton *button);

osso_abook_button_set_title ()

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

osso_abook_button_get_title ()

const char*         osso_abook_button_get_title         (OssoABookButton *button);

button : a OssoABookButton
Returns : the title of button

osso_abook_button_set_value ()

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

osso_abook_button_get_value ()

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

osso_abook_button_set_icon_name ()

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

osso_abook_button_get_icon_name ()

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

osso_abook_button_set_icon_visible ()

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

osso_abook_button_get_icon_visible ()

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.

osso_abook_button_set_presence ()

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

osso_abook_button_get_presence ()

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.

osso_abook_button_set_presence_visible ()

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

osso_abook_button_get_presence_visible ()

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.

Property Details

The "highlighted" property

  "highlighted"              gboolean              : Read / Write

Wether to highlight the title text.

Default value: FALSE


The "icon-name" property

  "icon-name"                gchar*                : Read / Write

Name of the button's icon.

Default value: NULL


The "icon-visible" property

  "icon-visible"             gboolean              : Read / Write

Weither the icon is visible.

Default value: FALSE


The "presence" property

  "presence"                 OssoABookPresence*    : Read / Write

Presence state for this button.


The "presence-visible" property

  "presence-visible"         gboolean              : Read / Write

Weither the presence icon is visible.

Default value: FALSE


The "size" property

  "size"                     HildonSizeType        : Write / Construct Only

Size request for the button.


The "style" property

  "style"                    OssoABookButtonStyle  : Read / Write

Visual style of the button.

Default value: OSSO_ABOOK_BUTTON_STYLE_NORMAL


The "title" property

  "title"                    gchar*                : Read / Write

Text of the button's title label.

Default value: NULL


The "value" property

  "value"                    gchar*                : Read / Write

Text of the button's value label.

Default value: NULL