コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: ListView_Windowing.cs プロジェクト: knocte/hyena
        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();
        }
コード例 #3
0
        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();
        }