[glade--]How to access sibling widgets?
- From: Enrico Scholz <enrico scholz informatik tu-chemnitz de>
- To: glademm-list gnome org
- Subject: [glade--]How to access sibling widgets?
- Date: Fri, 21 Feb 2003 13:08:43 +0100
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]