+private:
+ /// This exists to make disconnecting signals easier
+ class DataObserver: public sigc::trackable
+ {
+ private:
+ List &list;
+
+ public:
+ DataObserver(List &);
+
+ void item_added(std::size_t);
+ void item_removed(std::size_t);
+ void cleared();
+ void refresh_item(std::size_t);
+ };
+
+public:
+ class Item: virtual public Widget, protected Container
+ {
+ protected:
+ Item();
+
+ public:
+ const char *get_class() const override { return "listitem"; }
+
+ protected:
+ void autosize_special(const Part &, Geometry &) const override;
+ public:
+ void set_active(bool);
+
+ void render_special(const Part &, GL::Renderer &) const override;
+ };
+
+ class SimpleItem: public Item
+ {
+ protected:
+ SimpleItem() = default;
+
+ void on_style_change() override;
+ };
+
+ class MultiColumnItem: public Item
+ {
+ protected:
+ MultiColumnItem() = default;
+
+ virtual void check_widths(std::vector<unsigned> &) const;
+ virtual void set_widths(const std::vector<unsigned> &);
+
+ void on_style_change() override;
+ };