Επανάληψη στις γραμμές προτύπου
Η Gtk::TreeModel παρέχει έναν τυπικό περιέκτη τεχνοτροπίας βιβλιοθήκης του θυγατρικού του, μέσα από τη μέθοδο children(). Μπορείτε να χρησιμοποιήσετε τις οικείες μεθόδους begin() and end() επαναλήπτη αύξησης, ως εξής:
typedef Gtk::TreeModel::Children type_children; //minimise code length. type_children children = refModel->children(); for(type_children::iterator iter = children.begin(); iter != children.end(); ++iter) { Gtk::TreeModel::Row row = *iter; //Do something with the row - see above for set/get. }
- 9.3.1. Θυγατρικά γραμμή