mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:40:57 +00:00
Add NSMenuToolbarItem skeleton
This commit is contained in:
parent
82dce67eb4
commit
bd4e093bad
5 changed files with 136 additions and 1 deletions
|
@ -101,6 +101,7 @@
|
|||
#import <AppKit/NSMenu.h>
|
||||
#import <AppKit/NSMenuItem.h>
|
||||
#import <AppKit/NSMenuItemCell.h>
|
||||
#import <AppKit/NSMenuToolbarItem.h>
|
||||
#import <AppKit/NSMenuView.h>
|
||||
#import <AppKit/NSNibLoading.h>
|
||||
#import <AppKit/NSOpenPanel.h>
|
||||
|
|
65
Headers/AppKit/NSMenuToolbarItem.h
Normal file
65
Headers/AppKit/NSMenuToolbarItem.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
/* Definition of class NSMenuToolbarItem
|
||||
Copyright (C) 2024 Free Software Foundation, Inc.
|
||||
|
||||
By: Gregory John Casamento
|
||||
Date: 03-05-2024
|
||||
|
||||
This file is part of the GNUstep Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110 USA.
|
||||
*/
|
||||
|
||||
#ifndef _NSMenuToolbarItem_h_GNUSTEP_GUI_INCLUDE
|
||||
#define _NSMenuToolbarItem_h_GNUSTEP_GUI_INCLUDE
|
||||
|
||||
#import <AppKit/NSToolbarItem.h>
|
||||
#import <AppKit/AppKitDefines.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_15, GS_API_LATEST)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@class NSMenu;
|
||||
|
||||
APPKIT_EXPORT_CLASS
|
||||
@interface NSMenuToolbarItem : NSToolbarItem
|
||||
{
|
||||
BOOL _showsIndicator;
|
||||
NSMenu *_menu;
|
||||
NSMenu *_itemMenu;
|
||||
}
|
||||
|
||||
- (BOOL) showsIndicator;
|
||||
- (void) setShowsIndicator: (BOOL)flag;
|
||||
|
||||
- (NSMenu *) menu;
|
||||
- (void) setMenu: (NSMenu *)menu;
|
||||
|
||||
- (NSMenu *) itemMenu;
|
||||
- (void) setItemMenu: (NSMenu *)itemMenu;
|
||||
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* GS_API_MACOSX */
|
||||
|
||||
#endif /* _NSMenuToolbarItem_h_GNUSTEP_GUI_INCLUDE */
|
||||
|
1
MISSING
1
MISSING
|
@ -7,7 +7,6 @@ MISSING HEADERS ( * = difficult, - = quick, + = placeholder, x = won't do )
|
|||
> NSFilePromiseProvider.h -
|
||||
> NSFilePromiseReceiver.h -
|
||||
> NSItemProvider.h +
|
||||
> NSMenuToolbarItem.h -
|
||||
> NSOpenGLLayer.h +
|
||||
> NSTypesetter.h +
|
||||
> NSUserActivity.h -
|
||||
|
|
|
@ -180,6 +180,7 @@ NSStoryboardSegue.m \
|
|||
NSMagnificationGestureRecognizer.m \
|
||||
NSMatrix.m \
|
||||
NSMenu.m \
|
||||
NSMenuToolbarItem.m \
|
||||
NSMenuView.m \
|
||||
NSMenuItem.m \
|
||||
NSMenuItemCell.m \
|
||||
|
@ -496,6 +497,7 @@ NSMediaLibraryBrowserController.h \
|
|||
NSMenu.h \
|
||||
NSMenuItem.h \
|
||||
NSMenuItemCell.h \
|
||||
NSMenuToolbarItem.h \
|
||||
NSMenuView.h \
|
||||
NSMovie.h \
|
||||
NSMovieView.h \
|
||||
|
|
68
Source/NSMenuToolbarItem.m
Normal file
68
Source/NSMenuToolbarItem.m
Normal file
|
@ -0,0 +1,68 @@
|
|||
/* Implementation of class NSMenuToolbarItem
|
||||
Copyright (C) 2024 Free Software Foundation, Inc.
|
||||
|
||||
By: Gregory John Casamento
|
||||
Date: 03-05-2024
|
||||
|
||||
This file is part of the GNUstep Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110 USA.
|
||||
*/
|
||||
|
||||
#import "AppKit/NSMenuToolbarItem.h"
|
||||
#import "AppKit/NSMenu.h"
|
||||
|
||||
@implementation NSMenuToolbarItem
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
RELEASE(_menu);
|
||||
RELEASE(_itemMenu);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (BOOL) showsIndicator
|
||||
{
|
||||
return _showsIndicator;
|
||||
}
|
||||
|
||||
- (void) setShowsIndicator: (BOOL)flag
|
||||
{
|
||||
_showsIndicator = flag;
|
||||
}
|
||||
|
||||
- (NSMenu *) menu
|
||||
{
|
||||
return _menu;
|
||||
}
|
||||
|
||||
- (void) setMenu: (NSMenu *)menu
|
||||
{
|
||||
ASSIGN(_menu, menu);
|
||||
}
|
||||
|
||||
- (NSMenu *) itemMenu
|
||||
{
|
||||
return _itemMenu;
|
||||
}
|
||||
|
||||
- (void) setItemMenu: (NSMenu *)itemMenu
|
||||
{
|
||||
ASSIGN(_itemMenu, itemMenu);
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in a new issue