Re: How to udate an image using on_expose_event()?
- From: Bob Caryl <bob fis-cal com>
- To: MERT TUGCU <merttugcu hotmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: How to udate an image using on_expose_event()?
- Date: Thu, 20 Oct 2005 16:13:03 -0500
MERT TUGCU wrote:
Hi,
I am a little bit new to gtkmm. In my application I need to display an
image which is stored in a memory buffer. I checked the drawing area
example in the tutorial but it didn't help. I have three drawing
areas in my application to display three different images. My question
is how can I redraw an image that is stored in memory when something
gets on top of it or the UI is minimized etc. The prototype for the
function is:
virtual bool on_expose_event(GdkEventExpose* e); and I couldn't figure
out how to pass a pointer, that points to an image, to this function.
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
Hey MERT,
There are two ways to do this.
1. Connect to your drawing area's on_expose_event signal specifying a
callback that will update your drawing area. See
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/apb.html#id2510543
for information on how to connect a callback slot to a particular signal.
2. Derive your own class for your drawing area and then override the
function to which your referred in your message (on_expose_event).
Bob Caryl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]