diff --git a/LibGUI/GTreeView.cpp b/LibGUI/GTreeView.cpp new file mode 100644 index 00000000000..e2bfd53032d --- /dev/null +++ b/LibGUI/GTreeView.cpp @@ -0,0 +1,21 @@ +#include +#include + +GTreeView::GTreeView(GWidget* parent) + : GAbstractView(parent) +{ +} + +GTreeView::~GTreeView() +{ +} + +void GTreeView::paint_event(GPaintEvent& event) +{ + GFrame::paint_event(event); + GPainter painter(*this); + painter.set_clip_rect(frame_inner_rect()); + painter.set_clip_rect(event.rect()); + + painter.fill_rect(event.rect(), Color::White); +} diff --git a/LibGUI/GTreeView.h b/LibGUI/GTreeView.h new file mode 100644 index 00000000000..7ad6dfad8ef --- /dev/null +++ b/LibGUI/GTreeView.h @@ -0,0 +1,16 @@ +#pragma once + +#include + +class GTreeView : public GAbstractView { +public: + explicit GTreeView(GWidget*); + virtual ~GTreeView() override; + + virtual const char* class_name() const override { return "GTreeView"; } + +protected: + virtual void paint_event(GPaintEvent&) override; + +private: +}; diff --git a/LibGUI/Makefile b/LibGUI/Makefile index fefb6158f67..369e53acc33 100644 --- a/LibGUI/Makefile +++ b/LibGUI/Makefile @@ -54,6 +54,7 @@ LIBGUI_OBJS = \ GIcon.o \ GElapsedTimer.o \ GFrame.o \ + GTreeView.o \ GWindow.o OBJS = $(SHAREDGRAPHICS_OBJS) $(LIBGUI_OBJS)