mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:10:48 +00:00
* Headers/Additions/GNUstepGUI/GSTheme.h: Added method
displayPopUpMenu:... to handle the display of the popup menus for themes. * Source/GSThemeMenu.m: Added default implementation. * Source/NSPopUpButtonCell.m: Call the displayPopUpMenu:... method in the method attachPopUpWithFrame:inView:. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30433 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6f37c88fcf
commit
ba0e9047b7
4 changed files with 43 additions and 11 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2010-05-20 04:14-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
|
* Headers/Additions/GNUstepGUI/GSTheme.h: Added method
|
||||||
|
displayPopUpMenu:... to handle the display of the popup menus for
|
||||||
|
themes.
|
||||||
|
* Source/GSThemeMenu.m: Added default implementation.
|
||||||
|
* Source/NSPopUpButtonCell.m: Call the displayPopUpMenu:... method
|
||||||
|
in the method attachPopUpWithFrame:inView:.
|
||||||
|
|
||||||
2010-05-19 Quentin Mathe <quentin.mathe@gmail.com>
|
2010-05-19 Quentin Mathe <quentin.mathe@gmail.com>
|
||||||
|
|
||||||
* Headers/AppKit/NSColorPicking.h: Removed Protocol.h import to
|
* Headers/AppKit/NSColorPicking.h: Removed Protocol.h import to
|
||||||
|
|
|
@ -1061,6 +1061,15 @@ withRepeatedImage: (NSImage*)image
|
||||||
- (void) rightMouseDisplay: (NSMenu *)menu
|
- (void) rightMouseDisplay: (NSMenu *)menu
|
||||||
forEvent: (NSEvent *)theEvent;
|
forEvent: (NSEvent *)theEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display popup menu item.
|
||||||
|
*/
|
||||||
|
- (void) displayPopUpMenu: (NSMenuView *)mr
|
||||||
|
withCellFrame: (NSRect)cellFrame
|
||||||
|
controlViewWindow: (NSWindow *)cvWin
|
||||||
|
preferredEdge: (NSRectEdge)edge
|
||||||
|
selectedItem: (int)selectedItem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Processes menu events for the theme. The default implementation
|
* Processes menu events for the theme. The default implementation
|
||||||
* does nothing.
|
* does nothing.
|
||||||
|
|
|
@ -91,6 +91,25 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) displayPopUpMenu: (NSMenuView *)mr
|
||||||
|
withCellFrame: (NSRect)cellFrame
|
||||||
|
controlViewWindow: (NSWindow *)cvWin
|
||||||
|
preferredEdge: (NSRectEdge)edge
|
||||||
|
selectedItem: (int)selectedItem
|
||||||
|
{
|
||||||
|
// Ask the MenuView to attach the menu to this rect
|
||||||
|
[mr setWindowFrameForAttachingToRect: cellFrame
|
||||||
|
onScreen: [cvWin screen]
|
||||||
|
preferredEdge: edge
|
||||||
|
popUpSelectedItem: selectedItem];
|
||||||
|
|
||||||
|
// Set to be above the main window
|
||||||
|
[cvWin addChildWindow: [mr window] ordered: NSWindowAbove];
|
||||||
|
|
||||||
|
// Last, display the window
|
||||||
|
[[mr window] orderFrontRegardless];
|
||||||
|
}
|
||||||
|
|
||||||
- (void) processCommand: (void *)context
|
- (void) processCommand: (void *)context
|
||||||
{
|
{
|
||||||
// this is only implemented when we handle native menus.
|
// this is only implemented when we handle native menus.
|
||||||
|
|
|
@ -838,17 +838,12 @@ static NSImage *_pbc_image[5];
|
||||||
[mr setHighlightedItemIndex: selectedItem];
|
[mr setHighlightedItemIndex: selectedItem];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ask the MenuView to attach the menu to this rect
|
// display the menu item...
|
||||||
[mr setWindowFrameForAttachingToRect: cellFrame
|
[[GSTheme theme] displayPopUpMenu: mr
|
||||||
onScreen: [cvWin screen]
|
withCellFrame: cellFrame
|
||||||
preferredEdge: _pbcFlags.preferredEdge
|
controlViewWindow: cvWin
|
||||||
popUpSelectedItem: selectedItem];
|
preferredEdge: _pbcFlags.preferredEdge
|
||||||
|
selectedItem: selectedItem];
|
||||||
// Set to be above the main window
|
|
||||||
[cvWin addChildWindow: [mr window] ordered: NSWindowAbove];
|
|
||||||
|
|
||||||
// Last, display the window
|
|
||||||
[[mr window] orderFrontRegardless];
|
|
||||||
|
|
||||||
[nc addObserver: self
|
[nc addObserver: self
|
||||||
selector: @selector(_handleNotification:)
|
selector: @selector(_handleNotification:)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue