Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- From: Douglas Roberts <dzzr lanl gov>
- To: Christof Petig <christof petig-baender de>
- Cc: Gtkmm List <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Date: Wed, 03 Sep 2003 09:59:20 -0600
Hi, Christof.
Yes, glademm is being used, and I can save the gui to C++ code. All the
automake stuff is configured correctly, and the application compiles and
runs. The one piece that I can't find is the functional equivalent to
lookup_widget() that glade provides for you in a file named
"interface.h" when you save the GUI as C code. Since I am now saving
the GUI as C++ code, instead of looking up a gtk widget, I need to
lookup the Gtk::object for each gui component. The C++ objects are
created in a file named
"glade_top_level_window_name"_glade.cc
Here's an example of where the objects are created for my "window1"
object from the file named "window1_glade.cc" in the "src" directory of
the code created by glade/glademm:
window1_glade::window1_glade(
) : Gtk::Window(Gtk::WINDOW_TOPLEVEL)
{
Gtk::Window *window1 = this;
gmm_data = new GlademmData(get_accel_group());
Gtk::Label *lable1 = Gtk::manage(new class Gtk::Label(_("TA System")));
Gtk::Label *current_date_label = Gtk::manage(new class
Gtk::Label(_("Current Date")));
Gtk::Entry *current_date_entry = Gtk::manage(new class Gtk::Entry());
Gtk::VBox *vbox5 = Gtk::manage(new class Gtk::VBox(false, 0));
Gtk::Label *analysis_start_date_label = Gtk::manage(new class
Gtk::Label(_("Analysis Start Date")));
.
.
.
Aside from making these Gtk::Object type definations global, how do I
get handles to them?
--Doug
Christof Petig wrote:
Douglas Roberts schrieb:
Actually, all the information to connect the signals is available at
compile time: glade writes out the callback stubs as C++ code.
This looks like glademm is being used.
I'm beginning to suspect that using XML::create() might be a mistake
in my case. What I want out of gtk+/glade is a RAD, where all
aspects of the gui are defined by the RAD (glade-2), and no manual
code hacking is required to redefine things like callbacks that were
already defined by the RAD (but ignored by XML::create()).
Perhaps you are looking for the --libglade option to glade--. Try it
and tell me which problems are still left. [no way to select this
option from within glade, yet]
All I really need is a handle to the Gtk C++ object wrappers to those
gtk widgets defined via glade, like what is provided for by
lookup_widget when C bindings are used to save the glade-produced
interface. There _must_ be a lookup tool provided for this when
glade saves the GUI with C++ bindings. Does anybody know what the
functional equivalent of lookup_widget is for C++ glade-produced code?
This sounds like libglademm (provide Gtkmm classes for xml instances).
Did glade-- generate pointers for your code (see above) if you marked
the interesting widgets as protected/public [C++ option in glade].
Christof (glademm maintainer)
--
===============================================================
Douglas Roberts, CCS-5 | "He has no enemies, but is
Los Alamos National Laboratory | intensely disliked by his
^ | friends."
(505)-667-4569 |
dzzr lanl gov | - Oscar Wilde
===============================================================
- References:
- [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]