Override default screen_changed Window function ?



First of all let me say "Hello" for the first time!

Yesterday i started with C++, and today I'm into GTKMM. I come from
Python and PyGTK. =) 

well what i'm trying to do... (becouse i need to...) is overriding the
default screen_changed window function, but the problem is that i can't
find how to do it. so, bassicaly, this here is the "python way" which
worked for me: 

First i defined a method inside my widget class which inherited from
gtk.DrawingArea for this particular case. (Gtk::DrawingArea in C++) 

class MyWidget(gtk.DrawingArea): 
    def screen_changed(self, widget, old_screen=None): 
        ... whatever you want to do goes here.... 
    ..(rest of the class)... 

after having that done. in main() method, i create the window and the
widget and everything else, and before showing the window, this is what
i wrote: 

    # Override default screen-changed Window function. 
       window.connect("screen-changed", mywidget.screen_changed) 
       mywidget.screen_changed(window) 

and that worked like a charm!!!! but i want to do that in C++, then....
how should i do that? please,, i can't find how to in the reference. 

Thanks!!!

k0001.-




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