[gtkmm] Gdk::GC doesn't work as described



Hello List,

i need to create a GC for a DrawingArea,
following the examples in the tutorial, i can't get any result,
it seems that the tutorial-code is not up-to-date.
here is a code-snippet:
(from the tutorial)

  Gdk::GC some_gc;
  some_gc.create(get_window());
  Gdk::Color some_color;
  Gdk::Colormap some_colormap(Gdk::Colormap::get_system());
  some_color.set_red(65535);
  some_color.set_green(65535);
  some_color.set_blue(0);
  some_colormap.alloc(some_color);
  some_gc.set_foreground(some_color);
		  
i create all necessary things (i think)

but the compiler says that Gdk::GC is protected (which is correct 
according to the includes and the API-Reference)

it says also, that Gdk::Colormap::get_system() is undefined.

can somebody please give me a correct version of the code-snippet
so i can work on?

TIA
-- 
Greetings
  Torsten




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]