IMServicePlugInMessage Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/IMServicePlugin.framework
Availability
Available in OS X v10.7 and later.
Declared in
IMServicePlugInMessage.h
IMServicePlugInTypes.h

Overview

Instances of the IMServicePlugInMessage class represent instant messages.

Tasks

Creating Messages

Properties

content

The content of the message.

@property(nonatomic, copy) NSAttributedString *content
Availability
  • Available in OS X v10.7 and later.
Declared In
IMServicePlugInMessage.h

guid

The unique identifier of the message. (read-only)

@property(readonly) NSString *guid
Availability
  • Available in OS X v10.7 and later.
Declared In
IMServicePlugInMessage.h

Class Methods

servicePlugInMessageWithContent:

Creates and returns a message with the specified content.

+ (id)servicePlugInMessageWithContent:(NSAttributedString *)content
Parameters
content

The content for the message.

Return Value

An IMServicePlugInMessage object with the specified content.

Availability
  • Available in OS X v10.7 and later.
Declared In
IMServicePlugInMessage.h

Instance Methods

initWithContent:

Initializes a newly created message with the specified content.

- (id)initWithContent:(NSAttributedString *)content
Parameters
content

The content for the message.

Return Value

The newly initialized message.

Availability
  • Available in OS X v10.7 and later.
Declared In
IMServicePlugInMessage.h

Constants

Rich-Text Message Attributes

Text attributes for rich-text messages.

NSString * const IMAttributeFontFamily;
NSString * const IMAttributeFontSize;
NSString * const IMAttributeItalic;
NSString * const IMAttributeBold;
NSString * const IMAttributeUnderline;
NSString * const IMAttributeStrikethrough;
NSString * const IMAttributeLink;
NSString * const IMAttributePreformatted;
NSString * const IMAttributeBaseWritingDirection;
NSString * const IMAttributeForegroundColor;
NSString * const IMAttributeBackgroundColor;
NSString * const IMAttributeMessageBackgroundColor;
Constants
IMAttributeFontFamily

The font family. (NSString)

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAttributeFontSize

The font size. (NSNumber)

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAttributeItalic

Italic style. (Boolean value as an NSNumber)

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAttributeBold

Bold style. (Boolean value as an NSNumber)

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAttributeUnderline

Underlined style. (Boolean value as an NSNumber)

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAttributeStrikethrough

Struck-through style. (Boolean value as an NSNumber)

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAttributeLink

The URL to link to. (NSURL)

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAttributePreformatted

Preformatted text. (Boolean value as an NSNumber)

If the text is already formatted, the instant messaging agent does not take any action for text that appears to be an emoticon or a URL, or perform any other data detection.

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAttributeBaseWritingDirection

The base writing direction. (NSNumber)

Use 1 to indicate right-to-left text and 0 to indicate left-to-right text.

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAttributeForegroundColor

The foreground color of the text. (Hexadecimal color description as an NSString)

For example, #FF0033, #555, and #78a9bc are valid values.

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAttributeBackgroundColor

The background color behind the text. (Hexadecimal color description as an NSString)

For example, #FF0033, #555, and #78a9bc are valid values.

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAttributeMessageBackgroundColor

The background color of the box or bubble containing the text. (Hexadecimal color description as an NSString)

For example, #FF0033, #555, and #78a9bc are valid values.

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

Discussion

These attributes mirror the text attributes provided by the AppKit framework for NSAttributedString objects. They are provided so that instant messaging plug-ins don’t have to link against that entire framework to get the attributed string constants.


Did this document help you? Yes It's good, but... Not helpful...