mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 05:30:37 +00:00
Allow themes to override [NSMenu _isVisible]
(#307)
The default implementation of `[NSMenu]` uses `_aWindow` and `_bWindow` to determine the visibility of the menu. Not all themes use these windows to build a menu. For example, the WinUXTheme will use Win32 APIs to build a menu. Allow themes to override the value of `[NSMenu _isVisible]` by introducing a `[GSTheme proposedVisibility: (BOOL)visible forMenu: (NSMenu *) menu]` method. The default implementation simply eturns the proposed visibility.
This commit is contained in:
parent
9901bbcb4c
commit
acf00ce5d2
3 changed files with 14 additions and 1 deletions
|
@ -1569,6 +1569,12 @@ withRepeatedImage: (NSImage*)image
|
|||
- (void) organizeMenu: (NSMenu *)menu
|
||||
isHorizontal: (BOOL)horizontal;
|
||||
|
||||
/**
|
||||
* Used by the theme to override the proposed menu visibility. The default
|
||||
* implementation simply returns the proposed visibility unmodified.
|
||||
*/
|
||||
- (BOOL) proposedVisibility: (BOOL)visible
|
||||
forMenu: (NSMenu *) menu;
|
||||
@end
|
||||
|
||||
@interface GSTheme (OpenSavePanels)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue