[gtkmm] [TreeView] Data access complexity?



Hi,

 I need a bit of advise with TreeViews.  I have program which uses a
 ListStore to display 1000+ (fixed) rows.  Each row contains a
 couple of check boxes and a string.  The user can check any number of
 checkboxes and the program uses that as a "filter" to decide if some
 information should be displayed or not.  Nothing more complex than:

    if (row[display])
    {
        // append some output in another TreeView
    }

 the point is that iterating over the rows is not desired.  I now I can
 get the children of the ListStore and use an index to access a given
 row (the row number is known -- or can be easily obtained from the
 program's input).  Looking at the implementation of that, I eventually
 see a call to gtk_tree_model_iter_nth_child and the documentation for
 GTK+ doesn't help me understand what the complexity of this function
 is.  Before dwelling into the source of GTK+, does anyone have a clue
 on this?  Piece of advice?

 Also, I'm working on the assumption that back insertion on a ListStore
 is O(1), is this correct?

 TIA,

 Marcelo



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