[glade--]How to access sibling widgets?

Enrico Scholz <[email protected]>
Newsgroups gmane.comp.gnome.glademm
Message-ID <[email protected]>
Hello,

when having a widget tree like

| window1
| `- vbox1
|    |- entry1
|    `- entry2

marking entry1/entry2 as public and generating a separate class and file
for them, how can I access entry1 from entry2?

glade-- creates the following code

| window1_glade::window1_glade(...)
| {
|   ...
|   _data = new GlademmData(get_accel_group());
|    
|   entry1 *entry1 = Gtk::manage(new class entry1(_data));
|   entry2 *entry2 = Gtk::manage(new class entry2(_data));
|   ...
| }

which does not give any information about 'entry1' to 'entry2'.

When modifying glade-- to generate other constructors which are taking
the parent-object as an argument, code like

 --- window1_glade.cc
|   entry1 *entry1 = Gtk::manage(new class entry1(*this));
|   entry2 *entry2 = Gtk::manage(new class entry2(*this));

 --- entry2.hh
| class window1_glade;
| class entry2 : public entry2_glade
| { ...
|    entry2(window1_glade &data) : entry2_glade(data)

could be created and 'entry1' would be accessible through 'data.entry1'. I do
not know why 'window1.get_accel_group()' was encapsulated in a GlademmData
object, but it would be still accessible through 'data.get_accel_group()'.

The documentation mentions GMM_* macros, but they do not seem to exist
anymore.

I am using glademm-1.1.3d with gtkmm2.



Enrico
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.