mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-23 04:01:41 +00:00
New methods on NSView with code from viewWillMoveToWindow: and
viewWillMoveToSuperview:. The later are now empty to allow subclasses not to call the super implementation. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26053 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5efc693137
commit
3ac0da9c43
3 changed files with 90 additions and 66 deletions
|
@ -101,6 +101,11 @@ BOOL GSViewAcceptsDrag(NSView *v, id<NSDraggingInfo> dragInfo);
|
|||
- (void) postDragEvent: (NSEvent*)event;
|
||||
@end
|
||||
|
||||
@interface NSView (MoveToWindow)
|
||||
// Normally this method is only used internally.
|
||||
- (void) _viewWillMoveToWindow: (NSWindow*)newWindow;
|
||||
@end
|
||||
|
||||
/*
|
||||
* Category for internal methods (for use only within the NSWindow class itself
|
||||
* or with other AppKit classes.
|
||||
|
@ -731,7 +736,7 @@ many times.
|
|||
}
|
||||
/* Clean references to this window - important if some of the views
|
||||
are not deallocated now */
|
||||
[_wv viewWillMoveToWindow: nil];
|
||||
[_wv _viewWillMoveToWindow: nil];
|
||||
/* NB: releasing the window view does not necessarily result in the
|
||||
deallocation of the window's views ! - some of them might be
|
||||
retained for some other reason by the programmer or by other
|
||||
|
@ -951,7 +956,7 @@ many times.
|
|||
cframe.size = _frame.size;
|
||||
_wv = [windowDecorator newWindowDecorationViewWithFrame: cframe
|
||||
window: self];
|
||||
[_wv viewWillMoveToWindow: self];
|
||||
[_wv _viewWillMoveToWindow: self];
|
||||
|
||||
/* Create the content view */
|
||||
cframe.origin = NSZeroPoint;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue