mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 00:50:49 +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
dcdcf97213
commit
ad09d1f672
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>
|
2006-07-10 00:12 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Source/NSSplitView.m: Keyed encoding changes in initWithCoder:
|
* Source/NSSplitView.m: Keyed encoding changes in initWithCoder:
|
||||||
|
|
|
@ -105,6 +105,13 @@ typedef struct _GSWindowTemplateFlags
|
||||||
NSString *_autosaveName;
|
NSString *_autosaveName;
|
||||||
Class _baseWindowClass;
|
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;
|
- (void) setBackingStoreType: (NSBackingStoreType)type;
|
||||||
- (NSBackingStoreType) backingStoreType;
|
- (NSBackingStoreType) backingStoreType;
|
||||||
- (void) setDeferred: (BOOL)flag;
|
- (void) setDeferred: (BOOL)flag;
|
||||||
|
|
|
@ -75,6 +75,48 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
[super dealloc];
|
[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
|
- (id) initWithCoder: (NSCoder *)coder
|
||||||
{
|
{
|
||||||
if ([coder allowsKeyedCoding])
|
if ([coder allowsKeyedCoding])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue