mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
Header skeleton NSLayoutGuide.
This commit is contained in:
parent
75bfedc564
commit
3d9442d117
2 changed files with 41 additions and 1 deletions
|
@ -36,6 +36,8 @@ extern "C" {
|
|||
@class NSLayoutConstraint, NSString, NSArray;
|
||||
|
||||
@interface NSLayoutAnchor : NSObject <NSCoding, NSCopying>
|
||||
{
|
||||
}
|
||||
|
||||
- (NSLayoutConstraint *) constraintEqualToAnchor: (NSLayoutAnchor *)anchor;
|
||||
- (NSLayoutConstraint *) constraintGreaterThanOrEqualToAnchor: (NSLayoutAnchor *)anchor;
|
||||
|
@ -56,6 +58,8 @@ extern "C" {
|
|||
@end
|
||||
|
||||
@interface NSLayoutDimension : NSLayoutAnchor
|
||||
{
|
||||
}
|
||||
|
||||
- (NSLayoutConstraint *) constraintEqualToConstant: (CGFloat)c;
|
||||
- (NSLayoutConstraint *) constraintGreaterThanOrEqualToConstant: (CGFloat)c;
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#define _NSLayoutGuide_h_GNUSTEP_GUI_INCLUDE
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import "AppKit/NSUserInterfaceItemIdentification.h"
|
||||
#import "AppKit/NSLayoutConstraint.h"
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
|
||||
|
||||
|
@ -33,7 +35,41 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
@interface NSLayoutGuide : NSObject
|
||||
@class NSView, NSLayoutXAxisAnchor, NSLayoutYAxisAnchor, NSLayoutDimension;
|
||||
|
||||
@interface NSLayoutGuide : NSObject <NSCoding, NSUserInterfaceItemIdentification>
|
||||
|
||||
- (NSRect) frame;
|
||||
|
||||
- (NSView *) owningView;
|
||||
- (void) setOwningView: (NSView *)owningView;
|
||||
|
||||
- (NSUserInterfaceItemIdentifier) identifier;
|
||||
- (void) setIdentifier: (NSUserInterfaceItemIdentifier)identifier;
|
||||
|
||||
- (NSLayoutXAxisAnchor *) leadingAnchor;
|
||||
- (NSLayoutXAxisAnchor *) trailingAnchor;
|
||||
- (NSLayoutXAxisAnchor *) leftAnchor;
|
||||
- (NSLayoutXAxisAnchor *) rightAnchor;
|
||||
- (NSLayoutYAxisAnchor *) topAnchor;
|
||||
- (NSLayoutYAxisAnchor *) bottomAnchor;
|
||||
- (NSLayoutDimension *) widthAnchor;
|
||||
- (NSLayoutDimension *) heightAnchor;
|
||||
- (NSLayoutXAxisAnchor *) centerXAnchor;
|
||||
- (NSLayoutYAxisAnchor *) centerYAnchor;
|
||||
|
||||
- (BOOL) hasAmbiguousLayout;
|
||||
|
||||
- (NSArray *) constraintsAffectingLayoutForOrientation: (NSLayoutConstraintOrientation)orientation;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSView (NSLayoutGuideSupport)
|
||||
|
||||
- (void) addLayoutGuide: (NSLayoutGuide *)guide;
|
||||
- (void) removeLayoutGuide: (NSLayoutGuide *)guide;
|
||||
|
||||
- (NSArray *) layoutGuides;
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue