Re: [gtkmm] Re: DrawingArea Dilema




OK, so what does that mean?
Where can I get an example of how to do this? None of the examples I am finding seem to work. So what do I need to add to my line[s] of code to make is function?

Thanks,
Mike

Ney André de Mello Zunino wrote:

Mike Eller wrote:

[...]

bool on_expose_event(GdkEventExpose*)
{
 Glib::RefPtr<Gdk::Window> win = get_window();


[...]

Compiling Error Message:
[mike mike playball]$ g++ main.cc -o main `pkg-config gtkmm-2.0 libglademm-2.0 --cflags --libs`
main.cc: In function `bool on_expose_event(GdkEventExpose*)':
main.cc:14: error: `get_window' undeclared (first use this function)


I am new to gtkmm, but I will give it a shot and try to help you anyway. Apparently, you are trying to access a non-static member function without an object and outside that member function's class' context. Here is an excerpt I took from the document "The Drawing Area Widget" [1]:

"The get_window() method is a part of the Gtk::Widget class, so if you put this code into a derived widget's implementation then you can call it just as it is, otherwise you'd use some_widget.get_window()."

[1] http://www.gtkmm.org/tutorial/sec-drawingarea.html

Regards,





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