Thinking out loud you could create your own custom view for the NSStatusItem. Then for example from the AppController:
- (void)awakeFromNib {
float width = 30.0;
float height = [[NSStatusBar systemStatusBar] thickness];
NSRect viewFrame = NSMakeRect(0, 0, width, height);
statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:width] retain];
[statusItem setView:[[[MyCustomView alloc] initWithFrame:viewFrame controller:self] autorelease]];
And to simulate the highlight you'd send a message to your custom view. Then when drawing MyCustomView:
// In MyCustomView.m
- (void)drawRect:(NSRect)rect {
if (clicked) {
[[NSColor selectedMenuItemColor] set];
NSRectFill(rect);
}
As well as using -popUpStatusItemMenu:
.