Class

IMKCandidates

The IMKCandidates class presents candidates to users and notifies the appropriate IMKInputController object when the user selects a candidate. Candidates are alternate characters for a given input sequence. The IMKCandidates class supports using a candidates window in your input method; using IMKCandidates is optional. Not all input methods require them.

Declaration

@interface IMKCandidates : NSResponder

Overview

When you create an IMKCandidates object, you attach it to the IMKServer object for your input method. You then need to override the IMKInputController methods candidateSelectionChanged: and candidateSelected: as well as implement a candidates method in your delegate object. The IMKInputController subclass supplies candidates to the IMKCandidates object by implementing the candidates method. When you are ready to display a candidates window, call the candidates method to update candidates and to show the candidates window.

Topics

Initializing a Candidates Window

- initWithServer:panelType:

Returns the initialized IMKCandidates object.

Managing Selection Keys

- setSelectionKeys:

Sets the selection keys for the candidates.

- selectionKeys

Returns an array of NSNumber objects where each NSNumber object represents a virtual key code.

- setSelectionKeysKeylayout:

Sets the key layout that is used to map virtual key codes to characters.

- selectionKeysKeylayout

Returns the key layout that maps virtual key codes to selection keys.

Managing Window Visibility and Behavior

- show:

Shows the candidates window.

- hide

Hides a candidates window, if it is visible.

- isVisible

Returns whether or not the candidates window is visible.

- setDismissesAutomatically:

Sets the state of the flag that determines whether the candidates window dismisses automatically.

- dismissesAutomatically

Returns the state of the flag that determines whether the candidates window dismisses automatically.

- updateCandidates

Updates the candidates that are displayed in the candidates window.

Managing Window Type and Text Attributes

- panelType

Returns the style of the candidates window.

- setPanelType:

Sets the style of the candidates window.

- setAttributes:

Sets the style attributes for the candidates window.

- attributes

Returns a dictionary of the style attributes used for the candidates window..

Showing an Annotation Window

- showAnnotation:

Displays an annotation string in an annotation window.

Constants

IMKCandidatePanelType

Types of candidates windows provide by the Input Method Kit.

IMKCandidatesLocationHint

Hints that suggest where to place the candidates window.

IMKCandidatesOpacityAttributeName

The opacity level for a candidates window.

Relationships

Inherits From