Re: Notebooks in Gtk+ v1.2.x



Well I have used that method when using other notebook dialogs, but for this situation the only widget on the page is the drawing widget.
That also was the first method I tried, calling the widgets 
draw_area_1, etc.  Unfortunately it did not work.  I am pretty 
convinced I need seperate rotation/zoom variables for each drawing 
area.  Hence my linked list idea.
thanks for the idea.

cheers,
Jim Parker

On 2003.01.22 19:24 Steve & Patti Getzinger wrote:
Jim Parker wrote:
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/
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Ok maybe I am going to get to simple here :) What about naming your 
elements in the page to reflect page #. So example: entry1 becomes 
1_entry1. Now if you hit the page to determine the # you can simply 
prepend it to the element name and your menu hits that element. No 
idea if that would work just an off the cuff idea.
Steve

_______________________________________________
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]