a couple of newbie questions regarding developing apps in GTK+



Hello fellow programmers and linux enthusiasts,

I am relatively new to GTK+ developing environment, but have a good
knowledge of C/C++, perl, Basic, and some older languages (although I am
still a bit clumsy when it comes to objective approach as well as complex
data structures), and am currently developing a rather ambitious
application. I've bought Developing Linux Applications book, but it seems
that it has some of its content outdated, namely manipulation of pixmaps as
widgets. I have several questions in regards to GTK+ and Glade app (which I
do understand is not a part of this mailing list, but nonetheless most of
the questions pertaining to Glade still draw its roots in GTK). I would
greatly appreciate any help I can get. Here are the questions:

1) When creating a front-end in Glade, the sources of the code get dumped in
such a way that interface.c file contains function(s) that pertain to
building the actual widgets and windows. The problem I am having with this
is that when I try to reference any of the widgets, their pointer address is
always null (due to fact that all of their references vanish when the
execution of the above mentioned function is done and returns just a pointer
to itself, but I am unable to discern from either the book or online
examples what is the hierarchy between let's say the default window and
different widgets that belong to that window). I tried making pointers to
widgets static and even static const, but those did not help either and I
still kept getting "null" pointer errors when trying to reference any of the
widgets. Then, I saw that the above mentioned book implements widget/window
creation in the main() function and thus circumvents some of these issues
since main function is familiar of its elements at all times. My question is
how can I utilize Glade's implementation and still have access to all
widgets by other functions? (obviously interfaces.h is included in other
sources so that is not the issue) How come that static implementation does
not yield results? What reprecussions does implementation of widget
construction in the main() function create since (as I currently understand
it) main() function constantly cycles itself? Any kind of example code would
be greatly appreciated!

2) This all brings me to a second question. All this is due to fact that I
am trying to create a graphical counter which is implemented by putting up 5
pixmap widgets representing a clock in 00:00 format (4 of this would have to
change obviousy, while the column would remain the same), and currently the
problem I am running into is that the above mentioned book references and
alters pixmaps by using them in the source code as an array, but I am trying
to use pixmaps as image files. All the references online have just
implementation how to create a pixmap, but not how to alter ti once the
program is up and running and it has already been set. Can you please
provide me with a simple example of a code as to how to achieve change of
the pixmap content without destroying a widget, or point me to a website
which could have an example of such or similar code?

3) Finally, is there a website where you can see a complete list of
functions/classes that are implemented in the GTK and their data members
that they take on (kind of like man pages for every gtk_* instruction)?

I apologize for a long e-mail, but I am currently dealing with some severe
time constraints and I am getting desperate in an attempt to solve this
issue. Any help would be greatly appreciated! Sincerely,


Ivica "Ico" Bukvic, composer
http://meowing.ccm.uc.edu/~ico/
http://bukvicrh.dyndns.org/ico/
ico fuse net
============================
"To be is to do" - Socrates
"To do is to be" - Sartre
"Do be do be do" - Sinatra
"Just do it!"    - NIKE






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