2 writes to layout
System.Windows.Forms (2)
winforms\Managed\System\WinForms\DataGrid.cs (2)
337layout = CreateInitialLayoutState(); 5452this.layout = newLayout;
253 references to layout
System.Windows.Forms (253)
winforms\Managed\System\WinForms\DataGrid.cs (253)
681if (!layout.RowHeadersVisible) 858return layout.CaptionVisible; 861if (layout.CaptionVisible != value) { 862layout.CaptionVisible = value; 904if (layout.dirty) 1330Rectangle backButton = this.Caption.GetBackButtonRect(this.layout.Caption, alignRight, detailsButtonWidth); 1331Rectangle detailsButton = this.Caption.GetDetailsButtonRect(this.layout.Caption, alignRight); 1334backButton.X = MirrorRectangle(backButton, layout.Inside, isRightToLeft()); 1335detailsButton.X = MirrorRectangle(detailsButton, layout.Inside, isRightToLeft()); 1528caption.SetDownButtonDirection(!layout.ParentRowsVisible); 1789return layout.ParentRows; 1811Invalidate(layout.Data); 1865Invalidate(layout.Data); 1905Invalidate(layout.ParentRows); 1967Invalidate(layout.Inside); 2012if (layout.RowHeadersVisible) 2013Invalidate(layout.RowHeaders); 2014if (layout.ColumnHeadersVisible) 2015Invalidate(layout.ColumnHeaders); 2016Invalidate(layout.TopLeftHeader); 2093Invalidate(layout.Inside); 2136Invalidate(layout.Inside); 2158Invalidate(layout.Inside); 2188if (layout.RowHeadersVisible) 2189Invalidate(layout.RowHeaders); 2190if (layout.ColumnHeadersVisible) 2191Invalidate(layout.ColumnHeaders); 2192Invalidate(layout.TopLeftHeader); 2250int widthNotVisible = totalWidth - layout.Data.Width; 2259Rectangle scroll = layout.Data; 2260if (layout.ColumnHeadersVisible) 2261scroll = Rectangle.Union(scroll, layout.ColumnHeaders); 2360Invalidate(layout.Data); 2818layout.ColumnHeadersVisible = value; 2839return layout.ParentRowsVisible; 2842if (layout.ParentRowsVisible != value) { 2917if (layout.RowHeadersVisible) 3149Invalidate(layout.Data); 3153Invalidate(layout.Data); 3156if (layout.RowHeadersVisible) 3157Invalidate(layout.RowHeaders); 3158if (layout.ColumnHeadersVisible) 3159Invalidate(layout.ColumnHeaders); 3160Invalidate(layout.TopLeftHeader); 3165Invalidate(layout.Inside); 3168if (layout.RowHeadersVisible) 3169Invalidate(layout.RowHeaders); 3170if (layout.ColumnHeadersVisible) 3171Invalidate(layout.ColumnHeaders); 3172Invalidate(layout.TopLeftHeader); 3175Invalidate(layout.Data); 3178Invalidate(layout.Data); 3189layout.RowHeadersVisible = this.myGridTable == null ? false : this.myGridTable.RowHeadersVisible; 3194layout.ColumnHeadersVisible = this.myGridTable == null ? false : this.myGridTable.ColumnHeadersVisible; 3199if (layout.RowHeadersVisible) 3874if (layout.ParentRowsVisible) 4060Rectangle captionRect = layout.Caption; 4065if (layout.Data.Contains(e.X, e.Y) || layout.RowHeaders.Contains(e.X, e.Y)) { 4072layout.RowHeaders, 4192localGridRows[oldRow].OnMouseLeft(layout.RowHeaders, isRightToLeft()); 4244if ((layout.Data.Contains(e.X, e.Y) 4245|| (layout.RowHeadersVisible && layout.RowHeaders.Contains(e.X, e.Y)))) { 4259if (!localGridRows[rowOver].OnMouseMove(p.X, p.Y, layout.RowHeaders, alignToRight) && gridState[GRIDSTATE_dragging]) { 4284localGridRows[oldRow].OnMouseLeft(layout.RowHeaders, alignToRight); 4301Rectangle captionRect = layout.Caption; 4407if (this.layout.dirty) 4413if (layout.CaptionVisible) 4414caption.Paint(g, layout.Caption, isRightToLeft()); 4416if (layout.ParentRowsVisible) { 4417Debug.WriteLineIf(CompModSwitches.DataGridParents.TraceVerbose, "DataGridParents: Painting ParentRows " + layout.ParentRows.ToString()); 4418g.FillRectangle(SystemBrushes.AppWorkspace, layout.ParentRows); 4419parentRows.Paint(g, layout.ParentRows, isRightToLeft()); 4422Rectangle gridRect = layout.Data; 4423if (layout.RowHeadersVisible) 4424gridRect = Rectangle.Union(gridRect, layout.RowHeaders); 4425if (layout.ColumnHeadersVisible) 4426gridRect = Rectangle.Union(gridRect, layout.ColumnHeaders); 4432PaintBorder(g, layout.ClientRectangle); 4434g.FillRectangle(DefaultHeaderBackBrush, layout.ResizeBoxRect); 4468if (layout.CaptionVisible) 4469Invalidate(layout.Caption); 4470if (layout.ParentRowsVisible) 4471parentRows.OnResize(layout.ParentRows); 4476Rectangle oldClientRectangle = layout.ClientRectangle; 4506if (!this.layout.ResizeBoxRect.IsEmpty) 4507Invalidate(layout.ResizeBoxRect); 4509layout.ClientRectangle = newClientRectangle; 4523refresh.X = layout.Inside.X; 4524refresh.Width = layout.Inside.Width; 4525refresh.Height = layout.Inside.Bottom - cy; 4536caption.SetDownButtonDirection(!layout.ParentRowsVisible); 4702Rectangle inside = layout.Data; 4710Rectangle inside = layout.Data; 4771size = (int) g.MeasureString(columnName, headerFont).Width + layout.ColumnHeaders.Height + 1; // This is not a bug, the sort triangle's width is equal to it's height. 4808int visibleWidth = layout.Data.Width; 4840Invalidate(Rectangle.Union(layout.Data, layout.ColumnHeaders)); 4845Rectangle rightArea = layout.Data; 4846if (layout.ColumnHeadersVisible) 4847rightArea = Rectangle.Union(rightArea, layout.ColumnHeaders); 4889Rectangle clip = Rectangle.Union(layout.ColumnHeaders, layout.Data); 4892clip.Width = GetColBeg(col) - layout.Data.X - 2; 4898clip.Width = layout.Data.X + layout.Data.Width - leftEdge - 2; 4932int x = rightToLeft ? Math.Max(e.X, layout.Data.X) : Math.Min(e.X, layout.Data.Right + 1); 4958int visibleWidth = this.layout.Data.Width; 4988Invalidate(Rectangle.Union(this.layout.Data, this.layout.ColumnHeaders)); 4991Rectangle rightArea = Rectangle.Union(layout.ColumnHeaders, layout.Data); 4994rightArea.X = rightToLeft ? layout.Data.X : left; 5019caption.SetDownButtonDirection(!layout.ParentRowsVisible); 5073Rectangle rightArea = layout.Data; 5074if (layout.RowHeadersVisible) 5075rightArea = Rectangle.Union(rightArea, layout.RowHeaders); 5100Rectangle clip = Rectangle.Union(layout.RowHeaders, layout.Data); 5103clip.Height = layout.Data.Y + layout.Data.Height - topEdge - 2; 5135int y = Math.Min(e.Y, layout.Data.Y + layout.Data.Height + 1); 5147Rectangle rightArea = Rectangle.Union(layout.RowHeaders, layout.Data); 5281int dataLogicalBottom = layout.Data.Height + firstVisibleRowLogicalTop; 5327Rectangle oldResizeRect = this.layout.ResizeBoxRect; 5341LayoutData newLayout = new LayoutData(layout); 5352if (layout.CaptionVisible) { 5367if (layout.ParentRowsVisible) { 5384if (layout.ColumnHeadersVisible) { 5418if (layout.ColumnHeadersVisible) { 5461if (!oldResizeRect.Equals(this.layout.ResizeBoxRect) && !this.layout.ResizeBoxRect.IsEmpty) 5462Invalidate(this.layout.ResizeBoxRect); 5464this.layout.dirty = false; 5465Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: " + layout.ToString()); 5515int visibleWidth = layout.Data.Width; 5561Invalidate(layout.Data); 5562Invalidate(layout.ColumnHeaders); 5639Rectangle data = layout.Data; 5764int cy = layout.Data.Y; 5765int cx = layout.Data.X; 5771rowExclude.X = MirrorRectangle(rowExclude, layout.Data, alignToRight); 6073localGridRows[currentRow].LoseChildFocus(layout.RowHeaders, isRightToLeft()); 6195Rectangle inside = layout.Data; 6224int offset = layout.Data.X - negOffset; 6233return MirrorPoint(offset, layout.Data, isRightToLeft()); 6284Rectangle inside = layout.Data; 6303return layout.RowHeaders; 6307return layout.ColumnHeaders; 6315Rectangle inside = layout.Data; 6327if (layout.RowHeadersVisible) { 6328rowRect.Width += layout.RowHeaders.Width; 6329rowRect.X -= isRightToLeft() ? 0 : layout.RowHeaders.Width; 6343int offset = layout.Data.Y; 6431cellBounds.X += layout.Data.X - negOffset; 6432cellBounds.X = MirrorRectangle(cellBounds, layout.Data, isRightToLeft()); 6450rowBounds.X = layout.Data.X; 6452rowBounds.Width = layout.Data.Width; 6465int topOfData = layout.Data.Y; 6468if (layout.CaptionVisible && layout.Caption.Contains(x,y)) { 6472if (layout.ParentRowsVisible && layout.ParentRows.Contains(x,y)) { 6477if (!layout.Inside.Contains(x,y)) 6480if (layout.TopLeftHeader.Contains(x,y)) 6484if (layout.ColumnHeaders.Contains(x,y)) { 6498if (layout.RowHeaders.Contains(x,y)) { 6514if (layout.Data.Contains(x,y)) { 6565Invalidate(layout.Inside); 6572if (layout.CaptionVisible) 6573Invalidate(layout.Caption); 6581if (layout.CaptionVisible) { 6600columnArea.Height = layout.Data.Height; 6602columnArea.Y = layout.Data.Y; 6604int x = layout.Data.X - negOffset; 6612columnArea.X = MirrorRectangle(columnArea, layout.Data, isRightToLeft()); 6620if (layout.ParentRowsVisible) 6621Invalidate(layout.ParentRows); 6629Rectangle parentRowsRect = layout.ParentRows; 6650if (!layout.RowHeadersVisible) 6655invalid.X = layout.RowHeaders.X; 6656invalid.Width = layout.RowHeaders.Width; 6751if (totalWidth > layout.Data.Width && !needHorizScrollbar) { 6753layout.Data.Height -= horizHeight; 6754if (layout.RowHeadersVisible) 6755layout.RowHeaders.Height -= horizHeight; 6764layout.Data.Width -= vertWidth; 6765if (layout.ColumnHeadersVisible) 6768layout.ColumnHeaders.X += vertWidth; 6770layout.ColumnHeaders.Width -= vertWidth; 6779if (needVertScrollbar && totalWidth > layout.Data.Width && !needHorizScrollbar) { 6782layout.Data.Height -= horizHeight; 6783if (layout.RowHeadersVisible) 6784layout.RowHeaders.Height -= horizHeight; 6793layout.Data.Width -= vertWidth; 6794if (layout.ColumnHeadersVisible) 6797layout.ColumnHeaders.X += vertWidth; 6799layout.ColumnHeaders.Width -= vertWidth; 6805layout.ResizeBoxRect = new Rectangle(); 6807Rectangle data = layout.Data; 6808layout.ResizeBoxRect = new Rectangle(alignToRight ? data.X : data.Right, 6818int widthNotVisible = totalWidth - layout.Data.Width; 6826horizScrollBar.Bounds = new Rectangle(alignToRight ? layout.Inside.X + layout.ResizeBoxRect.Width : layout.Inside.X, 6827layout.Data.Bottom, 6828layout.Inside.Width - layout.ResizeBoxRect.Width, 6838int vertScrollBarTop = layout.Data.Y; 6839if (layout.ColumnHeadersVisible) 6840vertScrollBarTop = layout.ColumnHeaders.Y; 6844vertScrollBar.Bounds = new Rectangle(alignToRight ? layout.Data.X : layout.Data.Right, 6847layout.Data.Height + layout.ColumnHeaders.Height); 6851layout.Data.X += vertScrollBar.Width; 7084Point origin = new Point(0, layout.Data.Y); 7121Rectangle boundingRect = layout.ColumnHeaders; 7326if (layout.ColumnHeadersVisible) { 7328g.SetClip(layout.ColumnHeaders); 7332int columnHeaderHeight = layout.ColumnHeaders.Height; 7337if (layout.TopLeftHeader.Width > 0) { 7339g.FillRectangle(this.HeaderBackBrush, layout.TopLeftHeader); 7341g.FillRectangle(this.myGridTable.HeaderBackBrush, layout.TopLeftHeader); 7344ControlPaint.DrawBorder3D(g, layout.TopLeftHeader, Border3DStyle.RaisedInner); 7396bool paintRowHeaders = layout.RowHeadersVisible; 7433headerBounds.Width = layout.RowHeaders.Width; 8181if (layout.RowHeadersVisible && this.currentRow > -1) { 8183rowHdrRect.Width = layout.RowHeaders.Width; 8347if (localRows[CurrentRow].ProcessTabKey(keyData, layout.RowHeaders, isRightToLeft())) 8391if (localRows[CurrentRow - 1].ProcessTabKey(keyData, layout.RowHeaders, isRightToLeft())) 8405if (localRows[CurrentRow].ProcessTabKey(keyData, layout.RowHeaders, isRightToLeft())) { 8577caption.SetDownButtonDirection(!layout.ParentRowsVisible); 8625Rectangle rowsRect = layout.Data; 8626if (layout.RowHeadersVisible) 8627rowsRect = Rectangle.Union(rowsRect, layout.RowHeaders); 8796this.layout.RowHeadersVisible = newTable.IsDefault ? this.RowHeadersVisible : newTable.RowHeadersVisible; 8846Rectangle parentRowsRect = layout.ParentRows; 8847Rectangle underParentRows = layout.Data; 8849if (layout.RowHeadersVisible) { 8850underParentRows.X -= isRightToLeft() ? 0 : layout.RowHeaders.Width; 8851underParentRows.Width += layout.RowHeaders.Width; 8853if (layout.ColumnHeadersVisible) { 8854underParentRows.Y -= layout.ColumnHeaders.Height; 8855underParentRows.Height += layout.ColumnHeaders.Height; 8870layout.ParentRowsVisible = true; 8881NativeMethods.RECT scrollRECT = NativeMethods.RECT.FromXYWH(underParentRows.X, underParentRows.Y - layout.ParentRows.Height, underParentRows.Width, underParentRows.Height + layout.ParentRows.Height); 8898layout.ParentRowsVisible = false;