~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockContainer.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2012-02-05 10:49:36 UTC
  • mto: (10.3.1)
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: package-import@ubuntu.com-20120205104936-4ujoylapu24cquuo
Tags: upstream-2.8.6.3+dfsg
ImportĀ upstreamĀ versionĀ 2.8.6.3+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
                        if (layout == null)
140
140
                                return;
141
141
                        
 
142
                        if (this.GdkWindow != null)
 
143
                                this.GdkWindow.MoveResize (rect);
 
144
                        
142
145
                        // This container has its own window, so allocation of children
143
146
                        // is relative to 0,0
144
147
                        rect.X = rect.Y = 0;
170
173
                        return res;
171
174
                }
172
175
 
 
176
                protected override void OnAdded (Widget widget)
 
177
                {
 
178
                        System.Diagnostics.Debug.Assert (
 
179
                                widget.Parent == null,
 
180
                                "Widget is already parented on another widget");
 
181
                        System.Diagnostics.Debug.Assert (
 
182
                                System.Linq.Enumerable.Any (items, item => item.Widget == widget),
 
183
                                "Can only add widgets to the container that are in the parent DockFrame's DockItem collection");
 
184
 
 
185
                        widget.Parent = this;
 
186
                }
 
187
 
 
188
                protected override void OnRemoved (Widget widget)
 
189
                {
 
190
                        System.Diagnostics.Debug.Assert (
 
191
                                widget.Parent != this,
 
192
                                "Widget is not parented on this widget");
 
193
                        System.Diagnostics.Debug.Assert (
 
194
                                System.Linq.Enumerable.Any (items, item => item.Widget == widget),
 
195
                                "Can only remove widgets from the container that are in the parent DockFrame's DockItem collection");
 
196
 
 
197
                        widget.Unparent ();
 
198
                }
173
199
 
174
200
                public void RelayoutWidgets ()
175
201
                {
357
383
 
358
384
                        Style = Style.Attach (GdkWindow);
359
385
                        Style.SetBackground (GdkWindow, State);
 
386
                        this.WidgetFlags &= ~WidgetFlags.NoWindow;
360
387
                        
361
388
                        //GdkWindow.SetBackPixmap (null, true);
362
389
                }
363
390
                
 
391
                protected override void OnUnrealized ()
 
392
                {
 
393
                        if (this.GdkWindow != null) {
 
394
                                this.GdkWindow.UserData = IntPtr.Zero;
 
395
                                this.GdkWindow.Destroy ();
 
396
                                this.WidgetFlags |= WidgetFlags.NoWindow;
 
397
                        }
 
398
                        base.OnUnrealized ();
 
399
                }
 
400
                
364
401
                internal void ShowPlaceholder ()
365
402
                {
366
403
                        placeholderWindow = new PlaceholderWindow (frame);