0

I am looking to create an application that I can keep next to Spotlight.

Application like Dropbox, Mint, Alfred reside there and live through out the life of OS.

Where should I start?

Thanks in advance, RKS

RKS
  • 1,333
  • 2
  • 12
  • 12

2 Answers2

2

Use NSStatusBar class.

NSStatusBar *mStatusItem = [[[NSStatusBar systemStatusBar]statusItemWithLength:NSVariableStatusItemLength] retain]; // Retain
[mStatusItem setHighlightMode:YES];
    //Set Menu Icon
[mStatusItem setImage: [NSImage imageNamed:@"Image"]];
[mStatusItem setAlternateImage: [NSImage imageNamed:@"AImage"]];
[mStatusItem setMenu: lMenu];
[mStatusItem setToolTip:@"my app"];
Parag Bafna
  • 22,812
  • 8
  • 71
  • 144
  • Thats the term I was looking for. Status Bar. But, will this die when I quit my app ? I want to be able to be alive till my OS is alive. See this is the only thing I want in my app. – RKS May 23 '13 at 17:53
  • Or other way of putting this is; How do I make sure that this app is launched every time I launch my OS, without having user to set this manually? – RKS May 23 '13 at 19:27
0

That sounds like a "menu extra"/"status bar item".

The official API for status bar items is NSStatusBar; see Apple's information on status bars.

The unofficial (and thus not guaranteed to continue to work, or even to work at all on the latest OS X) internal interface for menu extras is NSMenuExtra; see, for example, this information on NSMenuExtra.