Inheritance: NSResponder
コード例 #1
0
ファイル: NSView.cs プロジェクト: smartmobili/CocoaBuilder
        protected virtual void _ViewWillMoveToWindow(NSWindow newWindow)
        {
            bool old_allocate_gstate;

            this.ViewWillMoveToWindow(newWindow);
            if (_coordinates_valid)
            {
                //FIXME
                //(*invalidateImp)(self, invalidateSel);
            }
            if (_rFlags.has_currects != 0)
            {
                this.DiscardCursorRects();
            }

            if (newWindow == _window)
            {
                return;
            }

            // This call also reset _allocate_gstate, so we have
            // to store this value and set it again.
            // This way we keep the logic in one place.
            old_allocate_gstate = _allocate_gstate;
            this.ReleaseGState();
            _allocate_gstate = old_allocate_gstate;

            if (_rFlags.has_draginfo != 0)
            {
                NSArray t = GSGetDragTypes(this);

                if (_window != null)
                {
                    //FIXME
                    //[GSDisplayServer removeDragTypes: t fromWindow: _window];
                    //if ([_window autorecalculatesKeyViewLoop])
                    //{
                    //	[_window recalculateKeyViewLoop];
                    //}
                }
                if (newWindow != null)
                {
                    //FIXME
            //					[GSDisplayServer addDragTypes: t toWindow: newWindow];
            //					if ([newWindow autorecalculatesKeyViewLoop])
            //					{
            //						[newWindow recalculateKeyViewLoop];
            //					}
                }
            }

            _window = newWindow;

            if (_rFlags.has_subviews != 0)
            {
                uint count = (uint)_sub_views.Count;

                if (count > 0)
                {
                    uint i;
                    NSView[] array = new NSView[count];

                    _sub_views.GetObjects((id[])array);
                    for (i = 0; i < count; ++i)
                    {
                        array[i]._ViewWillMoveToWindow(newWindow);
                    }
                }
            }
        }
コード例 #2
0
ファイル: NSView.cs プロジェクト: smartmobili/CocoaBuilder
 public virtual void ViewWillMoveToWindow(NSWindow newWindow)
 {
 }