]> git.tdb.fi Git - libs/gltk.git/commitdiff
Adjust protections of list item base classes
authorMikko Rasa <tdb@tdb.fi>
Mon, 23 Sep 2019 18:36:18 +0000 (21:36 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 23 Sep 2019 18:54:14 +0000 (21:54 +0300)
source/list.h

index 1de05f6490b840b06193e9fa4f7ba133fb258dce..4526a48375b843bfd50d7321ab56a984b0ffe7ac 100644 (file)
@@ -61,8 +61,11 @@ private:
        };
 
 public:
-       class Item: public Container
+       class Item: virtual public Widget, protected Container
        {
+       protected:
+               Item() { }
+
        public:
                virtual const char *get_class() const { return "listitem"; }
 
@@ -76,17 +79,20 @@ public:
 
        class SimpleItem: public Item
        {
-       private:
+       protected:
+               SimpleItem() { }
+
                virtual void on_style_change();
        };
 
        class MultiColumnItem: public Item
        {
        protected:
+               MultiColumnItem() { }
+
                virtual void check_widths(std::vector<unsigned> &) const;
                virtual void set_widths(const std::vector<unsigned> &);
 
-       private:
                virtual void on_style_change();
        };