Re: [gtkmm] Custom widget example
- From: Paul Davis <paul linuxaudiosystems com>
- To: "Murray Cumming" <murrayc murrayc com>
- Cc: gtkmm-list <gtkmm-list gnome org>, Ainsley Pereira <gtkmm pebble org uk>
- Subject: Re: [gtkmm] Custom widget example
- Date: Tue, 12 Oct 2004 16:30:05 -0400
>> that's a very complicated example. a much better one would be the ones
>> in libs/gtkmmext, for example the BarController. this has an internal
>> DrawingArea widget which it scribbles on in its expose handler.
>
>I am trying not to use the DrawingArea because the GTK+ widgets don't use
>it. But I'm not sure what extra things DrawingArea gives.
i just remembered. the alternative is to do something like:
Gdk::Window* win = get_window();
if (!win) {
/* can't draw */
} else {
win->draw_foobar (gc, args ....);
}
you are then using whatever window the widget has been "attached" to
without creating an explicit Gdk::Window/Drawable for its own
purposes.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]