Re: TreeModel selected row number
On Tuesday 22 March 2005 03:41, Murray Cumming wrote: Yes, I think it's that difficult. But the row number should not be useful anyway, because the TreeModel is iterator based. It's the same as wanting to get the numerical index of a std::list. It is actually very useful if the tree is being used as any sort of list box. And almost any gui toolkit I think of gives a row index in a list box so I would think it is a good candidate for a RFE. That said, I am used to writing index lookups in a std::vector so I can do it that way. John ___ gtkmm-list mailing list gtkmm-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtkmm-list
Re: TreeModel width
On Tuesday 22 March 2005 03:43, Murray Cumming wrote: Gtk::Widget::set_default_width() might do it, on the TreeView or the thks - I don't see that function listed under Widget in the api documentation - should I be looking somewhere else or is it just missing? John ___ gtkmm-list mailing list gtkmm-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtkmm-list
Re: TreeModel selected row number
On Tue, 2005-03-22 at 18:43 +0100, Murray Cumming wrote: currently I think this would have to be done: std::string color = row[menuColums.color] if (color == blue) {...} //if I want to key to somethingelse have to find index of blue An id column will do the same, I think. I also doubt that the string comparison will be a significant performance hit in an app that's probably waiting most of the time anyway. Furthermore, you'd be doing that string comparison in order to get some ID to actually use with some with something. It's easier to put that mapping in the list itself. I'm choosing an example that proves my point, but I can't think of one right now that doesn't. -- Murray Cumming [EMAIL PROTECTED] www.murrayc.com www.openismus.com ___ gtkmm-list mailing list gtkmm-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtkmm-list
Re: extend Drawing Area class
On Tue, 2005-03-22 at 13:15 -0500, Jeff Simpson wrote: (also posted to glade-users): I'm hoping somebody can point me in the right direction for a project I'm working on. Basically, I need to add a few extra functions to the DrawingArea object, and I'd like to use Glade / gtkmm as much as possible. The code needs to be in C++ due to some already existing functions that I'd like to not have to re-write. Can anybody point me in the right direction for how to create a new custom class/object based on DrawingArea? I'd like it to have all the existing functions of DrawingArea (draw_line, etc) but also have a few customized functions. Thanks for any help! get_widget_derived(): http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch19s03.html -- Murray Cumming [EMAIL PROTECTED] www.murrayc.com www.openismus.com ___ gtkmm-list mailing list gtkmm-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtkmm-list
TreeView Signal Problem
Not my day with TreeView:) The TreeView signals do not appear to be sent - the text output does not appear when I click on any of the tree rows. All my button signals work fine. I tried to follow the tree example - any ideas? virtual void menuTreeOnClicked(const Gtk::TreeModel::Path path, Gtk::TreeViewColumn* column); . menuTreeView.signal_row_activated().connect(sigc::mem_fun(*this, NewStartupDialog::menuTreeOnClicked) ); .. void NewStartupDialog::menuTreeOnClicked(const Gtk::TreeModel::Path path, Gtk::TreeViewColumn*) { std::cout Test Tree Click std::endl; John ... ___ gtkmm-list mailing list gtkmm-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtkmm-list