LibGUI: Add a GAbstractColumnView base class for GTableView

Almost everything in GTableView moves up to GAbstractColumnView.
This is in preparation for sharing a base class between GTableView
and GTreeView :^)
This commit is contained in:
Andreas Kling 2019-12-13 20:54:40 +01:00
commit 2d39bce3f6
Notes: sideshowbarker 2024-07-19 10:52:24 +09:00
6 changed files with 620 additions and 590 deletions

View file

@ -12,9 +12,6 @@ class GAbstractView : public GScrollableWidget {
friend class GModel;
public:
explicit GAbstractView(GWidget* parent);
virtual ~GAbstractView() override;
void set_model(RefPtr<GModel>&&);
GModel* model() { return m_model.ptr(); }
const GModel* model() const { return m_model.ptr(); }
@ -48,6 +45,9 @@ public:
NonnullRefPtr<Font> font_for_index(const GModelIndex&) const;
protected:
explicit GAbstractView(GWidget* parent);
virtual ~GAbstractView() override;
virtual void did_scroll() override;
void activate(const GModelIndex&);
void update_edit_widget_position();