summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LibGUI/GTreeView.cpp21
-rw-r--r--LibGUI/GTreeView.h16
-rw-r--r--LibGUI/Makefile1
3 files changed, 38 insertions, 0 deletions
diff --git a/LibGUI/GTreeView.cpp b/LibGUI/GTreeView.cpp
new file mode 100644
index 0000000000..e2bfd53032
--- /dev/null
+++ b/LibGUI/GTreeView.cpp
@@ -0,0 +1,21 @@
+#include <LibGUI/GTreeView.h>
+#include <LibGUI/GPainter.h>
+
+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 0000000000..7ad6dfad8e
--- /dev/null
+++ b/LibGUI/GTreeView.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include <LibGUI/GAbstractView.h>
+
+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 fefb6158f6..369e53acc3 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)