mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 23:40:38 +00:00
Add proxy objects to perform segue
This commit is contained in:
parent
435d688e98
commit
11b5b4d2d6
12 changed files with 529 additions and 61 deletions
|
@ -76,6 +76,7 @@
|
|||
#import "AppKit/NSTextField.h"
|
||||
#import "AppKit/NSTextFieldCell.h"
|
||||
#import "AppKit/NSView.h"
|
||||
#import "AppKit/NSViewController.h"
|
||||
#import "AppKit/NSWindow.h"
|
||||
#import "AppKit/NSWindowController.h"
|
||||
#import "AppKit/PSOperators.h"
|
||||
|
@ -723,6 +724,24 @@ static NSNotificationCenter *nc = nil;
|
|||
}
|
||||
}
|
||||
|
||||
+ (instancetype) windowWithContentViewController: (NSViewController *)viewController
|
||||
{
|
||||
NSView *view = [viewController view];
|
||||
NSRect frame = [view frame];
|
||||
NSString *title = [viewController title];
|
||||
NSUInteger style = NSTitledWindowMask |
|
||||
NSClosableWindowMask |
|
||||
NSMiniaturizableWindowMask |
|
||||
NSResizableWindowMask;
|
||||
NSWindow *window = [[self alloc] initWithContentRect: frame
|
||||
styleMask: style
|
||||
backing: NSBackingStoreBuffered
|
||||
defer: NO];
|
||||
[window setTitle: title];
|
||||
[window setContentView: view];
|
||||
return window;
|
||||
}
|
||||
|
||||
+ (void) removeFrameUsingName: (NSString*)name
|
||||
{
|
||||
if (name != nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue