Opened 13 years ago

Last modified 12 years ago

#197 new enhancement

control-click in the close box should hide the window

Reported by: joswig Owned by: rme
Priority: normal Milestone: Cocoa IDE v1
Component: IDE Version: unspecific
Keywords: Cc:


MCL has this: if you control click a close-box, the window is hidden. It is still listed in the windows menu (italic). If you select it there it gets visible again.

Currently one can hide a window using the OS supplied hide button, which then places the window in the dock. This is useful for a few windows (1..5), but for more windows (1..50) the the menu approach is preferable.

Clozure CL could also restore this when the application starts. It could reopen all editor files and hide those that were hidden when the application was quit.

Change History (4)

comment:1 Changed 12 years ago by jaj

  • Milestone set to Cocoa IDE v1
  • Priority changed from major to normal

Split off window placement saving and restoring to ticket #423.

comment:2 Changed 12 years ago by rme

  • Owner changed from gb to rme

We can get our hands on the standard window buttons via NSWindow's #/standardWindowButton: method.

Example from

   NSButton *zoomButton = [window standardWindowButton: NSWindowZoomButton];
   [zoomButton setEnabled: YES];
   [zoomButton setTarget: self];
   [zoomButton setAction: @selector(doFancyThings:)];

Clicking the zoom button will then do fancy things.

comment:3 Changed 12 years ago by rme

I added code to hide editor windows like this when you control-click on the miniaturize button in r12029.

As currently implemented, a problem is that the Windows menu item for a window that is hidden is not distinguished in any special way: there's no special mark or special font to indicate the state of the window to the user. Unfortunately, Cocoa doesn't seem to provide any way to set a menu item's mark (e.g., check mark, diamond, etc.). There's a way to do it with undocumented API and Carbon's SetItemMark? function, but SetItemMark? isn't available on 64-bit (at least according to the documentation). It might be possible to use some sort of font variation, but there's no italic variant of the menu font (Lucida Grande) available.

I have some misgivings about this feature generally, but it's worth experimenting with.

comment:4 Changed 12 years ago by alms

Wouldn't the Cocoa equivalent of this be to minimize the window? I can't think of any other Cocoa apps that allow you to hide windows.

Note: See TracTickets for help on using tickets.