Fred Kiefer
7447bc1045
Moved the main menu handling into the class NSMenu and fixed activation problem on Windows.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20342 72102866-910b-0410-8b05-ffd578937521
2004-11-11 19:52:24 +00:00
Fred Kiefer
54da49bd72
Make sure menu views get cleaned up properly.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20122 72102866-910b-0410-8b05-ffd578937521
2004-09-24 10:54:18 +00:00
Fred Kiefer
0df92e1637
Some unrelated bug fixes.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18672 72102866-910b-0410-8b05-ffd578937521
2004-02-25 23:27:46 +00:00
Fred Kiefer
93b7e7acf8
Menu reference handlin patch and further keyed archiving.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18547 72102866-910b-0410-8b05-ffd578937521
2004-02-06 00:16:54 +00:00
Fred Kiefer
da845d0dc4
More keyed decoding.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18541 72102866-910b-0410-8b05-ffd578937521
2004-02-05 00:36:04 +00:00
Fred Kiefer
2882fa9d28
In [update] use [NSApplication targetForAction:to:from:] to be
...
consistent with the [performActionForItemAtIndex:] implementation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17660 72102866-910b-0410-8b05-ffd578937521
2003-09-13 13:38:46 +00:00
David Ayers
b18f1c4ac4
Header reorganization - Please refer to ChangeLog
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17408 72102866-910b-0410-8b05-ffd578937521
2003-07-31 23:52:10 +00:00
Adam Fedor
6be9174933
Include <> -> ""
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16917 72102866-910b-0410-8b05-ffd578937521
2003-06-13 15:01:12 +00:00
Alexander Malmberg
fe3da45353
Check the types of defaults values before using them.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16870 72102866-910b-0410-8b05-ffd578937521
2003-06-05 14:46:04 +00:00
Sergii Stoian
be2339b537
displayTransient: Call [self sizeToFit] before caclulating locations
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16355 72102866-910b-0410-8b05-ffd578937521
2003-04-04 12:11:25 +00:00
Wim (Willem Rein) Oudshoorn
a3c1d4f5f8
renamed ivar _changed to _needsSizing.
...
([NSMenu -sizeToFit]): Changed call [_view update] to [_view sizeToFit]
([NSMenu -displayTransient]): call [NSMenuView-update] to ensure that the
menuView knows it belongs to a transient menu
([NSMenu -closeTransient]): call [NSMenuView-update] to ensue that the
menuView knows it is not transient anymore.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16319 72102866-910b-0410-8b05-ffd578937521
2003-04-01 19:51:41 +00:00
Wim (Willem Rein) Oudshoorn
98bf455e21
Reformatted to comply to
...
coding standards
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16291 72102866-910b-0410-8b05-ffd578937521
2003-03-30 12:48:06 +00:00
Sergii Stoian
92d9403935
optimize calling sizeToFit and update methods
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16278 72102866-910b-0410-8b05-ffd578937521
2003-03-27 16:16:47 +00:00
Wim (Willem Rein) Oudshoorn
a0deea8aff
([NSMenu -display]): Added optimization of Michael Hanni
...
to only resize menu view when actually displayed.
([NSMenu -setTitle:]): Idem
([NSMenu -sizeToFit:]): Fixed problem with jumping menus when items
are added.
([NSMenu -display:]): added optimization of Michael Hanni to resize
only once. Also fixed race condition bug in getting menu location.
([NSMenu -displayTransient]): Added optimization of M. Hanni, removed
resetting position to (0, 0).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16221 72102866-910b-0410-8b05-ffd578937521
2003-03-22 16:29:40 +00:00
Fred Kiefer
4e159c6bda
Implemented [popUpContextMenu:withEvent:forView:] using
...
[_rightMouseDisplay:].
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16209 72102866-910b-0410-8b05-ffd578937521
2003-03-19 16:15:21 +00:00
Richard Frith-Macdonald
d192b06fc5
Fix slip of the keyboard
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16153 72102866-910b-0410-8b05-ffd578937521
2003-03-08 11:47:31 +00:00
Richard Frith-Macdonald
aff8b096b9
Menu handling fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16152 72102866-910b-0410-8b05-ffd578937521
2003-03-08 07:09:33 +00:00
Richard Frith-Macdonald
578ddfd0e9
A few tidyups
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16145 72102866-910b-0410-8b05-ffd578937521
2003-03-07 06:03:15 +00:00
Richard Frith-Macdonald
4e79c73770
Minor fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16144 72102866-910b-0410-8b05-ffd578937521
2003-03-07 05:50:53 +00:00
Richard Frith-Macdonald
00b16254bb
Menu patch by Wim
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16143 72102866-910b-0410-8b05-ffd578937521
2003-03-07 05:33:17 +00:00
Adam Fedor
cc9e0d4346
Menu display improvments
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16040 72102866-910b-0410-8b05-ffd578937521
2003-02-21 23:50:21 +00:00
Richard Frith-Macdonald
4221f51f1a
Menu level fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15971 72102866-910b-0410-8b05-ffd578937521
2003-02-16 06:04:03 +00:00
Nicola Pero
cc6e0ba4cc
When performing key equivalents, only highlight a menu item if it's enabled.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15660 72102866-910b-0410-8b05-ffd578937521
2003-01-21 01:18:24 +00:00
Adam Fedor
1822484c60
Only allow main menu to become key and try to find another one.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14958 72102866-910b-0410-8b05-ffd578937521
2002-11-08 16:39:41 +00:00
Adam Fedor
527fd35378
More focus fixes
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14800 72102866-910b-0410-8b05-ffd578937521
2002-10-20 01:48:55 +00:00
Adam Fedor
356a824ea8
Document. Fix up NSDebugLogs
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14727 72102866-910b-0410-8b05-ffd578937521
2002-10-12 03:14:22 +00:00
Pierre-Yves Rivaille
b24ec8eb74
* Source/NSMenuView.m:
...
New private method [NSMenuView -_itemCell] in newly created
GNUstepPrivate category.
* Source/NSMenu.m:
Add GNUstepPrivate interface of NSMenuView.
[NSMenu -_setOwnedByPopUp:]: update itemCells' menuView
(fix NSPopUpButtonCell-decoding problem).
* Source/NSPopUpButtonCell.m
([NSPopUpButtonCell -synchronizeTitleAndSelectedItem]):
Fix "mouseUp outside of menu" problem. Now the previous
selected item stay selected.
([NSPopUpButtonCell -initWithCoder:]):
Set the selectedItem properly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14446 72102866-910b-0410-8b05-ffd578937521
2002-09-15 14:02:17 +00:00
Fred Kiefer
b5c268588a
Corrected includes.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14415 72102866-910b-0410-8b05-ffd578937521
2002-09-06 23:39:52 +00:00
Adam Fedor
150cf7ad7c
Not work in modal loop. transparency fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14134 72102866-910b-0410-8b05-ffd578937521
2002-07-12 01:41:35 +00:00
Nicola Pero
33a9bfaf78
Always select the popup item in performAction
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13920 72102866-910b-0410-8b05-ffd578937521
2002-06-19 15:00:17 +00:00
Nicola Pero
414d38ddd8
Tidied code
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13886 72102866-910b-0410-8b05-ffd578937521
2002-06-14 12:28:49 +00:00
Nicola Pero
be371e47d7
Added missing #includes
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13442 72102866-910b-0410-8b05-ffd578937521
2002-04-11 23:17:42 +00:00
Nicola Pero
b175821fd1
Added missing #include
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13307 72102866-910b-0410-8b05-ffd578937521
2002-04-02 11:34:24 +00:00
Nicola Pero
8d096d1e9c
On startup, display torn off menus when the app did launch, not before, so
...
that the programmer can set up menus before that
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12702 72102866-910b-0410-8b05-ffd578937521
2002-02-23 12:18:26 +00:00
Nicola Pero
4ecc884e28
Various comments added
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12698 72102866-910b-0410-8b05-ffd578937521
2002-02-23 11:16:59 +00:00
Adam Fedor
7435386c19
Menu location fixes.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12205 72102866-910b-0410-8b05-ffd578937521
2002-01-23 16:32:20 +00:00
Adam Fedor
d47e202fbe
Markup for autogsdoc
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11788 72102866-910b-0410-8b05-ffd578937521
2001-12-17 16:51:51 +00:00
Fred Kiefer
e9bc924221
In [performActionForItemAtIndex:] select the item of the popup
...
before sending the action.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11305 72102866-910b-0410-8b05-ffd578937521
2001-11-04 00:01:53 +00:00
Fred Kiefer
a3febc44f3
Adopted to changes in header. In [update] check for popup buttons
...
also the action of the popup itself, if there is non for the item.
In [performActionForItemAtIndex:] if we are owned by a popup
button, send this action, if the menu item does not have an action.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11107 72102866-910b-0410-8b05-ffd578937521
2001-10-07 23:43:43 +00:00
Fred Kiefer
33c4ae65df
[insertItem:atIndex:] set the menu of the item after the insert
...
notification has been send. [initWithCoder:] send change
notifications as one block.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10964 72102866-910b-0410-8b05-ffd578937521
2001-09-23 22:38:48 +00:00
Fred Kiefer
a80eaa7602
[initWithCoder:] make sure the supermenu of a submenu is nil
...
before adding it to an item. This resolves drag problem for
"format" menu in Gorm.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10939 72102866-910b-0410-8b05-ffd578937521
2001-09-19 22:38:09 +00:00
Fred Kiefer
7a897a0ada
Remove function title_height(), replaced calls to it with
...
[NSMenuView menuBarHeight]. [setSubmenu:forItem:] moved code
to [NSMenuItem setSubmenu]. [update] use _changedMessagesEnabled
to prevent recursion. [sizeToFit] call [setNeedsDisplay:] instead
of [display]. [locationForSubmenu:] moved code to [NSMenuView
locationForSubmenu:].
Added [NSMenuWindowTitleView rightMouseDown:], so the main menu
is not shown in a menu.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10868 72102866-910b-0410-8b05-ffd578937521
2001-09-11 17:29:51 +00:00
Fred Kiefer
3a950b8cae
[insertItemWithTitle:...atIndex:] autorelease the return value.
...
[mouseDown:] when we create the location directory, autorelease it.
In [_locationKey] and [display] remove unneeded checks for popup.
In [copyWithZone:] set the autoenable property before adding items.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10802 72102866-910b-0410-8b05-ffd578937521
2001-08-30 06:50:04 +00:00
Fred Kiefer
50cb4894b4
Cache the notification center. Simplified all the item handling
...
methods, e.g [insertItem:atIndex:], [insertItemWithTitle:...],
[removeItemAtIndex:], [indexOfItemWithSubmenu:].
Implemented [setMenuRepresentation:], [isEqual:] and [copyWithZone:].
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10787 72102866-910b-0410-8b05-ffd578937521
2001-08-27 18:49:34 +00:00
Fred Kiefer
0e5c3b914e
Removed class NSMenuWindow, use aconfigured NSPanel instead.
...
New method [_createWindow] to create this.
Removed unused ivars of NSMenuWindowTitleView and renamed the
methods. Corrected the create/retain logic of the button handling
methods, the old code kept on creating buttons which where never released.
[NSMenu _setTornOff:] now calls addCloseButton or releaseCloseButton.
Replaced [NSMenuWindowTitleView titleHeight] with inline function
title_height().
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10769 72102866-910b-0410-8b05-ffd578937521
2001-08-21 23:24:35 +00:00
Fred Kiefer
935a47fb6f
Adopted to changes in the header file.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10728 72102866-910b-0410-8b05-ffd578937521
2001-08-19 23:21:59 +00:00
Nicola Pero
6ff351d2f9
Cache attribute dictionary used when drawing the menu title
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10283 72102866-910b-0410-8b05-ffd578937521
2001-07-03 18:16:03 +00:00
Fred Kiefer
d76f980997
For NSMenuWindowTitleView [drawRect:] use string
...
drawing method instead of PSshow().
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9890 72102866-910b-0410-8b05-ffd578937521
2001-05-07 22:54:00 +00:00
Nicola Pero
0f1f883950
Modification to allow changing menu font and size
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8720 72102866-910b-0410-8b05-ffd578937521
2001-01-21 01:35:36 +00:00
Nicola Pero
32915c1d25
Fixed bug in drawing text in menu titles
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8608 72102866-910b-0410-8b05-ffd578937521
2001-01-16 12:23:17 +00:00