Initial implementation of new GSTheme hooks and default implementations.

This commit is contained in:
Kyle J Cardoza 2023-09-19 22:20:12 -04:00
parent 0b2f0a4e54
commit 81b59ad0a0
6 changed files with 80 additions and 10 deletions

View file

@ -1501,6 +1501,36 @@ withRepeatedImage: (NSImage*)image
*/
- (void) updateMenu: (NSMenu *)menu forWindow: (NSWindow *)window;
- (void) updateAllWindowsWithMenu: (NSMenu *) menu;
/**
* Modifies the given NSRect for use by NSMenu to position and size
* the displayed menu. The default implementation simply returns
* the original NSRect unmodified.
*/
- (NSRect) modifyRect: (NSRect)aRect
forMenu: (NSMenu *)aMenu
isHorizontal: (BOOL) horizontal;
/**
* Modifies the proposed default width for a menu title in the given NSMenuView.
* The default implementation simply returns the proposed width unmodified.
*/
- (float) proposedTitleWidth: (float)proposedWidth
forMenuView: (NSMenuView *)aMenuView;
/**
* Modifies the proposed key equivalent string for the menu item. The default
* implementation simply returns the proposed string unmodified.
*/
- (NSString *) keyForKeyEquivalent: (NSString *)aString;
/**
* Modifies the proposed menu item title. The default implementation simply
* returns the proposed string unmodified.
*/
- (NSString *) proposedTitle: (NSString *)title
forMenuItem: (NSMenuItem *)menuItem;
@end
@interface GSTheme (OpenSavePanels)
@ -1594,6 +1624,5 @@ APPKIT_EXPORT_CLASS
- (NSImage *) highlightedBranchImage;
@end
#endif /* OS_API_VERSION */
#endif /* _GNUstep_H_GSTheme */