Order of children in a VBox
- From: Robert Pearce <rob bdt-home demon co uk>
- To: gtkmm-list gnome org
- Subject: Order of children in a VBox
- Date: Mon, 25 Apr 2011 14:27:34 +0100
I have an application in which I present a "sequence" definition for
editing. This display consists of a VBox full of widgets that show the
necessary information. When the user clicks OK I construct the real
sequence from those widgets, which allows me to leave the underlying
sequence untouched if the user hits CANCEL.
So, to my question. My method for generating the real sequence from the
editor consists of :
Program->clear();
steps = Recipe.get_children();
for ( iter=steps.begin(); iter != steps.end(); iter++ )
{
Gtk::Widget* child = *iter;
StepDisplay * psd = (StepDisplay*) child;
Program->push_back ( psd->SeqObj() );
}
As you can probably work out, this relies on the VBox::get_children()
returning the list of widgets in the order they are displayed. At the
moment I only ever pack them with pack_start() and I don't, as yet,
make any use of remove() or reorder_child().
And here's the question: This works at the moment, but is it
guaranteed to always work? Will the VBox::get_children() method always
produce the list in order, on any version of GTKmm, even if children
have been shuffled or removed?
Thanks,
Rob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]