Re: RFC: Gtk + XML chroming
- From: Tuomas Lukka <lukka fas harvard edu>
- To: Miguel de Icaza <miguel nuclecu unam mx>
- cc: gnome-list gnome org
- Subject: Re: RFC: Gtk + XML chroming
- Date: Mon, 19 Oct 1998 22:46:40 -0400 (EDT)
> The main problem I see with your approach is that it would be
> difficult to use in C.
Not necessarily -- see below.
> What I am convinced should be done is have a way to name individual
> widgets and bind those to C variables as well as doing the signal
> connection in C, like this:
>
> my_dialog ()
> {
> XmlDialog *dialog = xml_load_dialog_box ("file.xml");
> GtkWidget *entry = xml_get_widget (dialog, "entry");
> GtkWidget *users = xml_get_widget (dialog, "username-clist");
> GtkWidget *dirs = xml_get_widget (dialog, "dirs-clist");
>
> /* do something here with those widgets
> run (dialog);
> }
>
> So, any external representation of a GUI would be limited to
> specifying the layout for the widgets.
Well, there are two sides: yes, this is what the code partially does
below. Partially not: it sends "messages" to an object and that
could be implemented in C by
void receive_message(char *msg, char *param) {
if(!strcmp(msg,"quit")) {
} else if(...) {
...
}
}
so it would be possible to switch around buttons and menus and so on
since the signals would be sent as these messages or method calls.
Or the receiving end could be a CORBA object.
Tuomas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]