| Derived from | |
| Framework | AddressBook/ABAddressBookC.h |
| Companion guide | |
| Declared in | ABPeoplePickerC.h |
The ABPicker opaque type allows you create and manipulate people-picker windows in an application’s user interface.
Use ABPickerCreate to
create a people-picker window and ABPickerSetVisibility to make it visible.
Use ABPickerAddProperty to
add properties to the record list. Users can specify which property
to display by clicking the property column in the record list and
choosing the desired property.
Adds a property to the group of properties available in
the record list. Use ABPickerRemoveProperty to
remove a property from the list and ABPickerCopyProperties to obtain the
list of properties available in the list.
void ABPickerAddProperty ( ABPickerRef inPicker, CFStringRef inProperty );
The people-picker window to manipulate.
The property to add, specified using one of
the kAB...Property constants (defined
in ABPerson and ABRecord)
or a custom string.
ABPeoplePickerC.h
Specifies the selection behaviors for a people-picker
window. Use ABPickerGetAttributes to
obtain the selection behaviors specified for the window.
void ABPickerChangeAttributes ( ABPickerRef inPicker, ABPickerAttributes inAttributesToSet, ABPickerAttributes inAttributesToClear );
The people-picker window to manipulate.
The attributes to set for the window. The
possible selection behaviors are described in ABPickerAttributes.
The attributes to unset for the window. The
possible selection behaviors are described in ABPickerAttributes.
ABPeoplePickerC.hClears the search field and resets the list of displayed records.
void ABPickerClearSearchField ( ABPickerRef inPicker );
The people-picker window to manipulate.
ABPeoplePickerC.hObtains the title of a custom property.
CFStringRef ABPickerCopyColumnTitle ( ABPickerRef inPicker, CFStringRef inProperty );
The people-picker window in question.
The title of the column that displays the custom property in the record list.
ABPeoplePickerC.hReturns the name of the property currently displayed in the record list.
CFStringRef ABPickerCopyDisplayedProperty ( ABPickerRef inPicker );
The people-picker window in question.
The name of the property displayed.
ABPeoplePickerC.h
Obtains the list of properties available in the record
list. Use ABPickerAddProperty to
add a property to the record list and ABPickerRemoveProperty to remove a property
from the list.
CFArrayRef ABPickerCopyProperties ( ABPickerRef inPicker );
The people-picker window in question.
An array with the list of properties available in the record list.
ABPeoplePickerC.hReturns the groups selected in the group list as an array of ABGroup objects.
CFArrayRef ABPickerCopySelectedGroups ( ABPickerRef inPicker );
The people-picker window in question.
An array with the groups selected in the group list.
ABPeoplePickerC.hReturns the identifiers of the selected values in a multi-value property or an empty array if the property displayed is a single-value property.
CFArrayRef ABPickerCopySelectedIdentifiers ( ABPickerRef inPicker, ABPersonRef inPerson );
The people-picker window in question.
The ABPerson that contains the multi-value property in question.
An array of CFString objects representing the selected identifiers.
ABPeoplePickerC.hReturns the selection in the record list as an array of ABGroup or ABPerson objects.
CFArrayRef ABPickerCopySelectedRecords ( ABPickerRef inPicker );
The people-picker window in question.
An array with the groups or records selected in the record list.
ABPeoplePickerC.hReturns the selected values in a multi-value property or an empty array if no values are selected or the property displayed is a single-value property.
CFArrayRef ABPickerCopySelectedValues ( ABPickerRef inPicker );
The people-picker window in question.
An array of the values selected.
ABPeoplePickerC.h
Creates an ABPickerRef. The corresponding window is hidden.
Invoke ABPickerSetVisibility to
show it. Release with CFRelease.
ABPickerRef ABPickerCreate ( void );
The object that represents the people-picker window.
ABPeoplePickerC.hDeselects all selected groups, records, and values in multi-value properties.
void ABPickerDeselectAll ( ABPickerRef inPicker );
The people-picker window to manipulate.
ABPeoplePickerC.hDeselects a group in the group list.
void ABPickerDeselectGroup ( ABPickerRef inPicker, ABGroupRef inGroup );
The people-picker window to manipulate.
The group to deselect in the list.
ABPeoplePickerC.hDeselects a value in multi-value property currently displayed in the record list.
void ABPickerDeselectIdentifier ( ABPickerRef inPicker, ABPersonRef inPerson, CFStringRef inIdentifier );
The people-picker window to manipulate.
The ABPerson that contains the multi-value property in question.
The identifier of the value to deselect in the multi-value property.
ABPeoplePickerC.hDeselects a group in the record list.
void ABPickerDeselectRecord ( ABPickerRef inPicker, ABRecordRef inRecord );
The people-picker window to manipulate.
The record to deselect in the list.
ABPeoplePickerC.hLaunches Address Book to edit the item selected in the people-picker window.
void ABPickerEditInAddressBook ( ABPickerRef inPicker );
The people-picker window in question.
ABPeoplePickerC.h
Indicates the selection behaviors selected a people-picker
window. Use ABPickerChangeAttributes to
specify selection behaviors for the window.
ABPickerAttributes ABPickerGetAttributes ( ABPickerRef inPicker );
The people-picker window in question.
An OptionBits object
with the selection behaviors selected for the window. The possible
selection behaviors are described in ABPickerAttributes.
ABPeoplePickerC.hObtains the delegate for a people-picker window.
EventTargetRef ABPickerGetDelegate ( ABPickerRef inPicker );
The people-picker window in question.
The window’s delegate.
ABPeoplePickerC.hReturns the position and size of the people-picker window.
void ABPickerGetFrame ( ABPickerRef inPicker, HIRect *outFrame );
The people-picker window in question.
On output, the position and size of the window in screen coordinates.
ABPeoplePickerC.hIndicates whether the people-picker window is visible.
bool ABPickerIsVisible ( ABPickerRef inPicker );
The people-picker window in question.
true when
the window is visible, false otherwise.
ABPeoplePickerC.h
Removes a property from the group of properties whose
values are shown in the record list. Use ABPickerAddProperty to add a property
to the record list and ABPickerCopyProperties to
obtain the list of properties shown in the record list.
void ABPickerRemoveProperty ( ABPickerRef inPicker, CFStringRef inProperty );
The people-picker window to manipulate.
The property to remove, specified using one
of the kAB...Property constants
or a custom string.
ABPeoplePickerC.hSelects a group or a set of groups in the group list.
void ABPickerSelectGroup ( ABPickerRef inPicker, ABGroupRef inGroup, bool inExtendSelection );
The people-picker window to manipulate.
The group to select.
true if
you want to add inGroup to the list
of selected groups in the group list; false if
you want inGroup to be the only group
selected in the list.
ABPeoplePickerC.hSelects a value or a set of values in a multi-value property.
void ABPickerSelectIdentifier ( ABPickerRef inPicker, ABPersonRef inPerson, CFStringRef inIdentifier, bool inExtendSelection );
The people-picker window to manipulate.
The person with the multi-value property with the value to select.
The identifier of the value to select in the multi-value property.
true if
you want to add the value to the list of selected values in the multi-value
property of the desired person; false if
you want the value to be the only value selected in the list.
ABPeoplePickerC.hLaunches Address Book and selects the item selected in the people-picker window.
void ABPickerSelectInAddressBook ( ABPickerRef inPicker );
The people-picker window in question.
ABPeoplePickerC.hSelects a record or a set of records in the record list.
void ABPickerSelectRecord ( ABPickerRef inPicker, ABRecordRef inRecord, bool inExtendSelection );
The people-picker window to manipulate.
The record to select.
true if
you want to add inRecord to the list
of selected records in the record list; false if
you want inRecord to be the only
record selected in the list.
ABPeoplePickerC.hSets the title for a custom property.
void ABPickerSetColumnTitle ( ABPickerRef inPicker, CFStringRef inTitle, CFStringRef inProperty );
The people-picker window to manipulate.
The new column title.
The property whose column’s title to set.
ABPeoplePickerC.hSets the event handler for people-picker events.
void ABPickerSetDelegate ( ABPickerRef inPicker, EventTargetRef inDelegate );
The people-picker window in question.
The delegate for the window.
ABPeoplePickerC.hDisplays one of the properties whose values are shown in the record list.
void ABPickerSetDisplayedProperty ( ABPickerRef inPicker, CFStringRef inProperty );
The people-picker window to manipulate.
The property to display.
ABPeoplePickerC.hSpecifies the position and size of the people-picker window.
void ABPickerSetFrame ( ABPickerRef inPicker, const HIRect *inFrame );
The people-picker window to manipulate.
The size and position of the window in screen coordinates.
ABPeoplePickerC.h
Shows or hides a people-picker window.
void ABPickerSetVisibility ( ABPickerRef inPicker, bool visible );
The people-picker window to manipulate.
true to
show the window and false to
hide it.
ABPeoplePickerC.hA reference to an ABPicker object.
typedef struct OpaqueABPicker *ABPickerRef;
ABPeoplePickerC.h
These constants specify the selection behavior for the values of multi-value properties.
typedef OptionBits ABPickerAttributes;
When multiple behaviors are selected, the most restrictive
behavior is used. The default behavior is single-value selection
(kABPickerSingleValueSelection).
ABPeoplePickerC.hThis is the People Picker event class.
enum {
kEventClassABPeoplePicker = 'abpp'
};
kEventClassABPeoplePickerThe class of people-picker events.
Available in Mac OS X v10.3 and later.
Declared in ABPeoplePickerC.h
Constants used to specify People Picker event types.
enum {
kEventABPeoplePickerGroupSelectionChanged = 1,
kEventABPeoplePickerNameSelectionChanged = 2,
kEventABPeoplePickerValueSelectionChanged = 3,
kEventABPeoplePickerDisplayedPropertyChanged = 4,
kEventABPeoplePickerGroupDoubleClicked = 5,
kEventABPeoplePickerNameDoubleClicked = 6,
};
kEventABPeoplePickerGroupSelectionChangedThe selection in the group list changed.
Available in Mac OS X v10.3 and later.
Declared in ABPeoplePickerC.h
kEventABPeoplePickerNameSelectionChangedThe selection in the name list changed.
Available in Mac OS X v10.3 and later.
Declared in ABPeoplePickerC.h
kEventABPeoplePickerValueSelectionChangedThe selection in a multi-value property changed.
Available in Mac OS X v10.3 and later.
Declared in ABPeoplePickerC.h
kEventABPeoplePickerDisplayedPropertyChangedThe displayed property in the record list changed.
Available in Mac OS X v10.3 and later.
Declared in ABPeoplePickerC.h
kEventABPeoplePickerGroupDoubleClickedA group in the group list was double-clicked.
Available in Mac OS X v10.3 and later.
Declared in ABPeoplePickerC.h
kEventABPeoplePickerNameDoubleClickedA record in the record list was double-clicked.
Available in Mac OS X v10.3 and later.
Declared in ABPeoplePickerC.h
A people-picker window delegate is notified when the events defined earlier occur. People Picker events contain an event parameter, which contains the ABPicker object. Use the following code to obtain the ABPicker object:
GetEventParameter ( inEvent, kEventParamABPickerRef, |
typeCFTypeRef, NULL, sizeof(ABPickerRef), |
NULL, &outPickerRef ); |
Use this constant to obtain the ABPicker object from a People Picker event.
enum {
kEventParamABPickerRef = 'abpp'
};
kEventParamABPickerRefThe parameter name of people-picker events.
Available in Mac OS X v10.3 and later.
Declared in ABPeoplePickerC.h
Last updated: 2007-07-20