summaryrefslogtreecommitdiff
path: root/LibGUI/GStatusBar.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-10 11:07:13 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-10 11:07:13 +0100
commit2def3d8d3ff3c913919cd64b2bf75b77ee57d1cf (patch)
treeb4e92858629468605876ef0e9c48e9391019843e /LibGUI/GStatusBar.h
parent2cf1dd5b6f10b898f24203c879290d665531a989 (diff)
downloadserenity-2def3d8d3ff3c913919cd64b2bf75b77ee57d1cf.zip
LibGUI: Start adding an automatic widget layout system.
My needs are really quite simple, so I'm just going to add what I need as I go along. The first thing I needed was a simple box layout with widgets being able to say whether they prefer fixed or fill for both their vertical and horizontal sizes. I also made a simple GStatusBar so FileManager can show how many bytes worth of files are in the current directory.
Diffstat (limited to 'LibGUI/GStatusBar.h')
-rw-r--r--LibGUI/GStatusBar.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/LibGUI/GStatusBar.h b/LibGUI/GStatusBar.h
new file mode 100644
index 0000000000..18ccb0ca59
--- /dev/null
+++ b/LibGUI/GStatusBar.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <LibGUI/GWidget.h>
+
+class GLabel;
+
+class GStatusBar : public GWidget {
+public:
+ explicit GStatusBar(GWidget* parent);
+ virtual ~GStatusBar() override;
+
+ String text() const;
+ void set_text(String&&);
+
+private:
+ virtual const char* class_name() const override { return "GStatusBar"; }
+ virtual void paint_event(GPaintEvent&) override;
+
+ GLabel* m_label { nullptr };
+};