mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Start adding logic to process constraints
This commit is contained in:
parent
af2319d26e
commit
a4a30889f7
1 changed files with 16 additions and 1 deletions
|
@ -30,6 +30,7 @@
|
|||
#import "AppKit/NSView.h"
|
||||
#import "AppKit/NSAnimation.h"
|
||||
#import "AppKit/NSLayoutConstraint.h"
|
||||
#import "AppKit/NSWindow.h"
|
||||
|
||||
static NSMutableArray *activeConstraints;
|
||||
|
||||
|
@ -229,6 +230,11 @@ static NSMutableArray *activeConstraints;
|
|||
_multiplier = multiplier;
|
||||
_constant = constant;
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self
|
||||
selector: @selector(_handleWindowResize:)
|
||||
name: NSWindowDidResizeNotification
|
||||
object: [_firstItem window]];
|
||||
|
||||
[activeConstraints addObject: self];
|
||||
}
|
||||
return self;
|
||||
|
@ -380,7 +386,11 @@ static NSMutableArray *activeConstraints;
|
|||
_secondItem = [coder decodeObject];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self
|
||||
selector: @selector(_handleWindowResize:)
|
||||
name: NSWindowDidResizeNotification
|
||||
object: [_firstItem window]];
|
||||
[activeConstraints addObject: self];
|
||||
|
||||
return self;
|
||||
|
@ -448,5 +458,10 @@ static NSMutableArray *activeConstraints;
|
|||
_constant];
|
||||
}
|
||||
|
||||
- (void) _handleWindowResize: (NSNotification *)notification
|
||||
{
|
||||
NSLog(@"Resized");
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue