Re: Gtkmm draw line with mouse events
- From: Chris Vine <chris cvine freeserve co uk>
- To: Gurjot Singh <bhattigurjot gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Gtkmm draw line with mouse events
- Date: Sun, 13 Jul 2014 19:52:59 +0100
On Sun, 13 Jul 2014 23:24:26 +0530
Gurjot Singh <bhattigurjot gmail com> wrote:
On 13 July 2014 22:31, Juan R. Garcia Blanco <juanrgar gmail com>
wrote:
Hi,
Maybe the Gestures demo could serve as an example (not sure).
That example is using everything to draw in the one on_draw()
function. But I want to define some drawing in different function
which when called will draw it.
If that is not possible only then I'd be forced to do everything in a
single on_draw().
You should draw in the on_draw() method or in a draw signal handler so
that the widget re-renders correctly when this is necessary by virtue of
other desktop activities. Obviously your overriding on_draw() method
can call whatever other drawing functions it wants. You can force a
draw when needed by calling Gtk::Widget::queue_draw_area() and cognates.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]