Re: GUI quickly?



Here are a couple of options:

   - Parse your variable list through regular expressions and dynamically
   build your interface.
   - Offline generate a glade (or GtkBuilder file) based on the same
   parsing. The syntax of glade and GtkBuilder is very straight forward.

Regarding the callback, the question is if you really want to get a callback
for each of the four characters "3",".","1" and "4". After all you are not
likely to use them until you press some [Go] button, or at least leave the
widget. In any case it will help you in this case to use the
g_object_set_data() function to attach the name of the data to the entry or
ComboBox widgets.

If you instead use the [Go] button approach, then you can save all your
widgets in a list and in the [Go] clicked signal handle, query them all for
their current values. This latter approach is how I do it now, after having
used the callback on each keypress in the beginning of my Gtk days. (Which
is closer to how Perl/Tk works).

Regards,
Dov

2009/2/10 Juhana Sadeharju <kouhia nic funet fi>


This is related to open source free project, please help.

I have described variables this way:
NPC / Weight, float
NPC / AI Data / Mood, "<list of choices here>"

What are possibilities for creating GUI with minimal work?
I may group variables to groups, one per window.
I may group variables to subgroups, one per tab.
I may add widget type IDs if that is not clear.
But, using Glade to built the windows is too time-consuming.

Of course, when a value has been edited in GUI, I should
receive message: "NPC / Weight" changed to 3.14, etc.

Juhana
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]