SMPOpenUIFieldAdapter protocol

The base class for the protocols that must be implemented by all Open UI field extension classes.

Syntax

@protocol SMPOpenUIFieldAdapter

Derived protocols

Members

All members of SMPOpenUIFieldAdapter, including inherited members.

Methods
Method Description
- (BOOL) agentryShouldDisplayLabel Called to ask the adapter if Agentry should handle displaying the label for the field or leave it to the extension.
- (BOOL) agentryShouldDisplayValidationFailure Called to ask the adapter if Agentry should handle displaying validation failure text or leave it to the extension.
- (SMPOpenUIAutosizeBehavior) autosizeBehavior Called to ask the adapter what its desired autosize behavior is.
- (void) model: (id< SMPOpenUIFieldModel >) model didSetEnabled: (BOOL) enabled Called to inform the adapter that the host widget has been enabled or disabled.
- (void) model: (id< SMPOpenUIFieldModel >) model didSetHyperlinkEnabled: (BOOL) enabled Called to inform the adapter that the enable state of the hyperlink has changed.
- (void) model: (id< SMPOpenUIFieldModel >) model didSetValid: (BOOL) valid withValidationFailureText: (NSString *) text Called to inform the adapter that the field's valid state has changed.
- (void) model: (id< SMPOpenUIFieldModel >) model didSetVisible: (BOOL) visible Called to inform the adapter that the host widget has been shown or hidden.
- (void) model: (id< SMPOpenUIFieldModel >) model didUpdateLabel: (NSString *) label Called to inform the adapter that the text of the label has changed.
- (NSString *) model: (id< SMPOpenUIFieldModel >) model wantsExtensionString: (NSString *) stringName Called by the Agentry to get the value for the specified string.
- (NSUInteger) model: (id< SMPOpenUIFieldModel >) model wantsViewHeightForWidth: (NSUInteger) width Called to ask the adapter the height needed for its view for a given width for layout calculations.
- (UIView *) viewForFrame: (CGRect) frame Returns the UIView that will be added as a subview to the host's UIView This will be called one time after initWithXxxModel: has been called.

Usage

This is an "abstract" protocol, in that you need to implement one of its child protocols so that there is an initWithXxxModel method. The client host will create an instance of the specified class, and call its initWithXxxModel method. When the extension control is to be displayed, the viewForFrame: method will be called and the returned view will be added as a subview of the Agentry Screen. Each adapter will have a host view and view controller that will determine the space dedicated for the adapter.