OssoABookContactFieldSelector

OssoABookContactFieldSelector — A Widget for selecting a contact field

Synopsis

                    OssoABookContactFieldSelector;
GtkWidget*          osso_abook_contact_field_selector_new
                                                        (void);
void                osso_abook_contact_field_selector_load
                                                        (OssoABookContactFieldSelector *selector,
                                                         OssoABookContact *contact,
                                                         OssoABookContactFieldPredicate accept_field,
                                                         gpointer user_data);
void                osso_abook_contact_field_selector_append
                                                        (OssoABookContactFieldSelector *selector,
                                                         OssoABookContactField *field);
OssoABookContactField* osso_abook_contact_field_selector_get_selected
                                                        (OssoABookContactFieldSelector *selector);
int                 osso_abook_contact_field_selector_find_custom
                                                        (OssoABookContactFieldSelector *selector,
                                                         OssoABookContactFieldPredicate accept_field,
                                                         gpointer user_data);
GList*              osso_abook_contact_field_selector_get_selected_fields
                                                        (OssoABookContactFieldSelector *selector);
void                osso_abook_contact_field_selector_set_show_values
                                                        (OssoABookContactFieldSelector *selector,
                                                         gboolean value);
gboolean            osso_abook_contact_field_selector_get_show_values
                                                        (OssoABookContactFieldSelector *selector);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkVBox
                                       +----HildonTouchSelector
                                             +----OssoABookContactFieldSelector

Implemented Interfaces

OssoABookContactFieldSelector implements AtkImplementorIface and GtkBuildable.

Properties

  "show-values"              gboolean              : Read / Write

Description

This module provides the OssoABookContactFieldSelector class, which is a widget that allows the user to select a contact field from a list of available fields

Details

OssoABookContactFieldSelector

typedef struct _OssoABookContactFieldSelector OssoABookContactFieldSelector;

osso_abook_contact_field_selector_new ()

GtkWidget*          osso_abook_contact_field_selector_new
                                                        (void);

Creates a new OssoABookContactFieldSelector


osso_abook_contact_field_selector_load ()

void                osso_abook_contact_field_selector_load
                                                        (OssoABookContactFieldSelector *selector,
                                                         OssoABookContact *contact,
                                                         OssoABookContactFieldPredicate accept_field,
                                                         gpointer user_data);

Loads the list of possible fields, filtered according to accept_field, and adds them to the selector

selector : a OssoABookContactFieldSelector
contact : an optional OssoABookContact to be associated with the contact fields
accept_field : a predicate function to filter the list of possible fields
user_data : optional data to pass to accept_field

osso_abook_contact_field_selector_append ()

void                osso_abook_contact_field_selector_append
                                                        (OssoABookContactFieldSelector *selector,
                                                         OssoABookContactField *field);

Appends the specified field to the list of fields that can be selected

selector : a OssoABookContactFieldSelector
field : a OssoABookContactField to append

osso_abook_contact_field_selector_get_selected ()

OssoABookContactField* osso_abook_contact_field_selector_get_selected
                                                        (OssoABookContactFieldSelector *selector);

Gets the field that is currently selected.

selector : a OssoABookContactFieldSelector
Returns : the currently-selected field or NULL. The caller owns a reference to the returned field.

osso_abook_contact_field_selector_find_custom ()

int                 osso_abook_contact_field_selector_find_custom
                                                        (OssoABookContactFieldSelector *selector,
                                                         OssoABookContactFieldPredicate accept_field,
                                                         gpointer user_data);

Gets the row index of the first field that returns true from accept_field

selector : a OssoABookContactFieldSelector
accept_field : predicate function for accepting or rejecting potential fields
user_data : optional data to pass to accept_field
Returns : the row index of the found row, or -1 if no fields are found.

osso_abook_contact_field_selector_get_selected_fields ()

GList*              osso_abook_contact_field_selector_get_selected_fields
                                                        (OssoABookContactFieldSelector *selector);

Gets a list of selected fields for selector

selector : a OssoABookContactFieldSelector
Returns : a list of OssoABookContactFields. The list and its contents are owned by the caller

osso_abook_contact_field_selector_set_show_values ()

void                osso_abook_contact_field_selector_set_show_values
                                                        (OssoABookContactFieldSelector *selector,
                                                         gboolean value);

Sets the property that controls whether the values of the fields are shown in the selector widget. If value is FALSE, only the names of the fields will be displayed. If value is TRUE, then the values will also be displayed.

selector : a OssoABookContactFieldSelector
value : whether the selector should show values

osso_abook_contact_field_selector_get_show_values ()

gboolean            osso_abook_contact_field_selector_get_show_values
                                                        (OssoABookContactFieldSelector *selector);

Gets the value of the property that controls whether the values of the fields are displayed in the selector.

Property Details

The "show-values" property

  "show-values"              gboolean              : Read / Write

Show contact field values.

Default value: FALSE