]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/root.cpp
Enable loading of widgets from datafiles (not implemented for all widgets yet)
[libs/gltk.git] / source / root.cpp
index f8a4d9f76dcf0ef920fad27bae6f8a9d222d6a99..83042a63f3c8a62339d40b7ae5708306fef398da 100644 (file)
@@ -9,10 +9,27 @@ Root::Root(Resources &r, Window &w):
 {
        set_geometry(Geometry(0, 0, window.get_width(), window.get_height()));
 
+       update_style();
+
        window.signal_button_press.connect(sigc::mem_fun(this, &Root::button_press_event));
        window.signal_button_release.connect(sigc::mem_fun(this, &Root::button_release_event));
        window.signal_pointer_motion.connect(sigc::mem_fun(this, &Root::pointer_motion_event));
 }
 
+void Root::button_press_event(int x, int y, unsigned btn, unsigned)
+{
+       button_press(x, y, btn);
+}
+
+void Root::button_release_event(int x, int y, unsigned btn, unsigned)
+{
+       button_release(x, y, btn);
+}
+
+void Root::pointer_motion_event(int x, int y)
+{
+       pointer_motion(x, y);
+}
+
 } // namespace GLtk
 } // namespace Msp