1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

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
parent 69d05fbf44
commit 2d39bce3f6
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();