ladybird/Libraries/LibGUI/GStatusBar.h
Brandon Scott a1c89c2734 LibGUI: Add very limited multi-label support to GStatusBar
Created a constructor argument and getter/setter methods to allow
you to have a multi-label status bar.
2019-10-24 09:57:27 +02:00

27 lines
630 B
C++

#pragma once
#include <LibGUI/GWidget.h>
class GLabel;
class GResizeCorner;
class GStatusBar : public GWidget {
C_OBJECT(GStatusBar)
public:
virtual ~GStatusBar() override;
String text() const;
String text(int index) const;
void set_text(const StringView&);
void set_text(int index, const StringView&);
protected:
explicit GStatusBar(GWidget* parent);
explicit GStatusBar(int label_count, GWidget* parent);
virtual void paint_event(GPaintEvent&) override;
private:
NonnullRefPtr<GLabel> create_label();
NonnullRefPtrVector<GLabel> m_labels;
RefPtr<GResizeCorner> m_corner;
};