Adrian E. Feiguin | 2 Feb 22:23 2004
Picon

Re: Changing axis ticks multiple times?

Sorry for not replying before. That's true, this actually happens with 
all the changes you make on a plot. I you replot everything for every 
single change, it could be too time consumming, so you want to make all 
the changes first, and then replot. Saludos,
<ADRIAN>

Al Hooton wrote:

>	Never mind, I figured it out.  For anybody else that gets stuck on
>this: while it appears that some of the items in/on a plot will refresh
>when the plot is refreshed, the axis ticks/labels are not.  In order to
>refresh these, you have to refresh the underlying canvas the plot is on.
>
>
>On Sat, 2004-01-24 at 00:42, Al Hooton wrote:
>  
>
>>	OK, so I must be missing something here...   When I first create a
>>plot, I have correctly connected a custom tick handler, and I get the
>>results I expect when I call gtk_plot_axis_set_ticks -- my ticks are
>>generated as I want.
>>
>>	However, I can never seem to change them again.  I have tried several
>>things, including repainting the plot and/or the axis widget after
>>changing my custom tick handler and then again calling
>>gtk_plot_axis_set_ticks, but the ticks *never* change from the way they
>>were first generated.
>>
>>	How can I change the ticks again after they have been set up the first
>>time, and get the changes to display?  I know there must be a way to do
(Continue reading)

Al Hooton | 8 Feb 01:32 2004

Using plot and sheet together?

	I have a situation where I have a base canvas, and I want to overlay
both a plot and sheet on it.  Both will be transparent, and they will be
shown at times individually and at times together.  I have the plot
working well, and I know how to have multiple plots on a canvas. 
However, a plot and sheet together is giving me trouble.

	Anybody have some suggestions?  I am currently trying to add the sheet
to the canvas as a custom child, but I have not been able to figure out
how to get the sheet to draw itself in that case.

	What I would *really* like is to add the sheet to the canvas exactly
the same way plots can be added.  Sheets would be well-understood
children of the canvas, like plots are.  However, it appears that a
canvas is only really set up to have either drawings on it as children
(lines, shapes, etc.), or plots as children.

	If anybody has suggestions on using plots and sheets together in the
same window, I'd really like to hear from you -- thanks!!

-- Al

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Al Hooton | 8 Feb 05:20 2004

transparent canvas working in gtkextra-2?

	Version: gtkextra-2 from CVS as a couple of weeks ago.

	I have successfully been using multiple plots on a canvas, with all the
plots transparent.  Today for the first time, I tried making the canvas
transparent also, so I could see through the plots and the canvas to
what is below.  However, the canvas is not transparent when I set it
with gtk_plot_canvas_set_transparent().

	I have tried a small test program that just creates a canvas as a child
of a parent window that has a blue background.  When I set the canvas to
transparent, I still have the while background of the canvas, instead of
seeing the blue background of the parent, so I know the canvas has not
become transparent.

	Is this a known problem?  Do we have a workaround?

	Thanks!

-Al

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Al Hooton | 9 Feb 05:49 2004

Re: transparent canvas working in gtkextra-2?

	Follow-up on this:

	I have now spent pretty much the entire weekend going trying to get a
canvas to be transparent in gtkextra-2.  It does not matter if the
canvas has no plots, one plot, many plots -- the canvas will never go
transparent so I can see what is behind it.

	I've stepped through gtkplotcanvas.c, and related code, trying to
figure out what is happening, but that has lead to a dead end.  It
appears to me the code should work, in that it is not attempting to draw
the main rectangle of the canvas when it is marked transparent. 
However, it is still being drawn.  If I comment out the calls to
gtk_plot_pc_draw_rectangle in gtk_plot_canvas_paint the rectangle is not
drawn, but the canvas still appears to have a pixbuf that covers
whatever is underneath.  I would have expected this pixbuf to be
unrealized if the canvas widget is transparent, but I'm probably missing
something in how this is supposed to work.

	Has anybody successfully gotten a transparent canvas?  I'd really like
to use the gtkextra-2 package for what I'm doing, but if the canvas can
not be transparent I may have to abandon this for something else -- not
my preference, since I already have so much work done on top of
gtkextra-2.

	Thanks!

-- Al

On Sat, 2004-02-07 at 20:20, Al Hooton wrote:
> 	Version: gtkextra-2 from CVS as a couple of weeks ago.
(Continue reading)

Adrian E. Feiguin | 9 Feb 20:02 2004
Picon

Re: transparent canvas working in gtkextra-2?

I still don't understand what you are trying to do, If you want to show 
other widgets, use the gtkfixed capabilities as I do with the buttons in 
testgtksheet. That's the only way to show other widgets inside a canvas. 
If what you want is to do something called MDI of Window in Window, 
that's not possible with gtk. You can use a notebook to diplay the plot 
in one tab and the sheets in other tabs. You can show buttons or icons 
in a canvas and get a sheet to appear on a different window when you 
click. Those are some ideas. But again, I still don't get it. What are 
you exactly trying to do?
Saludos,
<ADRIAN>

Al Hooton wrote:

>	Follow-up on this:
>
>	I have now spent pretty much the entire weekend going trying to get a
>canvas to be transparent in gtkextra-2.  It does not matter if the
>canvas has no plots, one plot, many plots -- the canvas will never go
>transparent so I can see what is behind it.
>
>	I've stepped through gtkplotcanvas.c, and related code, trying to
>figure out what is happening, but that has lead to a dead end.  It
>appears to me the code should work, in that it is not attempting to draw
>the main rectangle of the canvas when it is marked transparent. 
>However, it is still being drawn.  If I comment out the calls to
>gtk_plot_pc_draw_rectangle in gtk_plot_canvas_paint the rectangle is not
>drawn, but the canvas still appears to have a pixbuf that covers
>whatever is underneath.  I would have expected this pixbuf to be
>unrealized if the canvas widget is transparent, but I'm probably missing
(Continue reading)

Al Hooton | 9 Feb 23:15 2004

Re: transparent canvas working in gtkextra-2?

	Hi, Adrian:

	Thanks for responding so quickly, I truly do appreciate it.  Let me
describe more of what I'm trying to do.

	I have a situation where I want to display just a plot when the
application is in one operating mode, and optionally display a sheet
"under" the plot when the application is in a second operating mode.  In
the second mode, the user will enter data in the sheet, and I will
update the plot "over" the sheet as new data is entered.

	In the descriptions below, the phrase "sw/sheet" will mean  a GtkSheet
packed in to a ScrolledWindow container.

	I first tried to use the fact that GtkCanvas is a subclass of GtkFixed,
adding the plot as normal and adding the sw/sheet as a child of the
canvas with gtk_fixed_put().  However, this doesn't work, because there
is no way for the sw/sheet to be transparent (there are other side
effects as well, but the fact that the sw/sheet can not be transparent
causes this approach to not be workable for me).

	The next thing I tried, and one that I think would work well if the
canvas could be transparent, is the following (hopefully the ascii art
will come through):

GtkFixed
  |
  |--ScrolledWindow
  |    |
  |    |--GtkSheet
(Continue reading)

Adrian E. Feiguin | 9 Feb 23:24 2004
Picon

Re: transparent canvas working in gtkextra-2?

I would definitely use a notebook, and switch tabs when needed. You can 
set the tab insensitive or inactive (I guess, I've never done it) when 
you don't want the user to see the sheet/canvas. Alternatively you can 
use container_add/remove from the SW, and gtk_widget_ref, so it doen't 
get destroyed when you unparent the sheet/canvas from the SW.
Saludos,
<ADRIAN>

Al Hooton wrote:

>	Hi, Adrian:
>
>	Thanks for responding so quickly, I truly do appreciate it.  Let me
>describe more of what I'm trying to do.
>
>	I have a situation where I want to display just a plot when the
>application is in one operating mode, and optionally display a sheet
>"under" the plot when the application is in a second operating mode.  In
>the second mode, the user will enter data in the sheet, and I will
>update the plot "over" the sheet as new data is entered.
>
>	In the descriptions below, the phrase "sw/sheet" will mean  a GtkSheet
>packed in to a ScrolledWindow container.
>
>	I first tried to use the fact that GtkCanvas is a subclass of GtkFixed,
>adding the plot as normal and adding the sw/sheet as a child of the
>canvas with gtk_fixed_put().  However, this doesn't work, because there
>is no way for the sw/sheet to be transparent (there are other side
>effects as well, but the fact that the sw/sheet can not be transparent
>causes this approach to not be workable for me).
(Continue reading)

Adrian E. Feiguin | 9 Feb 23:28 2004
Picon

Re: transparent canvas working in gtkextra-2?

gtk_plot_canvas_set_transparent simply does not draw a background color. 
This is useful when you want to superimpose the plots on a background in 
a presentation, when you export it as an image (jpeg/gif/whatever).

Al Hooton wrote:

>	Hi, Adrian:
>
>	Thanks for responding so quickly, I truly do appreciate it.  Let me
>describe more of what I'm trying to do.
>
>	I have a situation where I want to display just a plot when the
>application is in one operating mode, and optionally display a sheet
>"under" the plot when the application is in a second operating mode.  In
>the second mode, the user will enter data in the sheet, and I will
>update the plot "over" the sheet as new data is entered.
>
>	In the descriptions below, the phrase "sw/sheet" will mean  a GtkSheet
>packed in to a ScrolledWindow container.
>
>	I first tried to use the fact that GtkCanvas is a subclass of GtkFixed,
>adding the plot as normal and adding the sw/sheet as a child of the
>canvas with gtk_fixed_put().  However, this doesn't work, because there
>is no way for the sw/sheet to be transparent (there are other side
>effects as well, but the fact that the sw/sheet can not be transparent
>causes this approach to not be workable for me).
>
>	The next thing I tried, and one that I think would work well if the
>canvas could be transparent, is the following (hopefully the ascii art
>will come through):
(Continue reading)

Al Hooton | 9 Feb 23:29 2004

Re: transparent canvas working in gtkextra-2?

	I looked at the notebook, but in a quick review I could not find a way
to see multiple pages at the same time.  

	If I have the sw/sheet on one page, and the canvas/plot on another
page, how would I handle the state where I want the user to see both of
them at the same time overlapped?  Unless I'm missing something, this
would require the notebook page to be able to go transparent, as well as
the item(s) packed in to it?

Thanks,
Al

On Mon, 2004-02-09 at 14:24, Adrian E. Feiguin wrote:
> I would definitely use a notebook, and switch tabs when needed. You can 
> set the tab insensitive or inactive (I guess, I've never done it) when 
> you don't want the user to see the sheet/canvas. Alternatively you can 
> use container_add/remove from the SW, and gtk_widget_ref, so it doen't 
> get destroyed when you unparent the sheet/canvas from the SW.
> Saludos,
> <ADRIAN>
> 
> Al Hooton wrote:
> 
> >	Hi, Adrian:
> >
> >	Thanks for responding so quickly, I truly do appreciate it.  Let me
> >describe more of what I'm trying to do.
> >
> >	I have a situation where I want to display just a plot when the
> >application is in one operating mode, and optionally display a sheet
(Continue reading)

Adrian E. Feiguin | 9 Feb 23:54 2004
Picon

Re: transparent canvas working in gtkextra-2?

You cannot overlap two widgets, forget about that. You need two windows 
or a paned window if you want to see both at the same time. 
Alternatively though you can embed the plot in a sheet, like in 
testgtksheet.

Al Hooton wrote:

>	I looked at the notebook, but in a quick review I could not find a way
>to see multiple pages at the same time.  
>
>	If I have the sw/sheet on one page, and the canvas/plot on another
>page, how would I handle the state where I want the user to see both of
>them at the same time overlapped?  Unless I'm missing something, this
>would require the notebook page to be able to go transparent, as well as
>the item(s) packed in to it?
>
>Thanks,
>Al
>
>
>On Mon, 2004-02-09 at 14:24, Adrian E. Feiguin wrote:
>  
>
>>I would definitely use a notebook, and switch tabs when needed. You can 
>>set the tab insensitive or inactive (I guess, I've never done it) when 
>>you don't want the user to see the sheet/canvas. Alternatively you can 
>>use container_add/remove from the SW, and gtk_widget_ref, so it doen't 
>>get destroyed when you unparent the sheet/canvas from the SW.
>>Saludos,
>><ADRIAN>
(Continue reading)


Gmane