Re: [gtkmm] Custom widget example



>> 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]