I am creating a hierarchy of objects representing a table drawn on a control. My hierarchy is as follows:
Table has multiple pages
Page has multiple lines
Line has multiple cells
Cell has multiple glyph
I want to have a parameter (parameter) in a table to filter the displayed column (s). The client code might do something like this:
myTable.ShowColumns(8,12)
Displaying and placing cells in a control is the responsibility of Lines. How to pass information about which cells should be displayed from the Table object to the Line object?
Should I give each row a link to a table object? Should I try to pass information to each row in the hierarchy every time it is called Table.ShowColumns()?
Should there be an elegant way?