Public Member Functions | Static Public Member Functions | Protected Attributes

XAP_CocoaToolProvider Class Reference

#import <xap_CocoaToolProvider.h>

Inheritance diagram for XAP_CocoaToolProvider:
<XAP_CocoaPlugin_ToolProvider>

List of all members.

Public Member Functions

(id- initWithName:
(void) - dealloc
(NSString *) - name
 Get the name of the provider.
(void) - addTool:
 Add a tool to the provider's list of tools.
(void) - removeToolWithIdentifier:
 Remove a tool from the provider's list of tools.
(id< NSObject,
XAP_CocoaPlugin_Tool >) 
- toolWithIdentifier:
 Get the tool with the specified identifier.
(NSArray *) - toolIdentifiers
 Get the identifiers of the tools provided.
(NSString *) - toolDescription:
 See whether the provider provides a specific tool, and get the description (tooltip).

Static Public Member Functions

(XAP_CocoaToolProvider *) + AbiWordToolProvider

Protected Attributes

NSString * m_name
NSMutableArray * m_identifiers
NSMutableDictionary * m_tools

Member Function Documentation

- (void) addTool: (id <NSObject, XAP_CocoaPlugin_Tool>)  tool  

Add a tool to the provider's list of tools.

The provider will send the tool a setProvider: message.

Parameters:
tool An object which implements the XAP_CocoaPlugin_Tool protocol.

References <XAP_CocoaPlugin_Tool>::identifier, m_identifiers, m_tools, and <XAP_CocoaPlugin_Tool>::setProvider:.

- (void) dealloc  

References m_identifiers, m_name, and m_tools.

- (id) initWithName: (NSString *)  name  

References m_identifiers, m_name, m_tools, name, and UT_ASSERT.

- (NSString *) name  

Get the name of the provider.

Returns:
The name identifying the provider.

Reimplemented from <XAP_CocoaPlugin_ToolProvider>.

References m_name.

Referenced by initWithName:.

- (void) removeToolWithIdentifier: (NSString *)  identifier  

Remove a tool from the provider's list of tools.

The provider will send the tool a setProvider:nil message.

Parameters:
identifier The identifier of the tool which is to be removed.

References m_identifiers, and m_tools.

- (NSString *) toolDescription: (NSString *)  identifier  

See whether the provider provides a specific tool, and get the description (tooltip).

Parameters:
identifier The internal identifier of the desired tool.
Returns:
The description (the tooltip) of the tool if the identifier is recognized, otherwise nil.

Reimplemented from <XAP_CocoaPlugin_ToolProvider>.

References <XAP_CocoaPlugin_Tool>::description, and m_tools.

- (NSArray *) toolIdentifiers  

Get the identifiers of the tools provided.

Returns:
The identifiers of the tools provided.

Reimplemented from <XAP_CocoaPlugin_ToolProvider>.

References m_identifiers.

- (id< NSObject, XAP_CocoaPlugin_Tool >) toolWithIdentifier: (NSString *)  identifier  

Get the tool with the specified identifier.

Parameters:
identifier The identifier of the tool which is desired.
Returns:
The specified tool, or nil if the identifier is not matched.

Reimplemented from <XAP_CocoaPlugin_ToolProvider>.

References m_tools.


Member Data Documentation

- (NSMutableArray*) m_identifiers [protected]
- (NSString*) m_name [protected]

Referenced by dealloc, initWithName:, and name.

- (NSMutableDictionary*) m_tools [protected]

The documentation for this class was generated from the following files: