2020-07-20 05:02:22 +00:00
|
|
|
/* Interface of class NSSplitViewItem
|
|
|
|
Copyright (C) 2020 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
By: Gregory John Casamento
|
|
|
|
Date: Mon 20 Jul 2020 12:56:20 AM EDT
|
|
|
|
|
|
|
|
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 _NSSplitViewItem_h_GNUSTEP_GUI_INCLUDE
|
|
|
|
#define _NSSplitViewItem_h_GNUSTEP_GUI_INCLUDE
|
|
|
|
|
|
|
|
#import <Foundation/NSObject.h>
|
2020-07-20 07:20:34 +00:00
|
|
|
#import <AppKit/AppKitDefines.h>
|
2020-07-20 05:02:22 +00:00
|
|
|
|
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2020-07-20 07:20:34 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
NSSplitViewItemBehaviorDefault,
|
|
|
|
NSSplibViewItemBehaviorSidebar,
|
|
|
|
NSSplitViewItemBehaviorContentList
|
|
|
|
};
|
|
|
|
typedef NSInteger NSSplitViewItemBehavior;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
NSSplitViewItemCollapseBehaviorDefault,
|
|
|
|
NSSplitViewItemCollapseBehaviorPreferResizingSiblingsWithFixedSplitView,
|
|
|
|
NSSplitViewItemCollapseBehaviorPreferResizingSplitViewWithFixedSiblings,
|
|
|
|
NSSplitViewItemCollapseBehaviorUseConstraints
|
|
|
|
};
|
|
|
|
typedef NSInteger NSSplitViewItemCollapseBehavior;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
NSTitlebarSeparatorStyleAutomatic,
|
|
|
|
NSTitlebarSeparatorStyleLine,
|
|
|
|
NSTitlebarSeparatorStyleNone,
|
|
|
|
NSTitlebarSeparatorStyleShadow
|
|
|
|
};
|
|
|
|
typedef NSInteger NSTitlebarSeparatorStyle;
|
|
|
|
|
|
|
|
@class NSViewController;
|
|
|
|
|
2022-09-29 16:09:13 +00:00
|
|
|
APPKIT_EXPORT_CLASS
|
2020-07-21 09:22:36 +00:00
|
|
|
@interface NSSplitViewItem : NSObject <NSCoding>
|
2020-07-20 07:20:34 +00:00
|
|
|
{
|
|
|
|
CGFloat _automaticMaximumThickness;
|
|
|
|
CGFloat _preferredThicknessFraction;
|
|
|
|
CGFloat _minimumThickness;
|
|
|
|
CGFloat _maximumThickness;
|
2020-07-20 09:12:36 +00:00
|
|
|
BOOL _springLoaded;
|
2020-07-20 07:20:34 +00:00
|
|
|
BOOL _allowsFullHeightLayout;
|
2020-07-20 09:12:36 +00:00
|
|
|
BOOL _canCollapse;
|
|
|
|
CGFloat /*NSLayoutPriority*/ _holdingPriority;
|
|
|
|
NSSplitViewItemCollapseBehavior _collapseBehavior;
|
2020-07-20 07:20:34 +00:00
|
|
|
NSViewController *_viewController;
|
2020-07-20 09:12:36 +00:00
|
|
|
NSTitlebarSeparatorStyle _titlebarSeparatorStyle;
|
2020-07-20 07:20:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
+ (instancetype)contentListWithViewController:(NSViewController *)viewController;
|
|
|
|
+ (instancetype)sidebarWithViewController:(NSViewController *)viewController;
|
|
|
|
+ (instancetype)splitViewItemWithViewController:(NSViewController *)viewController;
|
|
|
|
|
|
|
|
- (CGFloat) automaticMaximumThickness;
|
2020-07-20 09:33:40 +00:00
|
|
|
- (void) setAutomaticMaximumThickness: (CGFloat)f;
|
2020-07-20 07:20:34 +00:00
|
|
|
- (CGFloat) preferredThicknessFraction;
|
2020-07-20 09:33:40 +00:00
|
|
|
- (void) setPreferredThicknessFraction: (CGFloat)f;
|
2020-07-20 07:20:34 +00:00
|
|
|
- (CGFloat) minimumThickness;
|
2020-07-20 09:33:40 +00:00
|
|
|
- (void) setMinimumThickness: (CGFloat)f;
|
2020-07-20 07:20:34 +00:00
|
|
|
- (CGFloat) maximumThickness;
|
2020-07-20 09:33:40 +00:00
|
|
|
- (void) setMaximumThickness: (CGFloat)f;
|
2020-07-20 07:20:34 +00:00
|
|
|
|
|
|
|
- (/* NSLayoutPriority */ CGFloat) holdingPriority;
|
|
|
|
|
|
|
|
- (BOOL) canCollapse;
|
|
|
|
- (NSSplitViewItemCollapseBehavior) collapseBehavior;
|
|
|
|
- (BOOL) isSpringLoaded;
|
|
|
|
- (void) setSpringLoaded: (BOOL)flag;
|
|
|
|
|
|
|
|
- (BOOL) allowsFullHeightLayout;
|
|
|
|
- (void) setAllowsFullHeightLayout: (BOOL)flag;
|
|
|
|
|
|
|
|
- (NSTitlebarSeparatorStyle) titlebarSeparatorStyle;
|
|
|
|
- (void) setTitlebarSeparatorStyle: (NSTitlebarSeparatorStyle)style;
|
2020-07-20 05:02:22 +00:00
|
|
|
|
2020-07-20 07:20:34 +00:00
|
|
|
- (NSViewController *) viewController;
|
2020-07-22 06:19:35 +00:00
|
|
|
- (void) setViewController: (NSViewController *)vc;
|
2020-07-20 05:02:22 +00:00
|
|
|
@end
|
|
|
|
|
2020-07-20 07:20:34 +00:00
|
|
|
APPKIT_EXPORT const CGFloat NSSplitViewItemUnspecifiedDimension;
|
|
|
|
|
2020-07-20 05:02:22 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* GS_API_MACOSX */
|
|
|
|
|
|
|
|
#endif /* _NSSplitViewItem_h_GNUSTEP_GUI_INCLUDE */
|
|
|
|
|