protected override void OnSizeAllocated(Rectangle allocation)
        {
            base.OnSizeAllocated(allocation);

            if (IsRealized)
            {
                event_window.MoveResize(allocation);
            }

            MoveResize(allocation);
            RecalculateColumnSizes();
            RegenerateColumnCache();

            if (vadjustment != null)
            {
                hadjustment.PageSize      = header_interaction_alloc.Width;
                hadjustment.PageIncrement = header_interaction_alloc.Width;
                vadjustment.PageSize      = list_rendering_alloc.Height;
                vadjustment.PageIncrement = list_rendering_alloc.Height;
                UpdateAdjustments();
            }

            ICareAboutView model = Model as ICareAboutView;

            if (model != null)
            {
                model.RowsInView = RowsInView;
            }

            InvalidateList();
        }
        protected override void OnSizeAllocated(Gdk.Rectangle allocation)
        {
            base.OnSizeAllocated(allocation);

            if (IsRealized)
            {
                event_window.MoveResize(allocation);
            }
        }
Beispiel #3
0
        private void SetMouseActionArea()
        {
            Rectangle glass_bounds = glass.Bounds();

            action_area = background;
            // expand action area to include bounds area
            action_area.Y      = glass_bounds.Y;
            action_area.Height = glass_bounds.Height;

            //	resize event window to match new action area
            if (event_window != null)
            {
                event_window.MoveResize(action_area.X, action_area.Y, action_area.Width, action_area.Height);
            }
        }
Beispiel #4
0
        protected override void OnSizeAllocated(Rectangle allocation)
        {
            if (allocation.X < 0 || allocation.Y < 0)
            {
                Log.Error("SizeAllocate call received from container with negative coordinate(s): " + allocation.ToString() + Environment.NewLine +
                          "(Prevent adjustments from receiving bad values; i.e.: negative values, or upper values lower than page size/increment, or any positive Value when the upper value is zero, etc.)");
                return;
            }

            base.OnSizeAllocated(allocation);

            if (IsRealized)
            {
                event_window.MoveResize(allocation);
            }

            MoveResize(allocation);
            RecalculateColumnSizes();
            RegenerateColumnCache();

            if (ViewLayout != null)
            {
                ViewLayout.Allocate((Hyena.Gui.Canvas.Rect)list_rendering_alloc);
            }

            if (vadjustment != null)
            {
                hadjustment.PageSize      = header_interaction_alloc.Width;
                hadjustment.PageIncrement = header_interaction_alloc.Width;
                vadjustment.PageSize      = list_rendering_alloc.Height;
                vadjustment.PageIncrement = list_rendering_alloc.Height;
                UpdateAdjustments();
            }

            ICareAboutView model = Model as ICareAboutView;

            if (model != null)
            {
                model.RowsInView = RowsInView;
            }

            OnInvalidateMeasure();
            InvalidateList();
        }
Beispiel #5
0
        protected override void OnSizeAllocated(Gdk.Rectangle alloc)
        {
            base.OnSizeAllocated(alloc);
            int legend_height = LegendHeight();

            Gdk.Rectangle bar = new Rectangle(alloc.X + border, alloc.Y + border,
                                              alloc.Width - 2 * border,
                                              alloc.Height - 2 * border - glass.handle_height);


            if (left.Allocation.Y != bar.Y || left.Allocation.X != bar.X)
            {
                left.SetSizeRequest(-1, bar.Height);
                this.Move(left, bar.X - Allocation.X, bar.Y - Allocation.Y);
            }

            if (right.Allocation.Y != bar.Y || right.Allocation.X != bar.X + bar.Width - right.Allocation.Width)
            {
                right.SetSizeRequest(-1, bar.Height);
                this.Move(right, bar.X - Allocation.X + bar.Width - right.Allocation.Width,
                          bar.Y - Allocation.Y);
            }

            background = new Rectangle(bar.X + left.Allocation.Width, bar.Y,
                                       bar.Width - left.Allocation.Width - right.Allocation.Width,
                                       bar.Height);

            legend = new Rectangle(background.X, background.Y,
                                   background.Width, legend_height);

            action = background.Union(glass.Bounds());

            if (event_window != null)
            {
                event_window.MoveResize(action.X, action.Y, action.Width, action.Height);
            }

            this.Offset = this.Offset;

            UpdateButtons();
        }
        protected override void OnSizeAllocated(Gdk.Rectangle allocation)
        {
            base.OnSizeAllocated(allocation);

            if (IsRealized)
            {
                event_window.MoveResize(allocation);
            }

            int oldHeaderAllocWidth = header_interaction_alloc.Width;

            RecalculateWindowSizes(allocation);

            if (oldHeaderAllocWidth != header_interaction_alloc.Width)
            {
                AutoCalculateColumnSizes();
                UpdateColumnCache();
            }

            if (vadjustment != null)
            {
                hadjustment.PageSize      = header_interaction_alloc.Width;
                hadjustment.PageIncrement = header_interaction_alloc.Width;
                vadjustment.PageSize      = list_rendering_alloc.Height;
                vadjustment.PageIncrement = list_rendering_alloc.Height;
                UpdateAdjustments(null, null);
            }

            ICareAboutView careAboutView = Model as ICareAboutView;

            if (careAboutView != null)
            {
                careAboutView.RowsInView = RowsInView;
            }

            InvalidateList();
        }