Blender Git Loki

Git Commits -> Revision 1a7eeb4

February 5, 2017, 15:43 (GMT)
Initial implementation of a uiTable API

This adds an initial (and already working), generic API for defining, handling and drawing of table UIs.

It supports two types of tables:
* Vertical flow: Rows are all in a vertical stack.
* Horizontal flow: Rows are stacked vertically, until some threshold height is reached. The table is then split into another vertical stack that is drawn next to the former one. Such drawing could be used for the file browser in non-thumbnail mode.

A table is built out of - guess what - rows and columns. The API allows defining new collumns (identified by an id-name) and inserting new rows at any point. When drawing, we draw a cell for each column/row combination, using a custom cell-drawing callback.
The uiTable API will probably get some support for drawing buttons (uiBut) into custom layouts (uiLayout).

The API is written with big data sets in mind. In future we may get a spreadsheet view where data like all vertices of a mesh is displayed. That would result in thousands of rows, the uiTable API should be ready for this.

Commit Details:

Full Hash: 1a7eeb4feff0c5b4117010e34fb231c27526590e
Parent Commit: 99cfad6
Lines Changed: +508, -1

2 Added Paths:

/source/blender/editors/include/UI_table.h (+68, -0) (View)
/source/blender/editors/interface/table.c (+437, -0) (View)

3 Modified Paths:

/source/blender/editors/include/UI_interface.h (+1, -1) (Diff)
/source/blender/editors/interface/CMakeLists.txt (+1, -0) (Diff)
/source/blender/editors/util/CMakeLists.txt (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021