]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/panel.cpp
Store the Resources reference only in Root widget
[libs/gltk.git] / source / panel.cpp
index 59553b45de0122136a4c410ebf06a50ed378f6e4..f0c1c7c69f0f120b2d2696a049b75a3d975d3ed4 100644 (file)
@@ -25,15 +25,11 @@ using namespace std;
 namespace Msp {
 namespace GLtk {
 
-Panel::Panel(const Resources &r):
-       Widget(r),
-       Container(r),
+Panel::Panel():
        pointer_focus(0),
        pointer_grabbed(false),
        input_focus(0)
-{
-       update_style();
-}
+{ }
 
 void Panel::raise(Widget &wdg)
 {
@@ -193,7 +189,7 @@ Panel::Loader::Loader(Panel &p, map<string, Widget *> &m):
 template<typename T>
 void Panel::Loader::child(const string &n)
 {
-       RefPtr<T> chl = new T(pnl.res);
+       RefPtr<T> chl = new T();
        load_sub(*chl);
        pnl.add(*chl.get());
        wdg_map[n] = chl.release();
@@ -201,7 +197,7 @@ void Panel::Loader::child(const string &n)
 
 void Panel::Loader::panel(const string &n)
 {
-       RefPtr<Panel> p = new Panel(pnl.res);
+       RefPtr<Panel> p = new Panel();
        load_sub(*p, wdg_map);
        pnl.add(*p.get());
        wdg_map[n] = p.release();