Notebooks in Gtk+ v1.2.x
- From: Jim Parker <hopeye cfl rr com>
- To: gtk-app-devel-list gnome org
- Subject: Notebooks in Gtk+ v1.2.x
- Date: Wed, 22 Jan 2003 18:02:15 -0500
G'Day !
Well no one responded to my last message. I'll assume it is do to my
poor communication skills and not being filtered to /dev/null ;-)
I am developing a CAD program. What I am trying to do is have multiple
drawing areas (OpenGL) available via a
notebook. Each drawing area needs access to the toolbar and menus, but
should have diffrent scale factors and viewing angles, among other
things. It is not known how many possible drawing areas will be open
at any given time.
I have been able to create the notebook and a couple of windows, but
can not figure out how to get them to respond to menu commands
independently.
My current thought is to create a struct, something like:
typedef struct {
GtkWidget *notebook_page;
GtkWidget *drawing_area;
gint page_number;
gfloat xRotation;
gfloat yRotation;
gfloat zRotation;
gfloat scale;
} typNotebookPage;
Now as I add a drawing area, I can fill the struct and add it to a
linked list.
Now here is where I am confused. I figure that, I can find the node in
the linked list during a page switch event, and use the memory address
to assign to a "current" struct, giving me access to the scale and
rotation
variables. This somehow does not seem to be the best way to do it. I
think that I will still have all my drawing areas respond to menu
commands, when in affect they shoud be frozen.
My guess is that what I am trying to do is something similar to what
the do with spreadsheets. I tried to figure out how gnumeric did it,
but got lost trying to follow the code.
Anybody have any thoughts or suggestions on this problem. Am I on the
right track ?
cheers,
Jim Parker
http://gtkcad.sourceforge.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]