mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Added method initWithWindow:.. to initialize the template from an actual window instance.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23162 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6dc3d8fd4b
commit
b718aee750
3 changed files with 55 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-07-14 01:17 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Headers/Additions/GNUstepGUI/GSNibCompatibility.h:
|
||||
* Source/GSNibCompatibility.m: Added method initWithWindow:.. to
|
||||
initialize the template from an actual window instance.
|
||||
|
||||
2006-07-10 00:12 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSSplitView.m: Keyed encoding changes in initWithCoder:
|
||||
|
|
|
@ -105,6 +105,13 @@ typedef struct _GSWindowTemplateFlags
|
|||
NSString *_autosaveName;
|
||||
Class _baseWindowClass;
|
||||
}
|
||||
- (id) initWithWindow: (NSWindow *)window
|
||||
className: (NSString *)windowClass
|
||||
isDefferred: (BOOL) deferred
|
||||
isOneShot: (BOOL) oneShot
|
||||
isVisible: (BOOL) visible
|
||||
wantsToBeColor: (BOOL) wantsToBeColor
|
||||
autoPositionMask: (int) autoPositionMask;
|
||||
- (void) setBackingStoreType: (NSBackingStoreType)type;
|
||||
- (NSBackingStoreType) backingStoreType;
|
||||
- (void) setDeferred: (BOOL)flag;
|
||||
|
|
|
@ -75,6 +75,48 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) initWithWindow: (NSWindow *)window
|
||||
className: (NSString *)windowClass
|
||||
isDefferred: (BOOL) deferred
|
||||
isOneShot: (BOOL) oneShot
|
||||
isVisible: (BOOL) visible
|
||||
wantsToBeColor: (BOOL) wantsToBeColor
|
||||
autoPositionMask: (int) autoPositionMask
|
||||
{
|
||||
if((self = [super init]) != nil)
|
||||
{
|
||||
if(window != nil)
|
||||
{
|
||||
// object members
|
||||
ASSIGN(_title, [window title]);
|
||||
ASSIGN(_viewClass, NSStringFromClass([[window contentView] class]));
|
||||
ASSIGN(_windowClass, windowClass);
|
||||
ASSIGN(_view, [window contentView]);
|
||||
ASSIGN(_autosaveName, [window frameAutosaveName]);
|
||||
|
||||
// style & size
|
||||
_windowStyle = [window styleMask];
|
||||
_backingStoreType = [window backingType];
|
||||
_maxSize = [window maxSize];
|
||||
_minSize = [window minSize];
|
||||
_windowRect = [window frame];
|
||||
_screenRect = [[NSScreen mainScreen] frame];
|
||||
|
||||
// flags
|
||||
_flags.isHiddenOnDeactivate = [window hidesOnDeactivate];
|
||||
_flags.isNotReleasedOnClose = (![window isReleasedWhenClosed]);
|
||||
_flags.isDeferred = deferred;
|
||||
_flags.isOneShot = oneShot;
|
||||
_flags.isVisible = visible;
|
||||
_flags.wantsToBeColor = wantsToBeColor;
|
||||
_flags.dynamicDepthLimit = [window hasDynamicDepthLimit];
|
||||
_flags.autoPositionMask = autoPositionMask;
|
||||
_flags.savePosition = YES; // not yet implemented.
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if ([coder allowsKeyedCoding])
|
||||
|
|
Loading…
Reference in a new issue