Re: GtkTreeView Refactoring Considerations [was Re: Private types inside GTK+]



On Tue, Oct 26, 2010 at 6:34 PM, Tristan Van Berkom
<tristanvb openismus com> wrote:
> Depending on the GtkSizeRequestMode in use by the parenting
> layout widget (hfw of wfh), generally only allocate_width()
> or allocate_height() will be called. However there will be
> cases where we get to further reduce computing of sizes at
> ->event()/->render() time by having both width and height
> allocated on a GtkCellArea (i.e. GtkTreeView's fixed-height-mode
> will allow us to just always know the complete allocated
> size and position of each renderer before rendering or handling
> events).
>
> After implementing the allocation methods, I'll move on
> to write/implement the actual ->render() and ->event() methods
> (which is more or less just copying what GtkTreeViewColumn
> does already).

As soon as you have implemented the allocation methods, I can also
take over and do the GtkTreeViewColumn migration, together with
merging in the refactorings I was talking about earlier.

> And finally what is still missing is a ->get_bounds() method
> to return a GdkRectangle of the actual space used by cell
> renderers inside the space allocated to a GtkCellArea (i.e.
> to allow parent layout widgets to smartly do their focus
> painting).

So I take it we will not be doing focus drawing in GtkCellArea, but
rather in the parent layout widget, right?  The focus drawing code for
GtkTreeView is currently at several places, so I will also look into
properly migrating that.

Another thing what get_bounds() will be useful for is to make it
possible to start rubber banding when clicking on an area that is not
covered by cell contents (and is thus "background").  See bug 350618.

> And then will come the grimy situation of pushing this all
> into GtkTreeView/GtkTreeViewColumn, looking in depth at
> validate_row again etc. (I'm sure I'll have some more
> questions and be happy to get any help in that area).

As soon as you have the allocate methods in place that you described
above, tell me and I can quickly do a tree view migration during the
evenings and see how far we can come with the current API.


regards,

-kris.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]