]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/panel.h
Refactor Panel to create Layout internally on request
[libs/gltk.git] / source / panel.h
index e9744fd107a273c12365a86d11cec545228109d6..43c0f41b64d91a0241d9211f761e5702f9d5a47e 100644 (file)
@@ -36,7 +36,6 @@ public:
                Loader(Panel &, WidgetMap &);
 
        private:
-               Layout &get_layout();
                Widget &get_last_widget();
                template<typename T>
                void arrangement();
@@ -72,8 +71,6 @@ protected:
        static TypeRegistry<Loader::AddChildType, Loader &> widget_registry;
        static bool widget_registry_init_done;
 
-       Panel(const Panel &);
-       Panel &operator=(const Panel &);
 public:
        Panel();
        virtual ~Panel();
@@ -83,8 +80,7 @@ public:
 
        const char *get_class() const override { return "panel"; }
 
-       void set_layout(Layout *);
-       Layout *get_layout() { return layout; }
+       Layout &get_or_create_layout();
 
 protected:
        void autosize_special(const Part &, Geometry &) const override;