Instance Method

drawStateImageWithFrame:inView:

Draws the state image associated with the menu item.

Declaration

- (void)drawStateImageWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;

Parameters

cellFrame

A rectangle defining the receiver's frame area.

controlView

The view object that contains this cell (usually an NSControl object).

Discussion

This method invokes stateImageRectForBounds:, passing it cellFrame, to calculate the rectangle in which to draw the state image. This method is invoked by the cell’s drawWithFrame: method. You should not need to invoke it directly. Subclasses may override this method to control the drawing of the state image.

See Also

Drawing the Menu Item

- drawBorderAndBackgroundWithFrame:inView:

Draws the borders and background associated with the receiver’s menu item (if any).

- drawImageWithFrame:inView:

Draws the image associated with the menu item.

- drawKeyEquivalentWithFrame:inView:

Draws the key equivalent associated with the menu item.

- drawSeparatorItemWithFrame:inView:

Draws a menu item separator.

- drawTitleWithFrame:inView:

Draws the title associated with the menu item.

needsDisplay

A Boolean value indicating whether the menu item needs to be displayed.