[prev in list] [next in list] [prev in thread] [next in thread]
List: gtkmm
Subject: How to properly handle events on DrawingArea
From: Mj Mendoza IV <mjmendoza () konsolscript ! org>
Date: 2011-09-09 15:22:44
Message-ID: 1315581764.84867.YahooMailNeo () web77709 ! mail ! sg1 ! yahoo ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi all,
I have a DrawingArea which has to react on keypress, mouse moves an mouse clicks. \
Each event will have a graphical effect on the widget.
So far, the mouse move is synced with the rendering -- meaning, what I expected to be \
graphically present is drawn in DrawingArea.
Keypresses however is kind of not working. Assuming graphicsXYZ should be drawn when \
a keypress happens, the DrawingArea doesn't display it. I first have to mouse-over on \
the DrawingArea where the mousemove handler finally renders graphicsXYZ.
Second, how do force render DrawingArea... when I click a Button which is programmed \
to draw graphicsABC on a DrawingArea, same case as above, it won't render graphicsABC \
when I don't mouse-over on it.
Third, how do I remove the flickering? When I mousemove on DrawingArea (as if drawing \
a line or something), it flickers like crazy.
Btw, all the drawing I do is done with Cairo Context via \
get_window()->create_cairo_context().
Regards.
Mj Mendoza IV,
Developer, KonsolScript
http://www.konsolscript.org
Developer, Clash
http://geesas.sourceforge.net/clash
[Attachment #5 (text/html)]
<html><body><div style="color:#000; background-color:#fff; font-family:arial, \
helvetica, sans-serif;font-size:10pt"><div><span>Hi \
all,</span></div><div><br><span></span></div><div><span>I have a DrawingArea which \
has to react on keypress, mouse moves an mouse clicks.</span> <span>Each event will \
have a graphical effect on the \
widget.</span></div><div><br><span></span></div><div><span>So far, the mouse move is \
synced with the </span><span>rendering -- meaning, what I expected to be graphically \
present is drawn in DrawingArea.</span></div><div><br>Keypresses however is kind of \
not working. Assuming graphicsXYZ should be drawn when a keypress happens, the \
DrawingArea doesn't display it. I first have to mouse-over on the DrawingArea where \
the mousemove handler finally renders graphicsXYZ.<br><br>Second, how do force render \
DrawingArea... when I click a Button which is programmed to draw graphicsABC on a \
DrawingArea, same case as above, it won't render graphicsABC when I don't mouse-over \
on it.<br><br>Third, how do I remove the flickering? When I mousemove on DrawingArea \
(as if drawing a line or something), it flickers like crazy.<br><br>Btw, all the \
drawing I do is done with Cairo Context via <span style="font-weight: \
bold;">get_window()->create_cairo_context()</span>.<br><br><br></div><div>Regards.<br><br>Mj \
Mendoza IV,<br>Developer, KonsolScript<br><a rel="nofollow" target="_blank" \
href="http://www.konsolscript.org">http://www.konsolscript.org</a><br><br>Developer, \
Clash<br><a rel="nofollow" target="_blank" \
href="http://geesas.sourceforge.net/clash">http://geesas.sourceforge.net/clash</a></div></div></body></html>
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic