Exemplo n.º 1
0
        public void AllocateArea(TextArea textArea, Gdk.Rectangle allocation)
        {
            if (!Visible)
            {
                Show();
            }
            allocation.Height -= (int)textArea.LineHeight;
            if (lastAllocation.Width == allocation.Width &&
                lastAllocation.Height == allocation.Height || allocation.Height <= 1)
            {
                return;
            }
            lastAllocation = allocation;

            if (textArea.Allocation != allocation)
            {
                textArea.SizeAllocate(allocation);
                SetSizeRequest(allocation.Width, (int)editor.LineHeight);
                var pos = ((MonoTextEditor.EditorContainerChild)editor [this]);
                if (pos.X != 0 || pos.Y != allocation.Height)
                {
                    editor.MoveTopLevelWidget(this, 0, allocation.Height);
                }
            }
        }