treeview-refactor branch has landed.



The 'treeview-refactor' branch has landed in GTK+ master.

Brief overview of what this entails:

   - GtkCellRenderer manipulation has been centralized to the new
     GtkCellArea abstract class and it's first concrete class
     GtkCellAreaBox (manipulation = requesting size, rendering cells
     navigating focus inside an area, handling events and activating
     the focus cell... all of this is abstracted by the GtkCellArea).

   - Collections of GtkTreeModel rows can be layed out in
     a given "context". When a cell layouting widget uses GtkCellArea 
     it uses a GtkCellAreaContext to store information about sizes 
     and cell alignments for a collection of requested and rendered
     rows (for instance, the combo-box drop down menu uses a
     single context for each submenu as each submenu has the same
     width, this way cells are aligned together "per context").

   - Cells can now potentially be rendered in more dynamic ways
     by way of creating new GtkCellArea subclasses (i.e. classes
     that might have tabular layouts or such).

   - As a side-effect of GtkCellAreaBox, vertical layout of cells
     in the GtkTreeView is automatically possible, another automatic
     feature is that you can configure which cells in the area will
     be aligned with cells in other rows (i.e. do you want the icon
     that follows the text renderer to appear columnized, or do you
     want it to naturally follow the length of the text in that row,
     it's up to you via the "align" cell packing property).

   - Cells have "packing properties" when added to their area,
     GtkCellLayout internals have been updated to leverage this
     when parsing GtkBuilder xml, now things like "expand" can
     be specified as a <cell-packing> property when adding
     a cell to any cell layout in GtkBuilder xml.

Current status is that we still have to land 'combo-refactor' 
and 'icon-view-refactor', just waiting for some review and then
all GTK+ cell layouting widgets will be using internal GtkCellArea
to do the work of laying out cells (the layouting widgets are
still responsible for laying out areas inside a widget, for
individual GtkTreeModel rows, of course).

Cheers and enjoy !
      -Tristan




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