libpromeki 1.0.0-alpha
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
frame.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <promeki/namespace.h>
11#include <promeki/string.h>
12#include <promeki/tui/widget.h>
13
14PROMEKI_NAMESPACE_BEGIN
15
23class TuiFrame : public TuiWidget {
24 PROMEKI_OBJECT(TuiFrame, TuiWidget)
25 public:
26 TuiFrame(const String &title = String(), ObjectBase *parent = nullptr);
27 ~TuiFrame() override;
28
29 void setTitle(const String &title);
30 const String &title() const { return _title; }
31
35 Rect2Di32 contentRect() const;
36
37 Size2Di32 sizeHint() const override;
38
39 protected:
40 void paintEvent(PaintEvent *e) override;
41 void resizeEvent(ResizeEvent *e) override;
42
43 private:
44 String _title;
45};
46
47PROMEKI_NAMESPACE_END
Container widget with a border and optional title.
Definition frame.h:23
Rect2Di32 contentRect() const
Returns the content area inside the border.
TUI-specific widget base class.
Definition widget.h:33