|
From: | Friedrich Beckmann |
Subject: | Re: Sheet replacement discussions |
Date: | Fri, 8 Jan 2016 20:25:37 +0100 |
Maybe I just look at the sheet replacement more independent from pspp. I see a data store which provides the data via the GtkTreeModel Interface. Our new view can optionally display a row of this data as column headers which are rendered in a special way (not scrolling). It can also optionally display a column as row headers. Therefore you tell the view which row should be used as column header and which column should be used as row header data. By design there could not be a different number of column headers and columns for the data. This would be different from the way GtkTreeView does it. But in GtkTreeView there is a complex relation that you manually select which column in the data store provides which attribute of the cell_renderer, e.g. the displayed column 8 takes the content of column 3 in the data store as „text“ attribute and the content of column 51 as background color. Each column in the view uses possibly several columns in the data store for attributes. It is also possible that there are columns in the store which are not used in the view at all. This allows of course that you can have different views of the same store. After writing these two paragraphs I noticed that there is a good reason not access the column headers as a normal row. If we ever want to render a different type than G_TYPE_STRING, then the view would probably not know how to render a column header row if there is a G_TYPE_OBJECT inside… And in GListStore the type of each column is fixed, e.g. row 1 col 5 cannot provide a different type than row 15 col 5. So our view could not work with GListStore if we ever render other types than G_TYPE_STRING and want a column header.
You can argue that the row headers are strictly generated without any information relating to the cases. If we see it as in Excel with no/never any relation to the data, then it would be part of the view, right? |
signature.asc
Description: Message signed with OpenPGP using GPGMail
[Prev in Thread] | Current Thread | [Next in Thread] |